[PHP] Resampling images -- need lock ?

2009-04-20 Thread Martin Zvarík

I have 10 images of different sizes.

If user clicks ROTATE, a script will go through all these 10 images and 
rotates them.


If the user clicks TWICE, the first script will get aborted in the 
middle (so few images are already rotated) and then the second request 
will rotate all of them again.


I probably need to write a script that would lock the first file and if 
this file is already locked it would just die('already working...')


Is this a good approach?

I know I can use javascript to disable second click, but I want it 
server side.



Thanks for your suggestions,
Martin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Resampling images -- need lock ?

2009-04-20 Thread kranthi
yeh. if u want it to be on server side that is a good approach. but i
feel it'll be very easy to do it with javascript...

but what i did not understand is: what should happen if the user
clicks ROTATE second time(when the script completed rotating say 5
images)?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Resampling images -- need lock ?

2009-04-20 Thread Martin Zvarík

kranthi napsal(a):

yeh. if u want it to be on server side that is a good approach. but i
feel it'll be very easy to do it with javascript...

but what i did not understand is: what should happen if the user
clicks ROTATE second time(when the script completed rotating say 5
images)?
  
Well, few images (etc. 5) got rotated +90 deg. and then the script got 
aborted, because of the second request, which will cause another +90 deg 
rotation again on all images = meaning those 5 will be again rotated +90 
= 180, the others stay 90.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Resampling images -- need lock ?

2009-04-20 Thread kranthi
then u'll b needing a lock (a shared resource like a SESSION var will
do) even if u do it by javascript

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] cURL - Error 400

2009-04-20 Thread haliphax
On Fri, Apr 17, 2009 at 7:58 AM, David  wrote:
> On Fri, Apr 17, 2009 at 8:55 PM, Andrew Ballard  wrote:
>>
>> On Fri, Apr 17, 2009 at 12:41 AM, David  wrote:
>> > On Thu, Apr 16, 2009 at 11:48 PM, haliphax  wrote:
>> >
>> >> On Wed, Apr 15, 2009 at 9:17 PM, David 
>> >> wrote:
>> >> > Except I also need to POST data to the server to login. After I've
>> >> > logged
>> >> > in, I then need to use cookies to maintain a session.
>> >> >
>> >> > Doing that via file_get_contents() just isn't possible.
>> >> >
>> >> >
>> >> > Thanks
>> >> >
>> >> > On Thu, Apr 16, 2009 at 2:30 AM, haliphax  wrote:
>> >> >>
>> >> >> On Wed, Apr 15, 2009 at 10:36 AM, David 
>> >> wrote:
>> >> >> > I was wondering if anyone could please help me with this cURL
>> >> >> > script
>> >> >> > since I
>> >> >> > keep getting error 400 from the web server:
>> >> >> >
>> >> >> > http://pastebin.ca/1392840
>> >> >> >
>> >> >> > It worked until around a month ago which is when they presumably
>> >> >> > made
>> >> >> > changes to the site. Except I can't figure out what configuration
>> >> option
>> >> >> > in
>> >> >> > the cURL PHP script needs to be changed. I can visit the site
>> >> perfectly
>> >> >> > in
>> >> >> > Lynx, Firefox and IE.
>> >> >>
>> >> >> Are you just trying to get the contents of the page, or is there
>> >> >> something special you're doing? If it's just the contents you're
>> >> >> after, try file_get_contents() if allow_url_fopen is set to TRUE for
>> >> >> your PHP installation.
>> >> >>
>> >> >> http://php.net/file_get_contents
>> >> >> http://php.net/allow_url_fopen
>> >>
>> >> David, please refrain from top-posting.
>> >>
>> >> As for cURL login/session handling... I have an automated script that
>> >> connects to a phpBB bulletin board, and here are the settings that
>> >> have worked for me:
>> >>
>> >> curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
>> >> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
>> >> curl_setopt($ch, CURLOPT_COOKIESESSION, true);
>> >> curl_setopt($ch, CURLOPT_HEADER, false);
>> >> curl_setopt($ch, CURLOPT_COOKIEFILE, "{$homedir}cookiefile");
>> >> curl_setopt($ch, CURLOPT_COOKIEJAR, "{$homedir}cookiefile");
>> >> curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
>> >>
>> >> I would think CURLOPT_FOLLOWLOCATION and the CURLOPT_COOKIE* options
>> >> are most important for resolving your issue.
>> >>
>> >> HTH,
>> >>
>> >>
>> >> --
>> >> // Todd
>> >>
>> >
>>
>> > Hi,
>> >
>> > Sorry, that didn't work. The website is still returning error 400 with
>> > CURLOPT_COOKIESESSION and CURLOPT_COOKIE enabled.
>> >
>> > I did some experimentation in Firefox by blocking and deleting all
>> > cookies
>> > from the site. When I then visited the site, I was able to reach the
>> > logon
>> > page without returning error 400 so I doubt it's cookies that is the
>> > problem.
>> >
>> > I also tried changing the HTTP headers to:
>> >
>> > Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>> > Connection: Keep-Alive
>> > Content-Type: text/html; charset=UTF-8
>> >
>> > Which didn't work either.
>> >
>> >
>> >
>> >
>> > Thanks
>> >
>>
>> Does the site require a valid HTTP_REFERER? I haven't seen
>> CURLOPT_REFERER in any of your examples. (If I missed it somewhere,
>> just ignore the noise.)

Have you set your CURLOPT_COOKIEFILE properly? Also--you may need to
unlink() it before you log-in using your cURL script to make sure that
any invalid cookie values (i.e., expired session ID) are cleared out.

unlink("{$homedir}cookiefile");
curl_setopt($ch, CURLOPT_COOKIESESSION, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, "{$homedir}cookiefile");
curl_setopt($ch, CURLOPT_COOKIEJAR, "{$homedir}cookiefile");
curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
...

(where $homedir is "/home/haliphax/" or some such value.)

HTH,


-- 
// Todd

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] cURL - Error 400

2009-04-20 Thread David
On Mon, Apr 20, 2009 at 9:35 PM, haliphax  wrote:

> On Fri, Apr 17, 2009 at 7:58 AM, David  wrote:
> > On Fri, Apr 17, 2009 at 8:55 PM, Andrew Ballard 
> wrote:
> >>
> >> On Fri, Apr 17, 2009 at 12:41 AM, David 
> wrote:
> >> > On Thu, Apr 16, 2009 at 11:48 PM, haliphax 
> wrote:
> >> >
> >> >> On Wed, Apr 15, 2009 at 9:17 PM, David 
> >> >> wrote:
> >> >> > Except I also need to POST data to the server to login. After I've
> >> >> > logged
> >> >> > in, I then need to use cookies to maintain a session.
> >> >> >
> >> >> > Doing that via file_get_contents() just isn't possible.
> >> >> >
> >> >> >
> >> >> > Thanks
> >> >> >
> >> >> > On Thu, Apr 16, 2009 at 2:30 AM, haliphax 
> wrote:
> >> >> >>
> >> >> >> On Wed, Apr 15, 2009 at 10:36 AM, David <
> quick.webmas...@gmail.com>
> >> >> wrote:
> >> >> >> > I was wondering if anyone could please help me with this cURL
> >> >> >> > script
> >> >> >> > since I
> >> >> >> > keep getting error 400 from the web server:
> >> >> >> >
> >> >> >> > http://pastebin.ca/1392840
> >> >> >> >
> >> >> >> > It worked until around a month ago which is when they presumably
> >> >> >> > made
> >> >> >> > changes to the site. Except I can't figure out what
> configuration
> >> >> option
> >> >> >> > in
> >> >> >> > the cURL PHP script needs to be changed. I can visit the site
> >> >> perfectly
> >> >> >> > in
> >> >> >> > Lynx, Firefox and IE.
> >> >> >>
> >> >> >> Are you just trying to get the contents of the page, or is there
> >> >> >> something special you're doing? If it's just the contents you're
> >> >> >> after, try file_get_contents() if allow_url_fopen is set to TRUE
> for
> >> >> >> your PHP installation.
> >> >> >>
> >> >> >> http://php.net/file_get_contents
> >> >> >> http://php.net/allow_url_fopen
> >> >>
> >> >> David, please refrain from top-posting.
> >> >>
> >> >> As for cURL login/session handling... I have an automated script that
> >> >> connects to a phpBB bulletin board, and here are the settings that
> >> >> have worked for me:
> >> >>
> >> >> curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
> >> >> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
> >> >> curl_setopt($ch, CURLOPT_COOKIESESSION, true);
> >> >> curl_setopt($ch, CURLOPT_HEADER, false);
> >> >> curl_setopt($ch, CURLOPT_COOKIEFILE, "{$homedir}cookiefile");
> >> >> curl_setopt($ch, CURLOPT_COOKIEJAR, "{$homedir}cookiefile");
> >> >> curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' .
> session_id());
> >> >>
> >> >> I would think CURLOPT_FOLLOWLOCATION and the CURLOPT_COOKIE* options
> >> >> are most important for resolving your issue.
> >> >>
> >> >> HTH,
> >> >>
> >> >>
> >> >> --
> >> >> // Todd
> >> >>
> >> >
> >>
> >> > Hi,
> >> >
> >> > Sorry, that didn't work. The website is still returning error 400 with
> >> > CURLOPT_COOKIESESSION and CURLOPT_COOKIE enabled.
> >> >
> >> > I did some experimentation in Firefox by blocking and deleting all
> >> > cookies
> >> > from the site. When I then visited the site, I was able to reach the
> >> > logon
> >> > page without returning error 400 so I doubt it's cookies that is the
> >> > problem.
> >> >
> >> > I also tried changing the HTTP headers to:
> >> >
> >> > Accept:
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> >> > Connection: Keep-Alive
> >> > Content-Type: text/html; charset=UTF-8
> >> >
> >> > Which didn't work either.
> >> >
> >> >
> >> >
> >> >
> >> > Thanks
> >> >
> >>
> >> Does the site require a valid HTTP_REFERER? I haven't seen
> >> CURLOPT_REFERER in any of your examples. (If I missed it somewhere,
> >> just ignore the noise.)
>
> Have you set your CURLOPT_COOKIEFILE properly? Also--you may need to
> unlink() it before you log-in using your cURL script to make sure that
> any invalid cookie values (i.e., expired session ID) are cleared out.
>
> unlink("{$homedir}cookiefile");
> curl_setopt($ch, CURLOPT_COOKIESESSION, true);
> curl_setopt($ch, CURLOPT_COOKIEFILE, "{$homedir}cookiefile");
> curl_setopt($ch, CURLOPT_COOKIEJAR, "{$homedir}cookiefile");
> curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
> ...
>
> (where $homedir is "/home/haliphax/" or some such value.)
>
> HTH,
>
>
> --
> // Todd
>

Hi,

The cookie file is currently empty but when I delete it, a new one is
created once the script is ran.



Thanks


Re: [PHP] niewbie - call methods from another class

2009-04-20 Thread Philip Thompson

On Apr 19, 2009, at 9:43 AM, MEM wrote:


Hello, I have something like this:

$stmt = $this->_dbh->prepare("INSERT INTO DOG (name_dog, race_dog,  
id_vet)

VALUES (?, ?, ?)");

$stmt->bindParam(1, $this->getNameDog() );
$stmt->bindParam(2, $this->getRaceDog());
$stmt->bindParam(3, );


$stmt->execute();
  }

To make this insert function work, I need to fill the id_vet  
database column

with some values.
I cannot use $this->getIdVet() because this method is not in dog  
class, is

on the veterinary class.
So my question is:
How can I access the getIdVet() that is on the veterinary class to  
put it on

the insert dog method?


Thanks a lot,
Márcio


Try this

id;
}
}

class dog {
public function add () {
$vet = new veterinary ();

$stmt = $this->_dbh->prepare("INSERT INTO DOG (name_dog,  
race_dog, id_vet) VALUES (?, ?, ?)");


$stmt->bindParam(1, $this->getNameDog());
$stmt->bindParam(2, $this->getRaceDog());
$stmt->bindParam(3, $vet->getIdVet());
$stmt->execute();
}
}
?>

Of course here you will have to determine how the vet id is set. The  
method getIdVet has a redundant name. Since it's already in the  
veterinary class, just use getId() or id(). However, you'll probably  
want to change the above implementation to not create the veterinary  
in the add() method. You'll probably want to create it in the dog  
constructor...


vet = new veterinary ($vetId);
}
...
}
?>

And use $this->vet instead of $vet in the dog->add() method. Hope that  
helps. Do a little reading to try to understand using objects a little  
bit more.


http://php.net/object

~Philip


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 800 pound gorilla

2009-04-20 Thread Daniel Brown
On Mon, Apr 20, 2009 at 09:48, Marc Christopher Hall
 wrote:
> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will happen
> with the main db we PHP'ers have come to know and love especially since v 5

Become a MySQL developer and help make the decision.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] 800 pound gorilla

2009-04-20 Thread Bob McConnell
From: Marc Christopher Hall
> 
> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will
happen
> with the main db we PHP'ers have come to know and love especially
since v 5

Speak for yourself, I prefer PostgreSQL. But there are already two
announced forks of MySQL, created by developers that left after Sun
bought the company. So I don't think you'll be in any trouble. I did a
Google search last week on "executives departing MySQL" and found them.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Resampling images -- need lock ?

2009-04-20 Thread Martin Zvarík

I see...

I will need this too:
ignore_user_abort(true);


kranthi napsal(a):

i dont think flock will help in this case..
flock will b of help when u want to lock a particular file(to
read/write) but it'll not help u to stop execution of a php script

  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 800 pound gorilla

2009-04-20 Thread Philip Thompson

On Apr 20, 2009, at 8:48 AM, Marc Christopher Hall wrote:

Sun buys MySQL and now Oracle buys Sun (not final, yet). What will  
happen
with the main db we PHP'ers have come to know and love especially  
since v 5


Probably nothing. It would not behoove Oracle to get rid of or  
significantly modify MySQL. It appears that Oracle will just get  
richer... =D


~Philip

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Resampling images -- need lock ?

2009-04-20 Thread Alpár Török
2009/4/20 kranthi :
> then u'll b needing a lock (a shared resource like a SESSION var will
> do) even if u do it by javascript
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Session variables will not solve race conditions. I would either
ignore the user abort, so script doesn't abort, you can use file
locks, to make sure the scripts  don't  modify it at the same time

-- 
Alpar Torok

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] 800 pound gorilla

2009-04-20 Thread Marc Christopher Hall


-Original Message-
From: Bob McConnell [mailto:r...@cbord.com] 
Sent: Monday, April 20, 2009 9:59 AM
To: Marc Christopher Hall; php-general@lists.php.net
Subject: RE: [PHP] 800 pound gorilla

From: Marc Christopher Hall
> 
> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will
happen
> with the main db we PHP'ers have come to know and love especially
since v 5

Speak for yourself, I prefer PostgreSQL. But there are already two
announced forks of MySQL, created by developers that left after Sun
bought the company. So I don't think you'll be in any trouble. I did a
Google search last week on "executives departing MySQL" and found them.

Bob McConnell




This being a PHP forum I will stand down on a performance/stability debate
over PostgreSQL and MySQL. These responses are what I was fishing for. My
gut reaction was "Not again!" and this time I initially feared a future axe
to MySQL. Upon further thought (and a few deep breaths) I agree that for the
near future, an immediate canning of MySQL would not be in Oracle's best
interest. However, since Oracle has been the competition and (I had no idea
other developers had already begun a fork of MySQL) I believe that Oracle
will close the door on MySQL eventually.

Time will tell. Meanwhile, back to work for me.

-Marc Hall


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] 800 pound gorilla

2009-04-20 Thread Marc Christopher Hall
Sun buys MySQL and now Oracle buys Sun (not final, yet). What will happen
with the main db we PHP'ers have come to know and love especially since v 5



Re: [PHP] 800 pound gorilla

2009-04-20 Thread Lists

Marc Christopher Hall wrote:

Sun buys MySQL and now Oracle buys Sun (not final, yet). What will happen
with the main db we PHP'ers have come to know and love especially since v 5


Sorry Marc, meant to send this to the list...

I don't know what to think of this yet. Oracle has always competed with
the SQL architecture. Will they incorporate MySQL into their 
development.. or will they slowly can it in favor of their berkley 
architecture!?


Also, it seems to me that we may be losing a pillar of ingenuity and 
originality in our industry... perhaps one of the biggest oppositions to

Microsoft technologies [SUN].

Big news today!

Donovan


--
  =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
  D. BROOKE   EUCA Design Center
   WebDNA Software Corp.
  WEB:> http://www.euca.us  |   http://www.webdna.us
  =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] 800 pound gorilla

2009-04-20 Thread Marc Christopher Hall


-Original Message-
From: paras...@gmail.com [mailto:paras...@gmail.com] On Behalf Of Daniel
Brown
Sent: Monday, April 20, 2009 9:52 AM
To: Marc Christopher Hall
Cc: php-general@lists.php.net
Subject: Re: [PHP] 800 pound gorilla

On Mon, Apr 20, 2009 at 09:48, Marc Christopher Hall
 wrote:
> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will happen
> with the main db we PHP'ers have come to know and love especially since v
5

Become a MySQL developer and help make the decision.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1


Ahhh, I love the smell of condescension first thing in the morning. BTW I am
a MySQL developer thank you. A developer does not an owner make. Where do
you get the idea that Oracle would put this to a democratic vote?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 800 pound gorilla

2009-04-20 Thread Daniel Brown
On Mon, Apr 20, 2009 at 09:58, Marc Christopher Hall
 wrote:
>
> Ahhh, I love the smell of condescension first thing in the morning. BTW I am
> a MySQL developer thank you. A developer does not an owner make. Where do
> you get the idea that Oracle would put this to a democratic vote?

Condescension?  From where do you gather your "intelligence,"
Marc.  It was a suggestion.  And in the years that I've been a
developer, today is the first time I've seen your name.  Further, a
developer of an open source project understands a key word: fork.

Good luck with your future banter.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] 800 pound gorilla

2009-04-20 Thread bruce
hmmm...

a developer might not (won't) give you voting rights? (is there sucj a
thing!!!)

however, if you put together a number of really skilled c/c++ (whatever)
developers, then you could easily take the current existing sourcebase of
code, and go ahead and fork your own version, and never need to worry about
what oracle is going to do with the current tree...

of course i'd have a better chance of winning the lottery!! but stranger
thing have happened...

but you should also remember that some major companies are using mysql for
various projects, and they could/might get together to form a dev core team
to keep it moving...

peace..


-Original Message-
From: Marc Christopher Hall [mailto:m...@hallmarcwebsites.com]
Sent: Monday, April 20, 2009 6:58 AM
To: 'Daniel Brown'
Cc: php-general@lists.php.net
Subject: RE: [PHP] 800 pound gorilla




-Original Message-
From: paras...@gmail.com [mailto:paras...@gmail.com] On Behalf Of Daniel
Brown
Sent: Monday, April 20, 2009 9:52 AM
To: Marc Christopher Hall
Cc: php-general@lists.php.net
Subject: Re: [PHP] 800 pound gorilla

On Mon, Apr 20, 2009 at 09:48, Marc Christopher Hall
 wrote:
> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will happen
> with the main db we PHP'ers have come to know and love especially since v
5

Become a MySQL developer and help make the decision.

--

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1


Ahhh, I love the smell of condescension first thing in the morning. BTW I am
a MySQL developer thank you. A developer does not an owner make. Where do
you get the idea that Oracle would put this to a democratic vote?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] 800 pound gorilla

2009-04-20 Thread Bob McConnell
From: Marc Christopher Hall
> From: Bob McConnell
>> From: Marc Christopher Hall
>>> 
>>> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will
>> happen
>>> with the main db we PHP'ers have come to know and love especially
>> since v 5
>>
>> But there are already two
>> announced forks of MySQL, created by developers that left after Sun
>> bought the company. So I don't think you'll be in any trouble. I did
a
>> Google search last week on "executives departing MySQL" and found
them.
> 
> 
> These responses are what I was fishing for. My
> gut reaction was "Not again!" and this time I initially feared a
future axe
> to MySQL. Upon further thought (and a few deep breaths) I agree that
for the
> near future, an immediate canning of MySQL would not be in Oracle's
best
> interest. However, since Oracle has been the competition and (I had no
idea
> other developers had already begun a fork of MySQL) I believe that
Oracle
> will close the door on MySQL eventually.

I don't think it makes any difference what Oracle does with it. I
believe most or all of the core source is available under the GPL. So it
will always be available. There is certainly enough interest in the
application that it will attract a number of talented developers no
matter who manages the process. So even if Oracle dumps it, it will
continue to exist in one or more forks. The only business issue will be
who can use the trademark.

On the other hand, there are some closed source utilities and components
that may have to be recreated for any forked version. After all, it was
the "Enterprise" package that was generating the revenue. That is the
only part of the product that Sun or Oracle could really control.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 800 pound gorilla

2009-04-20 Thread Bastien Koert
On Mon, Apr 20, 2009 at 10:42 AM, Bob McConnell  wrote:

> From: Marc Christopher Hall
> > From: Bob McConnell
> >> From: Marc Christopher Hall
> >>>
> >>> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will
> >> happen
> >>> with the main db we PHP'ers have come to know and love especially
> >> since v 5
> >>
> >> But there are already two
> >> announced forks of MySQL, created by developers that left after Sun
> >> bought the company. So I don't think you'll be in any trouble. I did
> a
> >> Google search last week on "executives departing MySQL" and found
> them.
> >
> >
> > These responses are what I was fishing for. My
> > gut reaction was "Not again!" and this time I initially feared a
> future axe
> > to MySQL. Upon further thought (and a few deep breaths) I agree that
> for the
> > near future, an immediate canning of MySQL would not be in Oracle's
> best
> > interest. However, since Oracle has been the competition and (I had no
> idea
> > other developers had already begun a fork of MySQL) I believe that
> Oracle
> > will close the door on MySQL eventually.
>
> I don't think it makes any difference what Oracle does with it. I
> believe most or all of the core source is available under the GPL. So it
> will always be available. There is certainly enough interest in the
> application that it will attract a number of talented developers no
> matter who manages the process. So even if Oracle dumps it, it will
> continue to exist in one or more forks. The only business issue will be
> who can use the trademark.
>
> On the other hand, there are some closed source utilities and components
> that may have to be recreated for any forked version. After all, it was
> the "Enterprise" package that was generating the revenue. That is the
> only part of the product that Sun or Oracle could really control.
>
> Bob McConnell
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I think it will be interesting to watch. Oracle does use and support OS,
demonstrated nicely by bundling PHP into their application engine. MySQL
enterprise will nicely fill a hole in the lineup for SMB that Oracle has a
tough time supporting with the expensive enterprise class products.

Hopefully there won't be much change in the next few years, but I shall
remain hopeful that things will stay the current course

-- 

Bastien

Cat, the other other white meat


RE: [PHP] Resampling images -- need lock ?

2009-04-20 Thread Bob McConnell
From: Martin Zvarík
> kranthi napsal(a):
>> yeh. if u want it to be on server side that is a good approach. but i
>> feel it'll be very easy to do it with javascript...
>>
>> but what i did not understand is: what should happen if the user
>> clicks ROTATE second time(when the script completed rotating say 5
>> images)?
>> 
> Well, few images (etc. 5) got rotated +90 deg. and then the script got 
> aborted, because of the second request, which will cause another +90 deg 
> rotation again on all images = meaning those 5 will be again rotated +90 
> = 180, the others stay 90.

That's what did happen. But what _should_ happen? Should it abort the first 
rotate, or finish all images then rotate each a second time? The code will have 
to be different depending on which option you want.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] escape your variables

2009-04-20 Thread PJ
Bastien Koert wrote:
> On Wed, Feb 18, 2009 at 8:34 AM, PJ  wrote:
>
>   
>> To focus on mysql_real_escape_string, I am recapping... questions below
>> QUOTE:==
>> Instead of doing this (for an imaginary table):
>> $sql = "insert into table1(field1, field2) values ('$value1', '$value2')";
>>
>> do
>> $sql = "insert into table1(field1, field2) values ('" .
>> mysql_real_escape_string($value1) . "', '" .
>> mysql_real_escape_string($value2) . "')";
>>
>> Now $value1 and $value2 can only be used as data, they can't be used
>> against you.
>>
>> If you don't do that, try adding a last name of O'Reilly - your code
>> will break because of the ' in the name.
>>
>> When you say "escape all your inputs" - just what do you mean? Does that
>> mean I need some special routines that have to be repeated over and over
>> every time there is an input... but what do you mean by an "input"? And,
>> from looking at all the comments in the manual, it's not clear just
>> where to stop...
>>
>> "input" means anything a user gives you. Whether it's a first name, last
>> name, a comment in a blog, a website url - anything you get from a user
>> must be escaped.
>> END QUOTE ===
>>
>> So, I am more confused than ever...
>>
>> TWO QUESTIONS:
>>
>> 1.  It seems to me that submitting username, password and database_name
>> is pretty dangerous.
>> How does one deal with that? Do you use mysql_real_escape_string?
>> e.g.
>> > $db_host = 'localhost';
>> $db_user = 'auser';
>> $db_pwd = 'apassword';
>>
>> $database = 'adatabase';
>> $table = 'authorBook';
>>
>> if (!mysql_connect($db_host, $db_user, $db_pwd))
>>die("Can't connect to database");
>>
>> if (!mysql_select_db($database))
>>die("Can't select database");
>>
>> // sending query
>> $result = mysql_query("SELECT * FROM {$table}");
>> 
>
>
> Inputs are user supplied.
Are you saying that I don't need to sanitize the variables above -
$db_host, $db_user, $db_pwd, $database, $table ?
If they whould be sanitized, just when should that be done? Whlen the
variable is declared? or in the if stetements above and the $result ?

I would love to see an example somewhere that shows an unsanitized
variable and the same variable sanitized.

>  Variables coming from inside the application code
> are not really inputs. I prefer a two step approach to ensure that I am
> (hopefully) free from potential problems.
>
> 1. Use filtering like regex and length checks 
When and specifically on what?
> [
> http://ca2.php.net/manual/en/function.ereg.php]
> 2. Use mysql_real_escape_string in the query wherever the data is
> potentially harmful.
>
>
>
>
>   
>> 2. How do you use mysql_real_escape_string on a string entered in a form
>> page with input and $_POST where the inputs are strings like $titleIN,
>> $authorINetc.?
>>
>> 
>
>  $error = '';
> $title = ''; $authorIN='';  //initialize vars
>
> $title = (eregi("^[a-z0-9\.\s]+$",$_POST['title'])) ? $_POST['title'] :
> $error .= "invalid title";
> $authorIN = (eregi("^[a-z\.\s]+$",$_POST['author'])) ? $_POST['author'] :
> $error .= "invalid author";
>
> $sql = "insert into table (title, author) values ('" .
> mysql_real_escape_string($title) . "','" .
> mysql_real_escape_string($authorIN) . "')";
>
> //rest of code
> ?>
>
>
>   
>> --
>>
>> Phil Jourdan --- p...@ptahhotep.com
>>   http://www.ptahhotep.com
>>   http://www.chiccantine.com
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
I quote from earlier in the post:

=
Better:
myql_query("INSERT INTO foo (`name`) VALUES ('".
mysql_real_escape_string($name, $link) ."')");

This is better because we escape it in the sql statement itself.
$name remains unchanged in case we want to use it later.

Best:
Use prepared statements!
=
What is meant by prepared stetements? Does that mean not using variables?

Another quote:


Better:
echo htmlspecialchars($name, ENT_QUOTES, 'UTF-8');

This is better because we don't trust the data at all.  You don't know
what it contains.  People find all sorts of interesting ways of
getting weird characters into the apps I write, so just cover all
bases.

Another way:
Create a pre-escaped version of the content in the db.  Keep the
original value so that the user can edit it, but also create a 'clean'
version that you can just echo out.  Just make sure you don't mess up.

===

I'd like to be able to understand just what is meant by creating a
"pre-escaped version of the content in the db" - I'd like to see an example.
And what would the 'clean' version be, where would you put it or where
is it supposed to be placed?

-- 
unheralded genius: "A clean desk is the sign of a dull mind. "
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.

Re: [PHP] 800 pound gorilla

2009-04-20 Thread Sancar Saran
On Monday 20 April 2009 16:48:42 Marc Christopher Hall wrote:
> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will happen
> with the main db we PHP'ers have come to know and love especially since v 5


sudo apt-get install postgresql

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] problems with gnupg extension.

2009-04-20 Thread Ray
On Monday 13 April 2009 10:17:28 Ray wrote:
> Hello all,
>
> I'm trying to use the gnupg extension and I think everything is properly
> installed.
>
> I'm just using test data. I'm encrypting and then immediately decrypting.
> But the decryption is failing with a unhelpful error message.
>
> error message :
> Warning: gnupg::decrypt() [gnupg.decrypt]: decrypt failed in
> /path/to/test2.php on line 18
>
> any help or suggestions would be very much appreciated. details follow.
> Ray
>
>
>
> full output:
>
> raw data: this is a test
>
>
> encoded data:
>
>  -BEGIN PGP MESSAGE-
> Version: GnuPG v2.0.11 (FreeBSD)
>
> hQIOA9qOyyMyQ2/bEAgArxLuVw5eShkL+/g9SCGcBm5/J1G78zrh6dWFisPFqWg1
> MP3zj/QnWiD9zEtLmGJazP51pV2TpySpEbILze8sz6c/imRBYLrHhbxO6W1LJqXq
> rALUPDIe4qKtM7mC+K9EdFdkYRzWxi45eTK1DQtQazhqelWIb1NuaVu8vUKk/pIy
> duE0juP2j+8OHIlx36sUcATkvBO5a7Ak9tGUT5T5lRqjMzKa6TPuCsZukmVh43BG
> uqpz7H83LinwOCfUnyq3R2e/vIM2cv8t7jz17acOfYslonMxNz54i8jR8COmCmLY
> NhGORZUSLauyWGxAIDvkDcTFD4Jd5KxaXcMPEE7zwAf9HUWmKtqOqn825AjlBxNj
> 7gXEOtpsRMiYiYuISzHvitpPWXQPOPsoGnPRZZBvCNJcvAgg6hMx5c4Y7tGXTsma
> 2hkC9f4959kBwiGAFnQxJqz2pMDW+N3X23f+kwSrU7KoNrhnxUV1ywcUGaebwYM8
> emIygCm6mS7T81JtXxhMto0sSqeE/zwHc3/03/KP57V7j2tHib4dN9ZOfB6yiubF
> PIwog0JYagjOfyNdGh3vRzvcYdDOqyWMgtY6XpZJwPESJlOADHVt5n844oHthRD3
> MJVjwqjEz5qQiPq+kOmd4AdkpkEkRcCweYNEXVXPxpmlrduuu8kc4wsA5v3YXZ/C
> x9JNAVKW9tdPSxDoxbEKyAhVdurQAxmYe7FaCLl74lACQaUg/Otwb86pjUBesgx6
> mXhQv+epG71sKY+LSDxGi8dSgbOOmfI2L09zy9XTEQ4=
> =85vG
> -END PGP MESSAGE-
>
>
> [if this line is blank, the decrypt key should have been added correctly]]
>
> Warning: gnupg::decrypt() [gnupg.decrypt]: decrypt failed in
> /path/to/test2.php on line 18
>
>
> decoded data:
>
>
>
>
> Code:
>
>  $raw_data="this is a test";
> $passphrase="test";
> $recipient="m...@example.com";
>
> putenv('GNUPGHOME=/www/ohfinder/keys');
> $gpg = new gnupg();
> $gpg -> seterrormode(gnupg::ERROR_WARNING);
> echo "raw data: $raw_data";
> $gpg->addencryptkey($recipient);
> $encrypted = $gpg->encrypt($raw_data);
> echo "encoded data:  $encrypted";
>
> $gpg->adddecryptkey($recipient, $passphrase);
> echo $gpg -> geterror();
> echo "[if this line is blank, the decrypt key should have been added
> correctly]]";
> echo '';
> $plaintext = $gpg->decrypt($encrypted);
> echo $gpg -> geterror();
> echo "decoded data:  $plaintext ";
> ?>


Any suggestions, Anyone?
Ray

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Time difference desired load

2009-04-20 Thread admin
Suggestion on faster solutions for extremely large database.

$ledip['started'] = '2009-04-01 13:40:34'; Example time in DB
$ledip['touchedlast'] = '2009-04-01 13:41:28'; Example time in DB


date('i:s', strtotime($ledip['touchedlast']) - strtotime($ledip['started'])); 
// Not a desired solution because of its inability to go past the minute 
correctly I AM AWARE.


or 

concat( truncate( hour( timediff($ledip['touchedlast'],$ledip['started']) ) 
/24, 0 ) , " days ", hour( timediff($ledip['touchedlast'],$ledip['started']) ) 
%24, " hours ", minute( timediff($ledip['touchedlast'],$ledip['started'] ) ) , 
" minutes ", second( timediff($ledip['touchedlast'],$ledip['started'] ) ) , " 
seconds" ) as timeleft


The results of concat truncate, allows me the flexibility or exacting time 
differences out past the minute. I am worried that the vastness of the database 
may cause me a server load or query timeframes that are undesirable as it grows 
even bigger.
Suggestions?

*   PLEASE 
Do not reply to this email with your 9 million page thought of how to,  or some 
custom function that you think is all that, I do not care.
I am asking for load desired results NOT your take on my code…

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Extensions not compile

2009-04-20 Thread Joaquim Pedro França Simão
I use cygwin (updated).
I try to compile extensions, but i only get  "extension.a"

--
# phpize

# ./configure

# make
/usr/local/src/extension/.libs/extension.a, extension.la.lnk,
extension.o (280 kB, the other 3 had few bytes, *.a, *.la, *.lai)

# make install
... created: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
one file *.a (8 bytes "!")

was expecting a dll file, but only "extension.a"

What's wrong?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Extensions not compile

2009-04-20 Thread Joaquim Pedro França Simão
I use cygwin (updated).
I try to compile extensions, but i only get  "extension.a"

--
# phpize

# ./configure

# make
/usr/local/src/extension/.libs/extension.a, extension.la.lnk,
extension.o (280 kB, the other 3 had few bytes, *.a, *.la, *.lai)

# make install
... created: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
one file *.a (8 bytes "!")

was expecting a dll file, but only "extension.a"

What's wrong?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Socket connection not closing

2009-04-20 Thread Martín Marqués
I have a socket application written a few years ago in PHP which
receives information and does something (not relevant at the moment).
The program that connects is written in PHP with PEARs Net_Socket.

This socket is really taken from the socket example in the PHP docs.
It's been working OK for quite some time, but today I tried it out on
my development machine and I'm experiencing some problems with the
network connection not closing:

# lsof -i :9100
COMMANDPID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
printSock 5309 root3u  IPv4  21732  0t0  TCP
bugs.unl.edu.ar:9100 (LISTEN)
printSock 5309 root4u  IPv4  26834  0t0  TCP
bugs.unl.edu.ar:9100->inti.unl.edu.ar:37825 (CLOSE_WAIT)
sh8077 root3u  IPv4  21732  0t0  TCP
bugs.unl.edu.ar:9100 (LISTEN)
sh8077 root4u  IPv4  26834  0t0  TCP
bugs.unl.edu.ar:9100->inti.unl.edu.ar:37825 (CLOSE_WAIT)

I sent the disconnect() from Net_Socket, and even set the connection
to not be persistent (just in case), but I can't get the connection to
close.

Any ideas on what can be wrong?

As I said before, this socket application is working OK on other machines.

-- 
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Time difference desired load

2009-04-20 Thread Bastien Koert
On Mon, Apr 20, 2009 at 1:38 PM,  wrote:

> Suggestion on faster solutions for extremely large database.
>
> $ledip['started'] = '2009-04-01 13:40:34'; Example time in DB
> $ledip['touchedlast'] = '2009-04-01 13:41:28'; Example time in DB
>
>
> date('i:s', strtotime($ledip['touchedlast']) -
> strtotime($ledip['started'])); // Not a desired solution because of its
> inability to go past the minute correctly I AM AWARE.
>
>
> or
>
> concat( truncate( hour( timediff($ledip['touchedlast'],$ledip['started']) )
> /24, 0 ) , " days ", hour( timediff($ledip['touchedlast'],$ledip['started'])
> ) %24, " hours ", minute( timediff($ledip['touchedlast'],$ledip['started'] )
> ) , " minutes ", second( timediff($ledip['touchedlast'],$ledip['started'] )
> ) , " seconds" ) as timeleft
>
>
> The results of concat truncate, allows me the flexibility or exacting time
> differences out past the minute. I am worried that the vastness of the
> database may cause me a server load or query timeframes that are undesirable
> as it grows even bigger.
> Suggestions?
>
> *   PLEASE 
> Do not reply to this email with your 9 million page thought of how to,  or
> some custom function that you think is all that, I do not care.
> I am asking for load desired results NOT your take on my code…
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
You are doing a lot of calculation on this combining both PHP and SQL code.
How many rows are you affecting with this query at one time?

I hate to say it, but this to me is just begging for a unix timestamps, then
you can simply deal with the seconds remaining on this counter.

-- 

Bastien

Cat, the other other white meat


[PHP] Help me debug this

2009-04-20 Thread Patrick Moloney
Some months ago I downloaded and installed Apache, PHP and MySql. With 
only light use they seem to be working.
I have downloaded a Test Script from the VBulletin vendor that is 
supposed to determine if your setup could run their product. The Test 
Script is php and appears as a form that allows you to enter a Mysql 
database name, user and password. I fill it in and select the button. 
The large blue window remains but the entry boxes and a border 
disappear. It hasn't totally crashed and can be closed - but it has stopped.


I've tried their help forum, but they keep telling me to create an empty 
database. Maybe the problem has something to do with Mysql, but for a 
test script, I'm getting zero feedback. I have an empty database and one 
with a couple of tables. I don't see a problem with Mysql. So, how does 
one begin to debug this php test script to see what's failing? I'm kind 
of new to php.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Creating A Chat?

2009-04-20 Thread Nitsan Bin-Nun
Hi Guys,

I have created few chats in the past, but I'm trying to create a new one
which saves on HTTP requests and do not become an overkill to the server as
more users get in.

The chat is a one on one, I'm trying to achieve this:
* A user sends a message
* The message is not saved/save temporarily on the server
* The message is showed to the other user

Any ideas how i should implement this?

I have no idea how to build it in the most efficiency way, any notes or
recommendations or
anything that I should pay attention to during development will be very
appreciated.


Re: [PHP] Help me debug this

2009-04-20 Thread Stephen

Patrick Moloney wrote:
I've tried their help forum, but they keep telling me to create an 
empty database.

Have you tried creating an empty database?

Stephen


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help me debug this

2009-04-20 Thread Patrick Moloney

Stephen wrote:

Patrick Moloney wrote:
I've tried their help forum, but they keep telling me to create an 
empty database.

Have you tried creating an empty database?

Stephen


yes.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Resampling images -- need lock ? SOLVED

2009-04-20 Thread Martin Zvarík

Martin Zvarík napsal(a):

I have 10 images of different sizes.

If user clicks ROTATE, a script will go through all these 10 images and 
rotates them.


If the user clicks TWICE, the first script will get aborted in the 
middle (so few images are already rotated) and then the second request 
will rotate all of them again.


I probably need to write a script that would lock the first file and if 
this file is already locked it would just die('already working...')


Is this a good approach?

I know I can use javascript to disable second click, but I want it 
server side.



Thanks for your suggestions,
Martin



I rename the first file at the beginning of the script.

Than do all rotations.

--

If there's another request, it checks if the file exists - if not = it's 
being processed = wait.


Simple.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] escape your variables

2009-04-20 Thread Chris



How does one deal with that? Do you use mysql_real_escape_string?
e.g.



Inputs are user supplied.

Are you saying that I don't need to sanitize the variables above -
$db_host, $db_user, $db_pwd, $database, $table ?


No - they are essentially hardcoded.

A user (through a form or any other method) cannot change which db you 
are talking to. They cannot change the hostname either.


If a variable comes from:
- a post variable
- a get variable
- a session variable
- a cookie
- an environment variable

then it will need to be escaped & sanitized.

If you are putting the variable at the top of the script and there's no 
way for a user to change it, then no need to sanitize.



I would love to see an example somewhere that shows an unsanitized
variable and the same variable sanitized.


"Sanitizing" depends on what you need.

An age field doesn't need anything except a number.
A name field should accept everything except html tags.

They are going to be sanitized differently.

$name = $_POST['name']; <-- unsanitized
$name = strip_tags($name); <-- sanitized.


=
Better:
myql_query("INSERT INTO foo (`name`) VALUES ('".
mysql_real_escape_string($name, $link) ."')");

This is better because we escape it in the sql statement itself.
$name remains unchanged in case we want to use it later.

Best:
Use prepared statements!
=
What is meant by prepared stetements? Does that mean not using variables?


It's a different way of putting the query together. Data can only mean 
one thing - data. There's no escaping, the db will always know what it's 
going to do.


http://www.php.net/manual/en/pdo.prepare.php

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help me debug this

2009-04-20 Thread Phpster



On Apr 20, 2009, at 17:23, Patrick Moloney  wrote:

Some months ago I downloaded and installed Apache, PHP and MySql.  
With only light use they seem to be working.
I have downloaded a Test Script from the VBulletin vendor that is  
supposed to determine if your setup could run their product. The  
Test Script is php and appears as a form that allows you to enter a  
Mysql database name, user and password. I fill it in and select the  
button. The large blue window remains but the entry boxes and a  
border disappear. It hasn't totally crashed and can be closed - but  
it has stopped.


I've tried their help forum, but they keep telling me to create an  
empty database. Maybe the problem has something to do with Mysql,  
but for a test script, I'm getting zero feedback. I have an empty  
database and one with a couple of tables. I don't see a problem with  
Mysql. So, how does one begin to debug this php test script to see  
what's failing? I'm kind of new to php.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Perhaps your install of php is blocking the error reporting from  
telling you where the problem is. Trying turning error reporting on


Bastien

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 800 pound gorilla

2009-04-20 Thread Raymond Irving

Ok, Sun buys MySQL and now Oracle is planning on buying Sun. Who's going to buy 
Oracle in a few years from now?

Maybe it's time the PHP dev team start thinking about supporting a database 
side project of their own. I would do well to have an open source database 
engine that integrates well with the system under contact development.

So what about the other technologies? What about NetBeans, VirtualBox and Java? 
Will Oracle destroy a good thing? Or will they continue to support Open Source.

I'm not too sure what they will do but I somehow have this feeling that a lot 
will change. It might not be business as usual.

__
Raymond Irving

--- On Mon, 4/20/09, Sancar Saran  wrote:

From: Sancar Saran 
Subject: Re: [PHP] 800 pound gorilla
To: php-general@lists.php.net
Date: Monday, April 20, 2009, 11:46 AM

On Monday 20 April 2009 16:48:42 Marc Christopher Hall wrote:
> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will happen
> with the main db we PHP'ers have come to know and love especially since v 5


sudo apt-get install postgresql

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help me debug this

2009-04-20 Thread kranthi
i find var_dump useful in these situations, and for error reporting
try trigger error. http://php.net/manual/en/function.trigger-error.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 800 pound gorilla

2009-04-20 Thread Manuel Lemos
Hello,

on 04/20/2009 10:57 PM Raymond Irving said the following:
> Ok, Sun buys MySQL and now Oracle is planning on buying Sun. Who's going to 
> buy Oracle in a few years from now?
> 
> Maybe it's time the PHP dev team start thinking about supporting a database 
> side project of their own. I would do well to have an open source database 
> engine that integrates well with the system under contact development.

The PHP group already did that. They pushed SQLite when MySQL started
GPL'ing the MySQL client libraries. Then MySQL had to open an exception
for inclusion of MySQL client libraries in Open Source projects like PHP.



> So what about the other technologies? What about NetBeans, VirtualBox and 
> Java? Will Oracle destroy a good thing? Or will they continue to support Open 
> Source.
> 
> I'm not too sure what they will do but I somehow have this feeling that a lot 
> will change. It might not be business as usual.

Nah, Oracle will just charge money for somethings that were going to be
free in MySQL 6 like the online backup support of the Falcon engine. ;-(

Oracle also bought INNODB which provides online backup but it costs
money. That is business as usual, I am afraid.

PostgreSQL people are celebrating as they always had a lot of envy of
MySQL success.

-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 800 pound gorilla

2009-04-20 Thread Chris



Maybe it's time the PHP dev team start thinking about supporting a database 
side project of their own. I would do well to have an open source database 
engine that integrates well with the system under contact development.


The PHP group already did that. They pushed SQLite when MySQL started
GPL'ing the MySQL client libraries. Then MySQL had to open an exception
for inclusion of MySQL client libraries in Open Source projects like PHP.


You can use the mysql fork "Drizzle" - supports most mysql stuff from 
what I've heard though some has been cut back.



PostgreSQL people are celebrating as they always had a lot of envy of
MySQL success.


They do have a lot of success - just not necessarily in the 'web area.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] URL data decoding problem

2009-04-20 Thread Anders Norrbring
I'm working on a PayPal IPN module, and PayPal returns a lot of data in a
GET call.
The problem is that international characters entered by a user on the PayPal
site gets encoded really weird, and I don't see an obvious way to decode
them, can someone please assist?
My website is running utf-8 all over.

The URL contains this variable: &memo=Pr%EF%BF%BDvar
It should translate into &memo=Prövar

I've run out of ideas on this really.. PayPal say the reply is encoded in
"windows-1252".

Thanks,
Anders.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL data decoding problem

2009-04-20 Thread Ashley Sheridan
On Tue, 2009-04-21 at 08:39 +0200, Anders Norrbring wrote:
> I'm working on a PayPal IPN module, and PayPal returns a lot of data in a
> GET call.
> The problem is that international characters entered by a user on the PayPal
> site gets encoded really weird, and I don't see an obvious way to decode
> them, can someone please assist?
> My website is running utf-8 all over.
> 
> The URL contains this variable: &memo=Pr%EF%BF%BDvar
> It should translate into &memo=Prövar
> 
> I've run out of ideas on this really.. PayPal say the reply is encoded in
> "windows-1252".
> 
> Thanks,
> Anders.
> 
> 
You can use urldecode() to decode the %xx characters to their actual
character.


Ash
www.ashleysheridan.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php