[PHP] [Repost] Getting rid of "Web page has expired" (POSTDATA error)

2006-05-17 Thread Nicolas Verhaeghe
I am having an issue with certain pages preventing the user from going back to the previous page. The message given by Firefox is: "The page you are trying to view contains PSTDATA that has expired from cache". This happens in the case of an HTML form using the POST method but also a query obje

Re: [PHP] Converting characters

2006-05-17 Thread Martin Alterisio
2006/5/17, Jonas Rosling <[EMAIL PROTECTED]>: Hi, the PHP newbie is here again asking questions. Is there anyway in PHP to convert none international characters so the are displayed correct? In my case I have lots of data in the database with å,ä and ö. Thanks // Jonas -- PHP General Mailing L

Re: [PHP] Need help calling PHP page from another server.

2006-05-17 Thread John Hicks
Robert Filipovich wrote: I am using a chat program and trying to call the status page from another server and the graphic that the page returns does not show up. It works if you are calling from the webserver that the chat program is working so i feel it is some type of config problem or securit

Re: [PHP] Add Multiple Items, Qty to Cart from html form

2006-05-17 Thread Wolf
Andras, Apples Will get you where you need to go on the HTML side of things, then on the back end you need to process each array. By setting a default value of 0 for the qty, you force users to change the values, but you also keep your arrays intact and easier (IMHO) to deal with. Wolf Andra

Re: [PHP] 404 After Setting session.save_path to /tmp

2006-05-17 Thread Chris
Mark Sargent wrote: Chris wrote: There's your problem. service httpd restart will most likely restart /usr/sbin/httpd. That's not the same as /usr/local/apache2 Remove the rpm to save confusion next time: rpm -e httpd then when you need to restart, always use the /usr/local/apache2/bin/a

Re: [PHP] 404 After Setting session.save_path to /tmp

2006-05-17 Thread Mark Sargent
Chris wrote: There's your problem. service httpd restart will most likely restart /usr/sbin/httpd. That's not the same as /usr/local/apache2 Remove the rpm to save confusion next time: rpm -e httpd then when you need to restart, always use the /usr/local/apache2/bin/apachectl file. Hi All

Re: [PHP] 404 After Setting session.save_path to /tmp

2006-05-17 Thread Chris
Mark Sargent wrote: Chris wrote: Sounds like you're using the wrong script to restart apache. What command are you using? service httpd restart Rebooting will most likely pick up the /etc/init.d/apache or /etc/init.d/httpd script. Have this in /etc/rc.local on Fedora 5, startApache=/us

[PHP] Add Multiple Items, Qty to Cart from html form

2006-05-17 Thread Andras Kende
Hello, I trying to add multiple items to a shopping cart with selectable quantity and price form text field like.. apple : qty: [__] price: [__] orange : qty: [__] price: [__] I could add multiple items with checkboxes but without selecting quantity and price.. if (isset($_POST['item

[PHP] Need help calling PHP page from another server.

2006-05-17 Thread Robert Filipovich
I am using a chat program and trying to call the status page from another server and the graphic that the page returns does not show up. It works if you are calling from the webserver that the chat program is working so i feel it is some type of config problem or security issue. http://www.hidho

Re: [PHP] Converting characters

2006-05-17 Thread Ligaya Turmelle
Jonas Rosling wrote: Hi, the PHP newbie is here again asking questions. Is there anyway in PHP to convert none international characters so the are displayed correct? In my case I have lots of data in the database with å,ä and ö. Thanks // Jonas Have you looked at the mbstring or iconv extensio

RE: [PHP] Warning: chmod(): Operation not permitted ?

2006-05-17 Thread Brady Mitchell
> "chmod() can only change the permissions of files that are owned by > the user running the command. In most cases, this is the user that > the web server runs on." > > That confuses me, because who's the user here? Is it just the system > administrator or the application? This is the user th

Re: [PHP] Warning: chmod(): Operation not permitted ?

2006-05-17 Thread tedd
At 11:18 AM -0400 5/17/06, John Nichel wrote: tedd wrote: Hi (please insert your preference): This should be simple, but I'm having problems. I have a program that uploads an image file and then tries to set the permissions for the image (to be altered later). However, I get a "Warning: chmo

[PHP] Getting rid of "Web page has expired" (POSTDATA error)

2006-05-17 Thread Nicolas Verhaeghe
I am having an issue with certain pages preventing the user from going back to the previous page. The message given by Firefox is: "The page you are trying to view contains PSTDATA that has expired from cache". This happens in the case of an HTML form using the POST method but also a query object

Re: [PHP] Fast search

2006-05-17 Thread Robert Cummings
On Wed, 2006-05-17 at 16:38, Robin Vickery wrote: > On 17/05/06, René Fournier <[EMAIL PROTECTED]> wrote: > > Looking for suggestions on the most compute-efficient way to search > > variable-length strings (~200 characters) for the occurrence of one > > of about 100 possible needles. In other words

[PHP] Simple XML array count??

2006-05-17 Thread Jay Paulson
I'm using SimpleXML to go through a Google search result and I'm not quite understanding something. The variable $xml->RES->R is an array of 9 items and each item is an object containing information (see var dump below). So when I try to do count($xml->RES->R); it returns a number or 1 instead a

Re: [PHP] Fast search

2006-05-17 Thread Evan Priestley
You can make a pretty effective time/memory tradeoff -- particularly if your array of patterns is relatively fixed -- but unless you re- implement this in C, it will probably be slower than a brute force approach with the str* functions unless you are searching for a fairly huge number of ne

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Kevin Murphy
I did something similar recently. Basically I have one MySQL field to handle several dozen checkboxes, my situation though was where the checkboxes are numerically sequential though so I am not sure if this helps. I also had only a couple hours to do this from start to finish so I am sure t

Re: [PHP] Fast search

2006-05-17 Thread Robin Vickery
On 17/05/06, René Fournier <[EMAIL PROTECTED]> wrote: Looking for suggestions on the most compute-efficient way to search variable-length strings (~200 characters) for the occurrence of one of about 100 possible needles. In other words: $needles = array ( 1 => "Hello Jim" , 2 => "Yellow Ban

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Jochem Maas
Martin Alterisio wrote: 2006/5/17, Rahul S. Johari <[EMAIL PROTECTED]>: ... You should consider using MySQL special column type SET: http://dev.mysql.com/doc/refman/5.1/en/set.html Or encoding each checkbox status as a binary bit in an integer I was going to suggest this also- if n

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Martin Alterisio
2006/5/17, Rahul S. Johari <[EMAIL PROTECTED]>: Ave, I¹m a little confused as to what¹s the best way to handle this. I have a form which, apart from lots of other fields, has a set of 25 ­ 30 Check Boxes, each of which asks the user for some kind of information which the user can check or leave

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Brad Bonkoski
Well, listing all the values in a comma separated list in the DB would be fairly simple to parse, check out: http://www.php.net/manual/en/function.explode.php As far as what is better depends on many things... 1). Maintaining the code, might be better to have each check box have its own field,

[PHP] Handling Large Check Box Data

2006-05-17 Thread Rahul S. Johari
Ave, I¹m a little confused as to what¹s the best way to handle this. I have a form which, apart from lots of other fields, has a set of 25 ­ 30 Check Boxes, each of which asks the user for some kind of information which the user can check or leave unchecked. The information each Check Box collects

Re: [PHP] Regex Help for URL's

2006-05-17 Thread Kevin Waterson
This one time, at band camp, "Robert Samuel White" <[EMAIL PROTECTED]> wrote: > Don't be rude. I've already don't all of that. Nothing came up. I've been > programming for 20 years (since I was 11 years old) so I'm not a slacker > when it comes to learning new things, however, I have always fou

Re: [PHP] Security Concerns with Uploaded Images:

2006-05-17 Thread Richard Collyer
Richard Lynch wrote: On Mon, May 15, 2006 1:58 am, Jason Wong wrote: 2) the uploaded file is a "script" (perl/php/python/etc) In the case of (2), if the script relies on its shebang line to execute Not necessarily -- What if I upload an "image" file named "badscript.php" and then I surf to

Re: [PHP] Ajax (xmlHttpRequest) and session_start() problem.

2006-05-17 Thread Mathijs
Thank you very much :D. Ill just create an class which will handle this :). It works like a charm.. Thx. Thomas Munz wrote: session_write_close(); Ex: session_start(); $asdf = $_SESSION; //-- get all datas session_write_close(); //-- close session on Wednesday 17 May 2006 16:36, Mathijs wr

Re: [PHP] Security Concerns with Uploaded Images:

2006-05-17 Thread Jason Wong
On Tuesday 16 May 2006 07:45, Richard Lynch wrote: > On Mon, May 15, 2006 1:58 am, Jason Wong wrote: > > 2) the uploaded file is a "script" (perl/php/python/etc) > > > > In the case of (2), if the script relies on its shebang line to > > execute > > Not necessarily -- What if I upload an "image" fi

Re: [PHP] Warning: chmod(): Operation not permitted ?

2006-05-17 Thread John Nichel
tedd wrote: Hi (please insert your preference): This should be simple, but I'm having problems. I have a program that uploads an image file and then tries to set the permissions for the image (to be altered later). However, I get a "Warning: chmod(): Operation not permitted" error when trying

Re: [PHP] Warning: chmod(): Operation not permitted ?

2006-05-17 Thread Jochem Maas
tedd wrote: Hi GANG: :-) This should be simple, but I'm having problems. I have a program that uploads an image file and then tries to set the permissions for the image (to be altered later). However, I get a "Warning: chmod(): Operation not permitted" error when trying to set the permis

[PHP] Warning: chmod(): Operation not permitted ?

2006-05-17 Thread tedd
Hi (please insert your preference): This should be simple, but I'm having problems. I have a program that uploads an image file and then tries to set the permissions for the image (to be altered later). However, I get a "Warning: chmod(): Operation not permitted" error when trying to set the

Re: [PHP] Ajax (xmlHttpRequest) and session_start() problem.

2006-05-17 Thread Thomas Munz
session_write_close(); Ex: session_start(); $asdf = $_SESSION; //-- get all datas session_write_close(); //-- close session on Wednesday 17 May 2006 16:36, Mathijs wrote: > Robert Cummings wrote: > > On Wed, 2006-05-17 at 10:11, Mathijs wrote: > >> I Have an very strange problem. > >> > >> When

Re: [PHP] Ajax (xmlHttpRequest) and session_start() problem.

2006-05-17 Thread Mathijs
Robert Cummings wrote: On Wed, 2006-05-17 at 10:11, Mathijs wrote: I Have an very strange problem. When i execute an very simple Ajax request to an PHP script wich just print one line and i put an sleep(20) infront of it, it works perfectly when i refresh the page. BUT.. When i put session_

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Jochem Maas
Jay Blanchard wrote: [snip] I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. [/snip] Without seeing any code or table

Re: [PHP] Ajax (xmlHttpRequest) and session_start() problem.

2006-05-17 Thread Robert Cummings
On Wed, 2006-05-17 at 10:11, Mathijs wrote: > I Have an very strange problem. > > When i execute an very simple Ajax request to an PHP script wich just > print one line and i put an sleep(20) infront of it, it works perfectly > when i refresh the page. > > BUT.. > When i put session_start() at

[PHP] Ajax (xmlHttpRequest) and session_start() problem.

2006-05-17 Thread Mathijs
I Have an very strange problem. When i execute an very simple Ajax request to an PHP script wich just print one line and i put an sleep(20) infront of it, it works perfectly when i refresh the page. BUT.. When i put session_start() at the top, i can't refresh the page anymore. It won't refres

RE: [PHP] Security Concerns with Uploaded Images:

2006-05-17 Thread George Pitcher
> On Mon, May 15, 2006 1:58 am, Jason Wong wrote: > > 2) the uploaded file is a "script" (perl/php/python/etc) > > > In the case of (2), if the script relies on its shebang line to > > execute > > Not necessarily -- What if I upload an "image" file named > "badscript.php" and then I surf to it, aft

Re: [PHP] Security Concerns with Uploaded Images:

2006-05-17 Thread Rory Browne
On 5/16/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Mon, May 15, 2006 1:58 am, Jason Wong wrote: > 2) the uploaded file is a "script" (perl/php/python/etc) > In the case of (2), if the script relies on its shebang line to > execute Not necessarily -- What if I upload an "image" file named

Re: [PHP] 404 After Setting session.save_path to /tmp

2006-05-17 Thread Ron Clark
Mark Sargent wrote: Chris wrote: Big security issue - don't do it. >ps au | grep apache root /usr/sbin/apache htdocs /usr/sbin/apache htdocs /usr/sbin/apache My apache is running as "htdocs". So as root create a temp folder and chown it to "htdocs": mkdir /my_temp

Re: [PHP] Regex Help for URL's [ANSWER]

2006-05-17 Thread Edward Vermillion
On May 16, 2006, at 7:53 PM, Chrome wrote: -Original Message- From: Robert Samuel White [mailto:[EMAIL PROTECTED] Sent: 17 May 2006 01:42 To: php-general@lists.php.net Subject: RE: [PHP] Regex Help for URL's [ANSWER] That's what I was doing. I was parsing A:HREF, IMG:SRC, etc. But

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Alister Bulman
On 17/05/06, Dave Goodchild <[EMAIL PROTECTED]> wrote: I have a site that is getting 30K+ traffic daily and it is smashing mySQL - > any ideas on what to do to make the mysql connections more efficient, or > anything in general. No bandwidth issue here, just the server getting > killed. > > ...I

RE: [PHP] Re : a searching problem in lists

2006-05-17 Thread Jim Moseby
> > Oops, sorry for my last mail. Not the good mailing-list :-) > Au contraire. This *IS* the good mailing list. Just not the *right* one. ;-) JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Jay Blanchard
[snip] I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. [/snip] Without seeing any code or table information my bet woul

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Angelo Zanetti
perhaps post some code so we can look at how you doing your queries... HTH Angelo Zanetti Z Logic www.zlogic.co.za [c] +27 72 441 3355 [t] +27 21 469 1052 [f] +27 86 681 5885 Dave Goodchild wrote: I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what t

Re: [PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Dave Goodchild
I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. ...I may be wrong but using persistent connections (mysql_pconnect) m

[PHP] PHP and mySQL getting smashed...

2006-05-17 Thread Russell Jones
I have a site that is getting 30K+ traffic daily and it is smashing mySQL - any ideas on what to do to make the mysql connections more efficient, or anything in general. No bandwidth issue here, just the server getting killed. Thanks

Re: [PHP] PHP daemons

2006-05-17 Thread Martin Marques
On Tue, 16 May 2006, Richard Lynch wrote: On Tue, May 16, 2006 6:27 am, Martin Marques wrote: In the first daemon all I have to do to kill it is execute a pkill server_name. But with the new daemon (the object orientaded one) it doesn't die. After you pkill it, does it still work? Yes, I c

[PHP] Re: Converting characters

2006-05-17 Thread Barry
Jonas Rosling schrieb: Hi, the PHP newbie is here again asking questions. Is there anyway in PHP to convert none international characters so the are displayed correct? In my case I have lots of data in the database with å,ä and ö. Thanks // Jonas displayed where? in html with htmlentities. othe

[PHP] Converting characters

2006-05-17 Thread Jonas Rosling
Hi, the PHP newbie is here again asking questions. Is there anyway in PHP to convert none international characters so the are displayed correct? In my case I have lots of data in the database with å,ä and ö. Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: A searching problem in lists

2006-05-17 Thread Barry
[EMAIL PROTECTED] schrieb: Hello, I'm not a Perl guru so I (still) have problems :-) And this is not a Perl mailinglist so we have the same problem :) -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] Re : a searching problem in lists

2006-05-17 Thread mickb
Oops, sorry for my last mail. Not the good mailing-list :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] A searching problem in lists

2006-05-17 Thread mickb
Hello, I'm not a Perl guru so I (still) have problems :-) I use the following date structure, quite "classic" : a list of lists. I have two instances of this structure, let's take a simple example : list 1 : [ [toto,tata],[toto,titi] ] list 2 : [ [toto,tutu],[tata,titi],[toto,titi] ] My question

Re: [PHP] 404 After Setting session.save_path to /tmp

2006-05-17 Thread Mark Sargent
Chris wrote: Sounds like you're using the wrong script to restart apache. What command are you using? service httpd restart Rebooting will most likely pick up the /etc/init.d/apache or /etc/init.d/httpd script. Have this in /etc/rc.local on Fedora 5, startApache=/usr/local/apache2/bin/apac

Re: [PHP] 404 After Setting session.save_path to /tmp

2006-05-17 Thread Chris
Mark Sargent wrote: Chris wrote: Big security issue - don't do it. >ps au | grep apache root /usr/sbin/apache htdocs /usr/sbin/apache htdocs /usr/sbin/apache My apache is running as "htdocs". So as root create a temp folder and chown it to "htdocs": mkdir /my_temp

Re: [PHP] Narorwed down my problem to one statement:

2006-05-17 Thread Paul Novitski
At 09:38 PM 5/16/2006, John Meyer wrote: $sql = "INSERT INTO BOOKS(CopyrightYear,CoverType,DatePurchased,EditionNumber,ISBNNumber,Notes,Pages,Publisher,LOCNumber) VALUES(\"" . $_POST["copyrightyear"] . "\",\"" . $_POST["covertype"] . "\",\"" . $_POST["datepurchased"] . "\"," . $_POST["edition

Re: [PHP] 404 After Setting session.save_path to /tmp

2006-05-17 Thread Mark Sargent
Chris wrote: Big security issue - don't do it. >ps au | grep apache root /usr/sbin/apache htdocs /usr/sbin/apache htdocs /usr/sbin/apache My apache is running as "htdocs". So as root create a temp folder and chown it to "htdocs": mkdir /my_temp_dir chown htdocs. /my