Re: [PHP] header problem

2009-09-09 Thread A.a.k
is there any alternative to header() for redirect users? "George Langley" wrote in message news:b1b897d4-7448-4b71-bffc-3addc27ce...@shaw.ca... Hi Blueman. As soon as ANYTHING has been drawn to the browser, you cannot use a header command. So you need to work through all of your code, and e

Re: [PHP] upgrade php4 to php5

2009-09-09 Thread Eddie Drapkin
On Thu, Sep 10, 2009 at 2:51 AM, madunix wrote: > how can i upgrade my php4 to php5? > > [r...@intra /]# uname -a > Linux intra 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 > i386 GNU/Linux > /usr/local/apache/bin/apachectl stop > cd /downloads/ > cd php-4.4.3 > ./configure --with-ap

[PHP] upgrade php4 to php5

2009-09-09 Thread madunix
how can i upgrade my php4 to php5? [r...@intra /]# uname -a Linux intra 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux /usr/local/apache/bin/apachectl stop cd /downloads/ cd php-4.4.3 ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --wit

Re: [PHP] header problem

2009-09-09 Thread George Langley
Hi Blueman. As soon as ANYTHING has been drawn to the browser, you cannot use a header command. So you need to work through all of your code, and ensure that all of your logic that could result in a header call is run BEFORE you send any html code. Is going to be tricky if mixing html and

[PHP] header problem

2009-09-09 Thread A.a.k
hello I recentrly uploaded my project from localhost to a hosting and found many errors and warnings which didnt have in local. one of the most annoying one is header('Location xxx'). I have used header to redirect users from pages, and kinda used it alot. i know about the whitespace causing wa

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Ben Dunlap
I have a php cli script that listens on a UDP socket and, when data is [8<] >> So I think the the MSG_WAITALL is causing it to block until incoming >> data connection is closed (it never reaches the 512 byte mark before [8<] > your "clients" are not maintaining an open connection to the socket

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:53 PM, APseudoUtopia wrote: > On Wed, Sep 9, 2009 at 10:39 PM, Eddie Drapkin wrote: >> On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia >> wrote: >>> Hey list, >>> >>> I have a php cli script that listens on a UDP socket and, when data is >>> sent to the socket, the scrip

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread APseudoUtopia
On Wed, Sep 9, 2009 at 10:39 PM, Eddie Drapkin wrote: > On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia > wrote: >> Hey list, >> >> I have a php cli script that listens on a UDP socket and, when data is >> sent to the socket, the script inserts it into a database. I'm using >> the real BSD socket

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia wrote: > Hey list, > > I have a php cli script that listens on a UDP socket and, when data is > sent to the socket, the script inserts it into a database. I'm using > the real BSD socket functions, not fsock. > > The script runs socket_create(), then

[PHP] Performance of while(true) loop

2009-09-09 Thread APseudoUtopia
Hey list, I have a php cli script that listens on a UDP socket and, when data is sent to the socket, the script inserts it into a database. I'm using the real BSD socket functions, not fsock. The script runs socket_create(), then socket_bind(). Then it starts a while(TRUE) loop. Within the loop,

[PHP] Re: [SPAM] [PHP] Little perl help?

2009-09-09 Thread Skip Evans
My Bad. It looks like I had some code in the wrong place. Will try again. Skip m...@elysianfieldssoftware.com wrote: Skip, That *should* work. The below works on my Linux box. $img_dir="This is an dir name with spaces"; $img_dir =~ s/ /_/g; printf("%s\n",$img_dir); mkdir($img_dir,$CHMOD_ON_

Re: [PHP] new php script and sqlite

2009-09-09 Thread Ben Dunlap
>   $dbh = new PDO('sqlite:$db_file'); [8<] >        $dbh = new PDO('sqlite2:$db_file'); But with double-quotes, not single-quotes. ;-) Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Little perl help?

2009-09-09 Thread Skip Evans
Hey all, I know this is a PHP list, but I could use a bit of Perl help, a language which just does not fit in my C/C++/Java/PHP trained brain. A directory is created with the following: mkdir("$img_dir",$CHMOD_ON_FOLDER_CREATE); I need to replace spaces with the underscore character so the

Re: [PHP] new php script and sqlite

2009-09-09 Thread Ben Dunlap
> I was under the impression that sqlite2 was supported widely by PHP, > but sqlite3 seems only to be enabled on php 5.3.0 by default. > > My concern now is actually that users may find that their hosting > service providers don't provide sqlite3 out of the box. PDO seems to support both versions:

Re: [PHP] dns lookups only half working in chroot

2009-09-09 Thread Ben Dunlap
> echo gethostbyname('www.google.de')."\n"; > print_r(dns_get_record('www.google.de', DNS_A))."\n"; > ?> [8<] > I don't understand why the first lookup fails, but the second one succeeds. > Unfortunately thinks like fsockopen() seem to use the same technique as > gethostbyname(), so they don't wor

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Ralph Deffke
give it a try with PDATA instead of CDATA and see what happns "Ashley Sheridan" wrote in message news:1252512252.2961.40.ca...@localhost... > On Wed, 2009-09-09 at 16:51 +0100, Matthew Croud wrote: > > On 9 Sep 2009, at 16:37, Ashley Sheridan wrote: > > > > > On Wed, 2009-09-09 at 15:14 +0100, M

Re: [PHP] Encrypt then decrypt yields extra dots at end

2009-09-09 Thread Ben Dunlap
> I thought this code: > > $enc=mcrypt_ecb(MCRYPT_RIJNDAEL_256,"salt123","encrypt_me",MCRYPT_ENCRYPT); > $dec=mcrypt_ecb(MCRYPT_RIJNDAEL_256,"salt123",$enc,MCRYPT_DECRYPT); > echo $dec; > > would yield "encrypt_me". The actual result is > "encrypt_me.." (bunch of extra dots). >

[PHP] dns lookups only half working in chroot

2009-09-09 Thread Samuel Vogel
Hey guys, I am cross-posting this to the PHP and the PHP-FPM lists, because both are applicable in my opinion. I have got a strange problem with my php-fpm chrooted PHP environment. PHP is chrooted to /var/www/. /var/www/etc looks like this: # ls -al /var/www/etc/ insgesamt 20 drwxr-xr-x 2 ro

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Ben Dunlap
> The object only exists for that instance of the script, so when the user > navigates to the next page, the object is freed up from the memory. > There are a couple of ways you could get round this: > >      * don't navigate away from the page, and use AJAX calls to update >        parts of the pa

Re: [PHP] script failing at same line

2009-09-09 Thread Ben Dunlap
> > My solution was to add a table to my database, and add an insert job id > into the table after the line that is causing the problem. When I submit the > script I use setTimeout to run an AJAX query of the table 5 seconds later. > If the line has failed the job id will not be in the table and I

Re: Fwd: [PHP] Re: Class variable value lost

2009-09-09 Thread Shawn McKenzie
Sumit Sharma wrote: > What I have done is declared one User class in a separate file and created > its object there only. After this included this file in all other file which > are using its object. So the object is creating only once and included in > every other file only once. Now when I over w

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Martin Scotta
On Wed, Sep 9, 2009 at 12:58 PM, Sumit Sharma wrote: > What I have done is declared one User class in a separate file and created > its object there only. After this included this file in all other file > which > are using its object. So the object is creating only once and included in > every ot

RE: [PHP] preg_match()

2009-09-09 Thread Jan Reiter
Thanks! Thats about what I'm doing right now. function parse_prim_states($in) { preg_match('@prim_states[\s]*\((?[0-9\s]*)@' ,$in , $matches); $this->num_prim_states = (int)$matches['number']; preg_match_all('@prim_state[\s]*\((?[a-fA-F0-

[PHP] Re: preg_match()

2009-09-09 Thread Shawn McKenzie
Jan Reiter wrote: > Good Afternoon. > > > > This shouldn't be too complicated, but I can't come up with a solution for > the problem right now. It's about RegEx in PHP (5.2) > > > > Is there a way to capture ALL sub elements of an expression like > preg_match('@a(?[0-9])*b@' ,"a2345678b" ,

RE: [PHP] preg_match()

2009-09-09 Thread Jan Reiter
Not quite, I'm sorry. As the outer expression prim_states( [...] ) captures, the repetitive elements inside prim_state( [...] ) overwrite each other in the matches array. Of course I could get the first entry in matches, and search it again with preg_match_all(), but that is what I'm trying to avo

Re: [PHP] preg_match()

2009-09-09 Thread Ashley Sheridan
On Wed, 2009-09-09 at 18:18 +0200, Jan Reiter wrote: > Good Afternoon. > > > > This shouldn't be too complicated, but I can't come up with a solution for > the problem right now. It's about RegEx in PHP (5.2) > > > > Is there a way to capture ALL sub elements of an expression like > preg_ma

[PHP] preg_match()

2009-09-09 Thread Jan Reiter
Good Afternoon. This shouldn't be too complicated, but I can't come up with a solution for the problem right now. It's about RegEx in PHP (5.2) Is there a way to capture ALL sub elements of an expression like preg_match('@a(?[0-9])*b@' ,"a2345678b" , $matches); ?? This would produce (bel

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Tony Marston
You need to look at "disable_output_escaping" at http://www.w3.org/TR/xslt#disable-output-escaping -- Tony Marston http://www.tonymarston.net http://www.radicore.org "Matthew Croud" wrote in message news:2c4840c2-45db-4d6c-b5fa-2cb15b171...@obviousdigital.com... > > On 9 Sep 2009, at 14:26, B

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Ashley Sheridan
On Wed, 2009-09-09 at 16:51 +0100, Matthew Croud wrote: > On 9 Sep 2009, at 16:37, Ashley Sheridan wrote: > > > On Wed, 2009-09-09 at 15:14 +0100, Matthew Croud wrote: > >> On 9 Sep 2009, at 15:09, Ashley Sheridan wrote: > >> > >>> On Wed, 2009-09-09 at 14:46 +0100, Matthew Croud wrote: > On

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Andrew Ballard
On Wed, Sep 9, 2009 at 11:58 AM, Sumit Sharma wrote: > What I have done is declared one User class in a separate file and created > its object there only. After this included this file in all other file which > are using its object. So the object is creating only once and included in > every other

Fwd: [PHP] Re: Class variable value lost

2009-09-09 Thread Sumit Sharma
What I have done is declared one User class in a separate file and created its object there only. After this included this file in all other file which are using its object. So the object is creating only once and included in every other file only once. Now when I over write its variable it value g

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Matthew Croud
On 9 Sep 2009, at 16:37, Ashley Sheridan wrote: On Wed, 2009-09-09 at 15:14 +0100, Matthew Croud wrote: On 9 Sep 2009, at 15:09, Ashley Sheridan wrote: On Wed, 2009-09-09 at 14:46 +0100, Matthew Croud wrote: On 9 Sep 2009, at 14:36, Bob McConnell wrote: From: Bastien Koert On Wed, Sep 9,

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Ashley Sheridan
On Wed, 2009-09-09 at 10:36 -0500, Shawn McKenzie wrote: > Sumit Sharma wrote: > > Hi, > > > > I have developed a listing site which is totally class based. Now when it > > authenticates a user login and set appropriate class variables to true and > > set user info in user class variables, value o

[PHP] Re: Class variable value lost

2009-09-09 Thread Shawn McKenzie
Sumit Sharma wrote: > Hi, > > I have developed a listing site which is totally class based. Now when it > authenticates a user login and set appropriate class variables to true and > set user info in user class variables, value of all the set variables are > lost when I forward the user to members

[PHP] Class variable value lost

2009-09-09 Thread Sumit Sharma
Hi, I have developed a listing site which is totally class based. Now when it authenticates a user login and set appropriate class variables to true and set user info in user class variables, value of all the set variables are lost when I forward the user to members page. When I check the the valu

Re: [PHP] Renaming a Directory

2009-09-09 Thread Lupus Michaelis
Paul M Foster a écrit : I would have thought so, but the man pages didn't mention it. I haven't use mv in ages. Makes sense that it would work, though. Moving/renaming a file would just change the name, not the inode number, which is the real key to *nix file systems. Ashley said it, a direc

Re: [PHP] mysql user session handler

2009-09-09 Thread Tom Worster
good point, gabriel. i really need to stop procrastinating with the whole memcache project. perhaps i ought to postpone consideration of the session handler until i've learned something about memcache, which i need to do anyway. On 9/8/09 10:06 PM, "Gabriel Sosa" wrote: > I'm our case we opt f

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Ashley Sheridan
On Wed, 2009-09-09 at 14:46 +0100, Matthew Croud wrote: > On 9 Sep 2009, at 14:36, Bob McConnell wrote: > > > From: Bastien Koert > >> On Wed, Sep 9, 2009 at 5:27 AM, Matthew > >> Croud wrote: > >>> > >>> Hiya, > >>> I'm writing an app that let's my client upload images, the image > >>> html c

Re: [PHP] Renaming a Directory

2009-09-09 Thread Tom Worster
On 9/9/09 12:08 AM, "Paul M Foster" wrote: > On Tue, Sep 08, 2009 at 05:39:43PM -0400, Floyd Resler wrote: > >> How can I rename a directory with files in it? The rename function >> gives me a "directory not empty" error. I know I could do it be >> creating the directory, moving the files, and

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Matthew Croud
On 9 Sep 2009, at 14:36, Bob McConnell wrote: From: Bastien Koert On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croud wrote: Hiya, I'm writing an app that let's my client upload images, the image html code is added to an XML file. Take a look at the element below: e1022 Blue Ski T

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 9:33 AM, Matthew Croud wrote: > > On 9 Sep 2009, at 14:26, Bastien Koert wrote: > >> On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croud >> wrote: >>> >>> Hiya, >>> I'm writing an app that let's my client upload images, the image html >>> code >>> is added to an XML file. >>> Take

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Matthew Croud
On 9 Sep 2009, at 14:26, Bastien Koert wrote: On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croud wrote: Hiya, I'm writing an app that let's my client upload images, the image html code is added to an XML file. Take a look at the element below: e1022 Blue Ski Trousers 8.99 No

RE: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Bob McConnell
From: Bastien Koert > On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croud wrote: >> >> Hiya, >> I'm writing an app that let's my client upload images, the image html code >> is added to an XML file. >> Take a look at the element below: >> >> >>    e1022 >>     >>    Blue Ski Trousers >>    8.99 >>   >>

Re: [PHP] mysql user session handler

2009-09-09 Thread Tom Worster
On 9/9/09 4:16 AM, "Ford, Mike" wrote: >> -Original Message- >> From: Tom Worster [mailto:f...@thefsb.org] >> Sent: 09 September 2009 02:29 >> >> thanks, Devendra, that's pretty much the same as my handler. (though >> i can't >> figure Rich Smith's $sess_save_path global. do you know wha

Re: [PHP] Renaming a Directory

2009-09-09 Thread Paul M Foster
On Wed, Sep 09, 2009 at 12:11:14AM -0400, Eddie Drapkin wrote: > On Wed, Sep 9, 2009 at 12:08 AM, Paul M Foster wrote: > > On Tue, Sep 08, 2009 at 05:39:43PM -0400, Floyd Resler wrote: > > > >> How can I rename a directory with files in it?  The rename function > >> gives me a "directory not empty

Re: [PHP] XML. Prevent < from turning into <

2009-09-09 Thread Bastien Koert
On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croud wrote: > > Hiya, > I'm writing an app that let's my client upload images, the image html code > is added to an XML file. > Take a look at the element below: > > >    e1022 >     >    Blue Ski Trousers >    8.99 >   > > Now, whenever PHP writes this to

Re: [PHP] Renaming a Directory

2009-09-09 Thread Floyd Resler
Nope, nothing wrong with that at all. Just didn't think of it! Thanks! Floyd On Sep 8, 2009, at 5:46 PM, Eddie Drapkin wrote: On Tue, Sep 8, 2009 at 5:39 PM, Floyd Resler wrote: How can I rename a directory with files in it? The rename function gives me a "directory not empty" error. I

[PHP] hi, how can i join a php document translate team?

2009-09-09 Thread Hanjie Xu
thank you

[PHP] XML. Prevent < from turning into <

2009-09-09 Thread Matthew Croud
Hiya, I'm writing an app that let's my client upload images, the image html code is added to an XML file. Take a look at the element below: e1022 Blue Ski Trousers 8.99 Now, whenever PHP writes this to the XML files, it turns the < and > into < and > . which means it

Re: [PHP] Renaming a Directory

2009-09-09 Thread Ashley Sheridan
On Wed, 2009-09-09 at 00:08 -0400, Paul M Foster wrote: > On Tue, Sep 08, 2009 at 05:39:43PM -0400, Floyd Resler wrote: > > > How can I rename a directory with files in it? The rename function > > gives me a "directory not empty" error. I know I could do it be > > creating the directory, moving

RE: [PHP] mysql user session handler

2009-09-09 Thread Ford, Mike
> -Original Message- > From: Tom Worster [mailto:f...@thefsb.org] > Sent: 09 September 2009 02:29 > > thanks, Devendra, that's pretty much the same as my handler. (though > i can't > figure Rich Smith's $sess_save_path global. do you know what is > for?) I think if you look at the comment