RE: [PHP] session_register()
Jennifer, I could be wrong but this is what I think you have; When the session_register is executed the session contents are partially updated. Your first test actually executed the session_register that posted the variable with 0 string length, because the variable had not yet been initialized (the bad return is the only indication of this). Your test that the variable is registered would seem to suggest this. You then changed the variable value and failed to register this new value. The second page found the only value you registered (the uninitialized variable with zero length) and displayed that. You can identify what actually happened by viewing the session file contents after your two pages are displayed. hope this helps, Warren Vail -Original Message- From: Jennifer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 10:55 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] session_register() Johnson, Kirk wrote: -Original Message- From: Jennifer [mailto:[EMAIL PROTECTED]] Do you need to register a variable with the session before you assign it a value? Not in my experience. session_register should return true if the variable was successfully registered? It returns 1. The variable name and it's value should be written to the file with the same name as session_id()? Yes, here's a sample from a session file: superUser|s:3:Yes; Here's a sample session filename: sess_01bc2e24aa5291300887948f0af74899 This is all what I thought, but I am still having problems and I don't have a clue what I am missing. Here's an example that I have been paying with for testing. page1.php contains ?php session_start(); echo session id is .session_id().br\n; if (session_register(testing)) { echo session_register worked.br\n; } else { echo session_register did not workbr\n; } if (session_is_registered(testing)) { echo testing is a registered variablebr\n; } else { echo testing is not a registered variablebr\n; } $testing = Let's see if this works.; ? a href=page2.php??=SID?Go to next page./a The output of the above page, gives me session id is e35c2893382e28a14fa0455302edb06e session_register did not work testing is a registered variable Go to next page. and page2.php contains ?php session_start(); echo session id is .session_id().br\n; echo Testing: $testingbr\n; ? The output of page2 gives me session id is e35c2893382e28a14fa0455302edb06e Testing: I am totally confused. First off, why isn't it registering the variable? There is a file named e35c2893382e28a14fa0455302edb06e in my /tmp directory, but it is empty. Second, if it isn't registering the variable then why is session_is_registered(testing) returning true? Jennifer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HI
On Thursday 03 May 2001 09:55, Jorge Amaya wrote: I am new user of php, I have installed apache 1.3.x, php3 and mysql, but I have a problem, My navigator doesn't recognize the files of php3, that why install php3, not php4 ? is to say it doesn't work me php in the navigator, I have configured such and like says the manual in php.ini and also in the directives of make sure the httpd.conf / apache.conf have the following datas LoadModule php4_modulelibexec/libphp4.so or one with php3 pointing to a existing resource. DirectoryIndex index.php index.html or .php3, .phtml etc and AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .phps or for php4 AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps now the apache help files might be needed to fully understand what this does in case you wonders. -- php developer / CoreTrek AS| The skater, Barbara Ann Scott Is so Sandnes / Rogaland / Norway| fuckingly winsome a snot, That when web: http://www.moijk.net/ | posed on her toes She elaborately shows -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_register()
Warren Vail wrote: When the session_register is executed the session contents are partially updated. Your first test actually executed the session_register that posted the variable with 0 string length, because the variable had not yet been initialized (the bad return is the only indication of this). Ok. I changed the script below to set the variable before registering it and it makes no difference to the output. You can identify what actually happened by viewing the session file contents after your two pages are displayed. I mentioned that already. The file is empty. Jennifer Johnson, Kirk wrote: -Original Message- From: Jennifer [mailto:[EMAIL PROTECTED]] Do you need to register a variable with the session before you assign it a value? Not in my experience. session_register should return true if the variable was successfully registered? It returns 1. The variable name and it's value should be written to the file with the same name as session_id()? Yes, here's a sample from a session file: superUser|s:3:Yes; Here's a sample session filename: sess_01bc2e24aa5291300887948f0af74899 This is all what I thought, but I am still having problems and I don't have a clue what I am missing. Here's an example that I have been paying with for testing. page1.php contains ?php session_start(); echo session id is .session_id().br\n; if (session_register(testing)) { echo session_register worked.br\n; } else { echo session_register did not workbr\n; } if (session_is_registered(testing)) { echo testing is a registered variablebr\n; } else { echo testing is not a registered variablebr\n; } $testing = Let's see if this works.; ? a href=page2.php??=SID?Go to next page./a The output of the above page, gives me session id is e35c2893382e28a14fa0455302edb06e session_register did not work testing is a registered variable Go to next page. and page2.php contains ?php session_start(); echo session id is .session_id().br\n; echo Testing: $testingbr\n; ? The output of page2 gives me session id is e35c2893382e28a14fa0455302edb06e Testing: I am totally confused. First off, why isn't it registering the variable? There is a file named e35c2893382e28a14fa0455302edb06e in my /tmp directory, but it is empty. Second, if it isn't registering the variable then why is session_is_registered(testing) returning true? Jennifer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Working with numbers
I have a shopping cart that allows decimal points for quantities. I like it like that, but would like to remove any trailing zeros and if the quantity is not a fraction I would like to remove the decimal point too. What would be the easiest way to do this? I don't see any function that would make it easy. Jennifer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how?
hello. i read from a text file a line like: Key=$value so, i do like: $lines = join('', file(myfile.txt)); echo $lines; // output= Key=$value Now how can i replace the values in the $lines variables? i want like: $value = test; echo $lines; and i want ouput like: Key=test any idea? -elias http://eassoft.cjb.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Decimal to Ascii
Hi there, Is this what you want? $a = chr(23); which should give you ctrl+W in $a. Rudolf Visagie QEDI -Original Message- From: Wee Chua [mailto:[EMAIL PROTECTED]] Sent: 02 May 2001 08:08 To: PHP (E-mail) Subject: [PHP] Decimal to Ascii Hi all, Can i convert decimal 23 to ascii in PHP? Thanks. Calvin Chua Systems Analyst InterClean Equipment, Inc. 734-975-2967 www.InterClean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Reading mime attachments into a rdbms
Good morning, I've been trying to find out how to use IMAP to read attachments from the MIME E-Mail and save them on the filesystem and later transfer them into a RDBMS, the problem I have at the moment is that I have no clue what so ever how to do this, I've tried using imap_headerinfo and other imap_command to check if anything show up in the given ARRAY or OBJECT that will show that the mail contains an attachment. But I havn't been able to do this so far. I bet there are hundreds of you out there that probably has done that same thing that could help me and guide me to what I should look for, this is in a bit of a hurry. And since I've been trying to solve this problem myself and tried not to bother the list with this, I really do need the help now. So, if anyone could spare a few minutes of their time and give me some guidelines, I would really love it. I know that I should look for #$message .= (Content-Disposition: attachment; filename=) in some way, but I don't know how, or where to go from there. Thanks in advance, // Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] is this the correct way to use round function?
Is this the correct way to use round function with 2 decimal? $x = round((44.057/2.545),2); cheers? Jack [EMAIL PROTECTED] There is nothing more rewarding than reaching the goal you set for yourself
RE: [PHP] How to catch the output of http:// - text file?
Thanks, When I try: ? $lines = join('', file(http://www.ansilion.com;)); echo $lines; ? I get the following error: Warning: file(http://www.ansilion.com;) - No error in c:\program files\nusphere\apache\htdocs\test.php on line 2 Warning: Bad arguments to join() in c:\program files\nusphere\apache\htdocs\test.php on line 2 Huh!?!?! Simon. -Original Message- From: elias [mailto:[EMAIL PROTECTED]] Sent: donderdag 3 mei 2001 1:29 To: [EMAIL PROTECTED] Subject: Re: [PHP] How to catch the output of http:// - text file? Never tried what i'll write you, but it should work though! for ($i=0;$i2000;$i++) { $lines = join('', file(http://www.mysite.com/generator.php?id=$i)); // save $lines to a file. } -elias http://eassoft.cjb.net Kraa de Simon [EMAIL PROTECTED] wrote in message C1EBEEBBB842D411B412949A1F5875867A@wwmessd135">news:C1EBEEBBB842D411B412949A1F5875867A@wwmessd135... Hi, PHP newbie. Can anyone help me with the following? Pseudo code: for(i=1;i2000;i++) { catch the output of http://www.mysite.com/kb.html?kbid= ? echo i ? and put the html code in a text file called /www/kb/kbid ? echo i ? .html } So the end result is 2000 html files on disk extacted from the http:// address... Thanks... Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] --- Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b SCO UnixWare 7.1.1, Progress 9.1a11 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How to catch the output of http:// - text file?
I'm on Windows 2000, Apache 1.3.12 / PHP 4.0.4pl1 and MySQL 3.23.32. -Original Message- From: Kraa de Simon [mailto:[EMAIL PROTECTED]] Sent: donderdag 3 mei 2001 10:20 To: 'elias'; [EMAIL PROTECTED] Subject: RE: [PHP] How to catch the output of http:// - text file? Thanks, When I try: ? $lines = join('', file(http://www.ansilion.com;)); echo $lines; ? I get the following error: Warning: file(http://www.ansilion.com;) - No error in c:\program files\nusphere\apache\htdocs\test.php on line 2 Warning: Bad arguments to join() in c:\program files\nusphere\apache\htdocs\test.php on line 2 Huh!?!?! Simon. -Original Message- From: elias [mailto:[EMAIL PROTECTED]] Sent: donderdag 3 mei 2001 1:29 To: [EMAIL PROTECTED] Subject: Re: [PHP] How to catch the output of http:// - text file? Never tried what i'll write you, but it should work though! for ($i=0;$i2000;$i++) { $lines = join('', file(http://www.mysite.com/generator.php?id=$i)); // save $lines to a file. } -elias http://eassoft.cjb.net Kraa de Simon [EMAIL PROTECTED] wrote in message C1EBEEBBB842D411B412949A1F5875867A@wwmessd135">news:C1EBEEBBB842D411B412949A1F5875867A@wwmessd135... Hi, PHP newbie. Can anyone help me with the following? Pseudo code: for(i=1;i2000;i++) { catch the output of http://www.mysite.com/kb.html?kbid= ? echo i ? and put the html code in a text file called /www/kb/kbid ? echo i ? .html } So the end result is 2000 html files on disk extacted from the http:// address... Thanks... Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] --- Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b SCO UnixWare 7.1.1, Progress 9.1a11 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with Mcrypt + PHP 4.0.5
Hi, does anybody encountered problems while calling Mcrypt-commands with PHP4.0.5 (LAMP)? With 4.0.4pl1 my scripts work fine, but after updating to 4.0.5 they stop without an error-message (php.ini: error_reporting = E_ALL) when I call for example mcrypt_ecb(). After downgrading to 4.0.4pl1 everything works fine again. Greetings Stefan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Help plz!
Hello, It's a little off-topic, but this is driving me crazy! For some weird reason my IE5.5/View Source command is not working! not on any page! it's just not working! I click on it and nothing happens! Any suggestions? -elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: Sending information between pages???
if you post or get the form $choice is there for php. this is how form submission works in php. try this: ?php echo($choicebr); ? form action=# method=post select name=choice optionaaa optionbbb optionccc optionddd /select input type=submit value=default value /form wh Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -Original Message- From: Vanden Eynde Pascal [mailto:[EMAIL PROTECTED]] Sent: 02 May 2001 10:37 To: [EMAIL PROTECTED] Subject: Sending information between pages??? Hello, I have a page A with a combobox. Next to the combobox I have a link to another page (B). The idea is that I select a value in my combobox, then click the link and the value of the selected value in the combobox should be send to the page B. Is this possible with php and html? I've tried something like: select name=choice optionaaa optionbbb /select a href=B.php?var=$choice target=thisB/a but this didn't work, guess it only works if you insert a value directly in the link and not a variable. I thought of working with buttons but the problem got more complicated. Page A actually is a form (the global form), containing three comboboxes, each one with a link (to page B). The global form has a submit button which leads to page C. If I click the global forms button all the values selected in the comboboxes should be sent (easily done with sessionvariables). If I click a link then only the value of the combobox under whom the link is found should be sent to page B. I tried to make three subforms and to replace the links with a postbutton but that didn't work (guess subform don't exist cause I didn't find any information about them). So I tried something like: form action=page C method=post form action = page B method=post select name=cmbox1 optionaaa optionbbb /select input type=submit name=toB_1 /form form action = page B method=post select name=cmbox2 optionaaa optionbbb /select input type=submit name=toB_2 /form form action = page B method=post select name=cmbox3 optionaaa optionbbb /select input type=submit name=toB_3 /form input type=submit name=toC /form The idea now was when I clicked toB_1 or toB_2 or toB_3 then page B would be loaded and only one value (of the right combobox) should be sent to page B. But when I click toC then all three values should be sent to page C. My question is if there is a solution in php to solve this problem (to send those variables seperately) and so to solve the above stated problem. Thanks in advance Pascal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help plz!
hmm take it easy! i ask whetever... and you reply if you can't and don't reply at all! PS. Nothing personal too! elias. Mattias Segerdahl [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Wrong place to search for help with this kind of problem... 1) Reboot your computer 2) Call your tech support 3) Call Microsoft tech support 4) Reinstall the browser 5) Don't ever ask questions like these again // Mattias PS. Nothing personal DS. -Ursprungligt meddelande- Från: elias [mailto:[EMAIL PROTECTED]] Skickat: den 3 maj 2001 21:56 Till: [EMAIL PROTECTED] Ämne: [PHP] Help plz! Hello, It's a little off-topic, but this is driving me crazy! For some weird reason my IE5.5/View Source command is not working! not on any page! it's just not working! I click on it and nothing happens! Any suggestions? -elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: SV: [PHP] Help plz!
Whoa, take a deep breath and lets try again shall we. Elias, I have run into this prob before, but each time, it seemed to dissapear without reason. If you fancy joining a more.. liberal disscussion group, I recomend joining WDVL. It is a list for all things webby, and most computer related issues are happily sorted out by its close nit members. Mail me off list if you want more info about subscribing. I'll also ask them now for you. Don't be afriad to ask questions, if you don't ask, you'll never know. Tris... = Wrong place to search for help with this kind of problem... 1) Reboot your computer 2) Call your tech support 3) Call Microsoft tech support 4) Reinstall the browser 5) Don't ever ask questions like these again // Mattias PS. Nothing personal DS. Hello, It's a little off-topic, but this is driving me crazy! For some weird reason my IE5.5/View Source command is not working! not on any page! it's just not working! I click on it and nothing happens! Any suggestions? -elias ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] is there free php+mySql hosting?
Hi, Can anyone tell me if you can get free php+mysql hosting anywhere? Many thanks and regards, Peter Stevens Project Assistant DP - Berent APS Njalsgade 21G,5 2300 København S +45 32 64 12 00 - http://www.berent.dk http://www.berent.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] open foxpro database
Just my o.o2 cents... Isn't this table a members od database? When you use VFP 3.0 and up, VFP can change header of file to new format. So it's not compatible with old dbf file. I don't remember all operations that cause this upgrade, but including into the database will certainly do that. To be sure, that your table is 100% compatible with old dbf format, open your table in VFP, and issue copy to olddbftable TYPE FOX2X. This will save all records from the table in old file format. About the linux side, make sure, that user nobody have read permissions on that file. Apache, thus php too, runs as user nobody. hth Dezider. Benny K. Putera wrote: I used function dbase_xxx to access foxpro database (.dbf) but it's not work. Here is my code : ? if (dbase_open(/home/benny/test/employee.dbf,0)) { for ($i=1; $i=dbase_numrecords($open); $i++) { $rec = dbase_get_record($db, $i); $nf = dbase_numfields($db); for ($j=0; $j $nf; $j++) { print $rec[$j].br\n; } } } ? Everytime I call this page there's a message : Warning: unable to open database /home/benny/test/employee.dbf in /home/benny/htdocs/foxpro.php on line 2 I used php 4.0.4 and Visual Fox Pro 5.0. Before that I have mounted my foxpro dbf file to my linux in the /home/benny/test directory. Is there anything wrong? Anyone could help me? Regards; Benny. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] is there free php+mySql hosting?
sure www.f2s.com -elias http://eassoft.cjb.net Peter Stevens [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, Can anyone tell me if you can get free php+mysql hosting anywhere? Many thanks and regards, Peter Stevens Project Assistant DP - Berent APS Njalsgade 21G,5 2300 København S +45 32 64 12 00 - http://www.berent.dk http://www.berent.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.5 and PDFLib
Are there known probs with PDFLib 4.0 and PHP 4.0.5 on a WAMP-System! It doesn't work after installing PHP 4.0.5! -- phpArbeitsgruppe in Gruendung - Jochen Kaechelin Stuttgarter Str.3, D-73033 Goeppingen Tel. 07161-92 95 94, Fax 07161-92 95 98 http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Maximum execution time of 30 seconds exceeded...
Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] --- Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b SCO UnixWare 7.1.1, Progress 9.1a11 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Maximum execution time of 30 seconds exceeded...
Change the max_execution_time setting in your php.ini file. You can also do it on a per-script basis but I can't remember how OTOH - a search on the manual should find it though. HTH Jon -Original Message- From: Kraa de Simon [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 11:48 To: Php-General (E-mail) Subject: [PHP] Maximum execution time of 30 seconds exceeded... Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Maximum execution time of 30 seconds exceeded...
Never tried it though! But what if you try this: form name=myform method=post action=?=$PHP_SELF? ? if (!isset($i) $i = 0; else $i++; ? input type=hidden name=i value=?=$i? /form ? $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); ? script if (myform.i.value 1234) alert('reached max! script finished'); // stop submitting! else myform.submit(); // submit the form! /script by this you're giving each file a life time of 30secs max! meanwhile this trick can save solve your problem! -elias www.eassoft.cjb.net Kraa de Simon [EMAIL PROTECTED] wrote in message C1EBEEBBB842D411B412949A1F5875868B@wwmessd135">news:C1EBEEBBB842D411B412949A1F5875868B@wwmessd135... Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] --- Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b SCO UnixWare 7.1.1, Progress 9.1a11 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] textarea -- what happens to my new lines
I am making a e-card page, and I am having a problem with with my message box which is a textarea when I am previewing or saving/recalling the text all the newline characters are gone. Any good ideas! Thanks Lars Stampe
[PHP] Check if a variable has been posted-- HOW?
Hi everyone I'm lookign through the manual but can'f find it right now. How do I check if a variable has been created through a posted form? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Check if a variable has been posted-- HOW?
you can try if (isset($HTTP_POST_VARS['posted_variable_name'])){ // do something } -Message d'origine- De : Martin Cabrera Diaubalick [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 3 mai 2001 13:10 À : [EMAIL PROTECTED] Objet : [PHP] Check if a variable has been posted-- HOW? Hi everyone I'm lookign through the manual but can'f find it right now. How do I check if a variable has been created through a posted form? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] textarea -- what happens to my new lines
At 13:10 03.05.01 +0200, you wrote: I am making a e-card page, and I am having a problem with with my message box which is a textarea when I am previewing or saving/recalling the text all the newline characters are gone. Any good ideas! Thanks Lars Stampe Try textarea name=foo rows=10 cols=50 wrap=physical/textarea this make hard LF´s Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] maximum execution time exceeded but !connection_timeout() ???
Hi, (PHP 4.0.3pl1 on Apache/1.3.14) I hope somebody can help me. I'm at my wit's end with this one. I need to use a shutdown function that does something only if it was called due to a connection timeout. I register a shutdown fuction and provoke a timeout; the function is called. But it sees connection_status() = 0 and connection_timeout() as false. (If I click the Stop button on the browser, my shutdown function sees connection_abort = true.) The wierd thing is that the shutdown function is not called if there is no timeout and no user abort. If I could rely on this behavior that would be fine. But that is not how PHP is meant to work so I'm not willing to rely on it. I see on the screen: Fatal error: Maximum execution time of 5 seconds exceeded But inspecting connection_status() shows it is 0 and connection_timeout() is false. Here's my test code. I made it write to a file because using sqrt() and sleep() it never timed out. ?php set_time_limit(5); ignore_user_abort(0); function done() { global $i, $fp; $u=connection_status(); fputs($fp,i reached $i, connection status = $u \n); if(connection_timeout()) fputs($fp,** the connection was timed out **\n); else fputs($fp,** not timed out **\n); if(connection_aborted()) fputs($fp,** the connection was aborted **\n); else fputs($fp,** not aborted **\n); fclose($fp); } register_shutdown_function(done); $fp = fopen(logfile.txt,w); $tempout = fopen(tempout,w); $tfile=tester.zip; for($i=0; $i40; $i++) { $temp_aray=file($tfile); while (list($key, $val) = each($temp_aray)) { fwrite($tempout,$key); fwrite($tempout,$val); } fputs($fp,i is $i\n); echo $ibr\n; } fputs($fp, main: i finishes as $i\n); fclose($tempout); fclose($fp); if(connection_timeout()) echo main ** the connection was timed out **br\n; else echo main ** not timed out **br\n; $u=connection_status(); echo connection_status = $u br\n; unlink(tempout); ? John Clements . . | \_/ [EMAIL PROTECTED] +44 (0) 20 8959-8213 29 Gibbs Green, Edgware, Middx., UK HA8 9RS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Working with numbers
On Thursday 03 May 2001 08:53, Jennifer wrote: I have a shopping cart that allows decimal points for quantities. I like it like that, but would like to remove any trailing zeros and if the quantity is not a fraction I would like to remove the decimal point too. What would be the easiest way to do this? I don't see any function that would make it easy. It's so easy that you don't need a function for it :) $Qty = 12.470; $Qty_real = (double) $Qty; echo $Qty - $Qty_real; In other words - convert it from a strin to a floating-point number and PHP will do the rest. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Drink wet cement. Get stoned. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] maximum execution time exceeded but !connection_timeout() ???
Hi, (PHP 4.0.3pl1 on Apache/1.3.14) I hope somebody can help me. I'm at my wit's end with this one. I need to use a shutdown function that does something only if it was called due to a connection timeout. I register a shutdown fuction and provoke a timeout; the function is called. But it sees connection_status() = 0 and connection_timeout() as false. (If I click the Stop button on the browser, my shutdown function sees connection_abort = true.) The wierd thing is that the shutdown function is not called if there is no timeout and no user abort. If I could rely on this behavior that would be fine. But that is not how PHP is meant to work so I'm not willing to rely on it. I see on the screen: Fatal error: Maximum execution time of 5 seconds exceeded But inspecting connection_status() shows it is 0 and connection_timeout() is false. Here's my test code. I made it write to a file because using sqrt() and sleep() it never timed out. ?php set_time_limit(5); ignore_user_abort(0); function done() { global $i, $fp; $u=connection_status(); fputs($fp,i reached $i, connection status = $u \n); if(connection_timeout()) fputs($fp,** the connection was timed out **\n); else fputs($fp,** not timed out **\n); if(connection_aborted()) fputs($fp,** the connection was aborted **\n); else fputs($fp,** not aborted **\n); fclose($fp); } register_shutdown_function(done); $fp = fopen(logfile.txt,w); $tempout = fopen(tempout,w); $tfile=tester.zip; for($i=0; $i40; $i++) { $temp_aray=file($tfile); while (list($key, $val) = each($temp_aray)) { fwrite($tempout,$key); fwrite($tempout,$val); } fputs($fp,i is $i\n); echo $ibr\n; } fputs($fp, main: i finishes as $i\n); fclose($tempout); fclose($fp); if(connection_timeout()) echo main ** the connection was timed out **br\n; else echo main ** not timed out **br\n; $u=connection_status(); echo connection_status = $u br\n; unlink(tempout); ? John Clements . . | \_/ [EMAIL PROTECTED] +44 (0) 20 8959-8213 29 Gibbs Green, Edgware, Middx., UK HA8 9RS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] odbc
Hi, hope it is the right newsgroup. I have a php application which uses odbc to connect to a informix database. (NT4, Apache 1.3.x, PHP4.x) Is it advisable to turn the odbc pooling on? What else should i take care off when working with PHP and ODBC? Thanks and Greetings Claudia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Include and require
Hi There, According to the docu u should not require() files or external code in loops or u must use curly Bracket when used in if conditions. But everythink works fine. I require() successfully in for loops, I can use it in if..elseif..else constucts without curly brackets. (only one line of cause) So where is the difference between require() and include(). Has anyone a working example to show me not the same results when i replace require() with include() in his code? if thus please send this tiny example @ [EMAIL PROTECTED] Ronald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] REG_BADPAT ERROR!
what version of PHP are you running? It works for me on PHP 4.0.4pl1. (CGI) but, you may try: $pattern = quotemeta(amp;); // see quotemeta in the manual ! ereg_replace($pattern, , $url); - Original Message - From: Jason Murray [EMAIL PROTECTED] To: 'Martin Bittner-Lamy' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 2001. május 3. 07:18 Subject: RE: [PHP] REG_BADPAT ERROR! and the line 236 is: $url=ereg_replace(amp;,,$url); BADPAT probably means Bad Pattern. Try:$url=ereg_replace(\amp\;,,$url); Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Template programming
another template engines: http://phpclasses.upperdesign.com and browse for Templates! or: http://va.php.net/~andrei/tpl-engine.html http://www.phpinsider.com/php/code/Smarty/ Smarty - Original Message - From: Henrik Hansen [EMAIL PROTECTED] To: Daniel Guerrier [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 2001. május 2. 22:52 Subject: Re: [PHP] Template programming Daniel Guerrier [EMAIL PROTECTED] wrote: Where can I find detailed info on creating websites using php templates. Hardcopy or online I would reccommend fasttemplates, more information here: http://www.thewebmasters.net/php/FastTemplate.phtml -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Working with numbers
what about function round() with precision argument ? check it: for ($i = 0; $i 10; $i += 0.25) { echo round($i,2). br; } - Original Message - From: Jennifer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 3. 08:53 Subject: [PHP] Working with numbers I have a shopping cart that allows decimal points for quantities. I like it like that, but would like to remove any trailing zeros and if the quantity is not a fraction I would like to remove the decimal point too. What would be the easiest way to do this? I don't see any function that would make it easy. Jennifer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] textarea -- what happens to my new lines
Thanks for the idea, it didn't work, let me just explain a bit further! this is a simple version of the code input.htm:: form name=form method=get action=show.php textarea name=textfield cols=45 rows=5 wrap=HARD/textarea p input type=submit name=Submit value=Submit /form show.php:: ?php echo $textfield; ? When I put in : 1 2 3 4 I get: 1 2 3 4 how do I fix this ( want it to appear like it was typed!)? Regards Lars Stampe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 12:44 To: Stampe, Lars; [EMAIL PROTECTED] Subject: Re: [PHP] textarea -- what happens to my new lines At 13:10 03.05.01 +0200, you wrote: I am making a e-card page, and I am having a problem with with my message box which is a textarea when I am previewing or saving/recalling the text all the newline characters are gone. Any good ideas! Thanks Lars Stampe Try textarea name=foo rows=10 cols=50 wrap=physical/textarea this make hard LF´s Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] log analysis scripts
I'm looking for a full-featured PHP script for log file analysis. Can anyone recommend one? Thanks in advance, Paul N. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how?
On Thu, May 03, 2001 at 10:12:55AM -0700, elias wrote: hello. i read from a text file a line like: Key=$value so, i do like: $lines = join('', file(myfile.txt)); echo $lines; // output= Key=$value Now how can i replace the values in the $lines variables? i want like: $value = test; echo $lines; and i want ouput like: Key=test any idea? May not be the best way, but it works: ?php $lines = join('', file(myfile.txt)); $value = test; $lines = str_replace(\$value, $value, $lines); echo $lines; ? -- Jason Stechschulte [EMAIL PROTECTED] -- Well, enough clowning around. Perl is, in intent, a cleaned up and summarized version of that wonderful semi-natural language known as Unix. -- Larry Wall in [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how?
No, ... Actually,... I want it so generic, like myfile.txt can have like: - Welcome $username Enjoy your staying at: $site_name Mail admin. at $admin_mail for any questions... - so bascially, i don't want to do str_replace or else i could have used the sprintf() and with '%s' instead of str_replace... i even tried the eval() which should work, but it didn't, scroll down to message with Subject: $hello -elias Jason Stechschulte [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, May 03, 2001 at 10:12:55AM -0700, elias wrote: hello. i read from a text file a line like: Key=$value so, i do like: $lines = join('', file(myfile.txt)); echo $lines; // output= Key=$value Now how can i replace the values in the $lines variables? i want like: $value = test; echo $lines; and i want ouput like: Key=test any idea? May not be the best way, but it works: ?php $lines = join('', file(myfile.txt)); $value = test; $lines = str_replace(\$value, $value, $lines); echo $lines; ? -- Jason Stechschulte [EMAIL PROTECTED] -- Well, enough clowning around. Perl is, in intent, a cleaned up and summarized version of that wonderful semi-natural language known as Unix. -- Larry Wall in [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] textarea -- what happens to my new lines
okay,...now that you showed some code... basically, when you input via textarea all new lines are in the string like \n so to display them correctly in show.php do like: pre ?=$lines? /pre basically, in HTML the '\n' doesn't show you a new line, or else you can replace all the '\n' with 'br' tag! -elias www.eassoft.cjb.net Stampe, Lars [EMAIL PROTECTED] wrote in message 06D1C9FA1087D4119FC900508B95056E768ABF@eulexch1a">news:06D1C9FA1087D4119FC900508B95056E768ABF@eulexch1a... Thanks for the idea, it didn't work, let me just explain a bit further! this is a simple version of the code input.htm:: form name=form method=get action=show.php textarea name=textfield cols=45 rows=5 wrap=HARD/textarea p input type=submit name=Submit value=Submit /form show.php:: ?php echo $textfield; ? When I put in : 1 2 3 4 I get: 1 2 3 4 how do I fix this ( want it to appear like it was typed!)? Regards Lars Stampe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 12:44 To: Stampe, Lars; [EMAIL PROTECTED] Subject: Re: [PHP] textarea -- what happens to my new lines At 13:10 03.05.01 +0200, you wrote: I am making a e-card page, and I am having a problem with with my message box which is a textarea when I am previewing or saving/recalling the text all the newline characters are gone. Any good ideas! Thanks Lars Stampe Try textarea name=foo rows=10 cols=50 wrap=physical/textarea this make hard LF´s Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] textarea -- what happens to my new lines
Try this: ?php $textfield = nl2br($textfield); echo $textfield; ? For more info, have a look at http://www.php.net/nl2br. HTH Jon -Original Message- From: Stampe, Lars [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 13:35 To: [EMAIL PROTECTED] Subject: RE: [PHP] textarea -- what happens to my new lines Thanks for the idea, it didn't work, let me just explain a bit further! this is a simple version of the code input.htm:: form name=form method=get action=show.php textarea name=textfield cols=45 rows=5 wrap=HARD/textarea p input type=submit name=Submit value=Submit /form show.php:: ?php echo $textfield; ? When I put in : 1 2 3 4 I get: 1 2 3 4 how do I fix this ( want it to appear like it was typed!)? Regards Lars Stampe ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Returning Lowest Number Not In Array
Hi all: I'm hoping someone can help me out with this array problem. I'm trying to find the lowest number which is not in the array. For example: Given this array :return this: (0, 0)1 (1,0)2 (1,2,0)3 (3,0)1 (1, 3)2 Does anyone have any code, or any hints on how to go about this? I've worked on it for a few hours, and am really stuck. Thanks, Mike Mike Potter OEone Corp. http://www.oeone.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Maximum execution time of 30 seconds exceeded...
set_time_limit(n) where n is number of seconds (or 0 for no time limit) -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 5:53 AM To: 'Kraa de Simon'; Php-General (E-mail) Subject: RE: [PHP] Maximum execution time of 30 seconds exceeded... Change the max_execution_time setting in your php.ini file. You can also do it on a per-script basis but I can't remember how OTOH - a search on the manual should find it though. HTH Jon -Original Message- From: Kraa de Simon [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 11:48 To: Php-General (E-mail) Subject: [PHP] Maximum execution time of 30 seconds exceeded... Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Returning Lowest Number Not In Array
pseudo code: for($i=-1; $i count($my_array); $i++) { if (!in_array($i,$my_array)){echo $i; exit;} } should do it. Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Mike Potter [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 9:28 AM To: [EMAIL PROTECTED] Subject: [PHP] Returning Lowest Number Not In Array Hi all: I'm hoping someone can help me out with this array problem. I'm trying to find the lowest number which is not in the array. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mailing list
nope, that's not it. sorry Nikhil Richard Lynch [EMAIL PROTECTED] wrote in message 051c01c0d2e1$2f9bfb40$7a24fea9@oemcomputer">news:051c01c0d2e1$2f9bfb40$7a24fea9@oemcomputer... start sending email (this process would take many minutes). However before this script finished, another copy of the same script started, and this new copy was sending emails to the same users again. The original script continued. Result: duplicate emails Wild Guess: You are using cron and have the settings in your crontab incorrect. For example: * * * * * 0 /full/path/to/your/spam/script This would attempt to execute the script on Sundays. EVERY MINUTE, during Sunday, however. Disclaimer: I probably got the *'s and 0 mixed up a bit. I'm not a crontab expert. -- WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Reading mime attachments into a rdbms
I did a bit of research on the same subject a couple months back for an upcomming project. I still have not gotten to it so wont have to many specifics for you, but what I would recommend is NOT using php for this task. I would say your best bet, assuming a unix install, is to use procmail to filter mail and remove attachments to a given directory. Procmail will need help from something like metamail to decode the attachment and save it. Then have PHP do the work of putting the file into the DB. Just my 2 cents. Mattias Segerdahl wrote: Good morning, I've been trying to find out how to use IMAP to read attachments from the MIME E-Mail and save them on the filesystem and later transfer them into a RDBMS, the problem I have at the moment is that I have no clue what so ever how to do this, I've tried using imap_headerinfo and other imap_command to check if anything show up in the given ARRAY or OBJECT that will show that the mail contains an attachment. But I havn't been able to do this so far. I bet there are hundreds of you out there that probably has done that same thing that could help me and guide me to what I should look for, this is in a bit of a hurry. And since I've been trying to solve this problem myself and tried not to bother the list with this, I really do need the help now. So, if anyone could spare a few minutes of their time and give me some guidelines, I would really love it. I know that I should look for #$message .= (Content-Disposition: attachment; filename=) in some way, but I don't know how, or where to go from there. Thanks in advance, // Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Larry Hotchkiss Universal Capital 612-551-9309 http://www.unicap.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] textarea -- what happens to my new lines
At 14:34 03.05.01 +0200, you wrote: change wrap ! textarea name=textfield cols=45 rows=5 wrap=physical/textarea physical means pyhsical not HARD echo nl2br($textfield); //turns your nl´s in br´s That should work Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sessions and reg_globals=off
Hello, I'm having a problem getting sessions to work with register_globals=off. The following 2 files work fine if reg_globals=on but not when off. When I look at the session file it reads like this: !varA|!varB| and not like it should: varA|s:4:funk;varB|s:4:that; //-sess01.php ?php session_start(); session_register('varA'); session_register('varB'); ? form action=sess02.php first name:input type=text name=varA br last name:input type=text name=varB input type=submit value=send /form //sess02.php ?php session_start(); print($varA $varB); ? What do I have to do to make this work with register_globals off? Thank you very much for help. (If I get some time/answers I think I'm gonna design a page that shows sample scripts that work with reg_globals=on and their equivalents with reg_globals=off; this might be beneficial for some newbies--such as myself. If anybody would like to contribute, please email me and you'll be duly credited if such a project comes to fruition. Thanx!) --ahmad. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Maximum execution time of 30 seconds exceeded...
At 08:32 03.05.01 -0500, you wrote: set_time_limit(n) where n is number of seconds (or 0 for no time limit) but DO NOT SET 0 on production-servers, your ISP will, after he killed the processes, kill you :-) -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 5:53 AM To: 'Kraa de Simon'; Php-General (E-mail) Subject: RE: [PHP] Maximum execution time of 30 seconds exceeded... Change the max_execution_time setting in your php.ini file. You can also do it on a per-script basis but I can't remember how OTOH - a search on the manual should find it though. HTH Jon -Original Message- From: Kraa de Simon [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 11:48 To: Php-General (E-mail) Subject: [PHP] Maximum execution time of 30 seconds exceeded... Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problems with ifx
Hello I've got a problem using PHP under Win32 (PHP/4.0.4pl1). On my PC I use Informix-Cli 32 (for Informix Online Server 7.22C1) + Apache/1.3.12. When I want to load _php_ifx.dll_ library, it writes that it can't find such a module (but i've got php_ifx.dll) + it can not find _isqlt09a.dll_ ! I don't know where I can find this module and what it's for... All other modules work with any problem. With best regards, Oleg P.S. Thank you for the answer. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Homesite - Windows and CVS
We are working on a project that is hosted on Linux, but the development is being done on Windows using Homesite. I have looked around but haven't found any real solutions with an IDE that can work directly with a remote CVS project like MacOS's Project Builder can for example. Are there any editors/IDEs or plugins for Homesite that will allow you to use CVS (or some other Unix/Linux based versioning system) directly through the editor without using WinCVS or some other manual system to check files in and out? I have looked at Zeus SCC-CVS that supposedly will get and SCC compliant app (Homesite) to work with CVS, but I get an error early on in the process and haven't gotten it to work. Any ideas? Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sessions and reg_globals=off
When reg_globals is off, you can't access session vars just with $varA and $varB (thess variables are not set), you need to use $HTTP_SESSION_VARS['varA'] and $HTTP_SESSION_VARS['varB'] to access these variables !! -Message d'origine- De : ahmad varoqua [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 3 mai 2001 16:31 À : Php General List Objet : [PHP] sessions and reg_globals=off Hello, I'm having a problem getting sessions to work with register_globals=off. The following 2 files work fine if reg_globals=on but not when off. When I look at the session file it reads like this: !varA|!varB| and not like it should: varA|s:4:funk;varB|s:4:that; //-sess01.php ?php session_start(); session_register('varA'); session_register('varB'); ? form action=sess02.php first name:input type=text name=varA br last name:input type=text name=varB input type=submit value=send /form //sess02.php ?php session_start(); print($varA $varB); ? What do I have to do to make this work with register_globals off? Thank you very much for help. (If I get some time/answers I think I'm gonna design a page that shows sample scripts that work with reg_globals=on and their equivalents with reg_globals=off; this might be beneficial for some newbies--such as myself. If anybody would like to contribute, please email me and you'll be duly credited if such a project comes to fruition. Thanx!) --ahmad. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help plz!
Here you go mate... type in: view-source:http://www.anyurl.com and you'll see the source code. I did this in IE, but I presume it'll work in NN Good luck mate. Tris... === hmm take it easy! i ask whetever... and you reply if you can't and don't reply at all! PS. Nothing personal too! elias. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Homesite - Windows and CVS
As far as I know there's no such application. We are using WinCVS for the same purpose. I would be interested if you come accross some application that would this though. oktay -Original Message- From: Michael Stearne [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 10:18 AM To: php-general Subject: [PHP] Homesite - Windows and CVS We are working on a project that is hosted on Linux, but the development is being done on Windows using Homesite. I have looked around but haven't found any real solutions with an IDE that can work directly with a remote CVS project like MacOS's Project Builder can for example. Are there any editors/IDEs or plugins for Homesite that will allow you to use CVS (or some other Unix/Linux based versioning system) directly through the editor without using WinCVS or some other manual system to check files in and out? I have looked at Zeus SCC-CVS that supposedly will get and SCC compliant app (Homesite) to work with CVS, but I get an error early on in the process and haven't gotten it to work. Any ideas? Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php/mySql SELECT where clause using dates.
Take out the order by clause or chaqnge it. You can't order by a column you aren't selecting. - Original Message - From: Dan Eskildsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 03, 2001 10:30 AM Subject: [PHP] php/mySql SELECT where clause using dates. ***NEWBIE ALERT*** (I am only very new at this) PHP and MySQL OK - I have a table with data and one of the fields is a Date field. Now I would like to SELECT all records where the date is less that 45 days old. Eh, How do I do that? I have tried this: #Declaring variables $today=date(Y-m-d); $lastmonth = $today-30 $query = SELECT * FROM customers WHERE Site='egebjergnet' AND DatoOprettet'$lastmonth' ORDER BY FirmaNavn; AND I get an error, of course. hmmm -- == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] feof with fsockopen don't work
Hi NG, my problem is following: I've write some code like this: $sFile = fsockopen($strHost,$intPort,$intErrNum,$strError,10); if (!empty($strError)) { echo (Ein Fehler ist aufgetreten : $strError); } else { $strCommand = trim($strCommand); $strAnswer = fgets($sFile,128); fputs($sFile,$strCommand); while(!feof($sFile)) { $strAnswer = $strAnswer.BR.fgets($sFile,128); } echo($strAnswer.BR); fclose($sFile); The problem is that the while-loop never ends because feof() never be true. But the manual tell me that i can use the feof()-function with fsockopen() too. Can somebody help?? Thanks, Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php/mySql SELECT where clause using dates. ooops
i'm sorry, I looked at the wrong part. You need to use the PHP functions to convert your date to a timestamp, then subtract 30 days from it, then reconvert to a MySQL date format. Jon - Original Message - From: Jon Rosenberg [EMAIL PROTECTED] To: Dan Eskildsen [EMAIL PROTECTED] Cc: PHP General List [EMAIL PROTECTED] Sent: Thursday, May 03, 2001 10:28 AM Subject: Re: [PHP] php/mySql SELECT where clause using dates. Take out the order by clause or chaqnge it. You can't order by a column you aren't selecting. - Original Message - From: Dan Eskildsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 03, 2001 10:30 AM Subject: [PHP] php/mySql SELECT where clause using dates. ***NEWBIE ALERT*** (I am only very new at this) PHP and MySQL OK - I have a table with data and one of the fields is a Date field. Now I would like to SELECT all records where the date is less that 45 days old. Eh, How do I do that? I have tried this: #Declaring variables $today=date(Y-m-d); $lastmonth = $today-30 $query = SELECT * FROM customers WHERE Site='egebjergnet' AND DatoOprettet'$lastmonth' ORDER BY FirmaNavn; AND I get an error, of course. hmmm -- == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php/mySql SELECT where clause using dates.
Hello, maybe this could help, WHERE TO_DAYS( NOW()) - TO_DAYS( your_date_field ) = 45 py At 04:30 PM 5/3/01 +0200, you wrote: ***NEWBIE ALERT*** (I am only very new at this) PHP and MySQL OK - I have a table with data and one of the fields is a Date field. Now I would like to SELECT all records where the date is less that 45 days old. Eh, How do I do that? I have tried this: #Declaring variables $today=date(Y-m-d); $lastmonth = $today-30 $query = SELECT * FROM customers WHERE Site='egebjergnet' AND DatoOprettet'$lastmonth' ORDER BY FirmaNavn; AND I get an error, of course. hmmm -- == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] + == + Pierre-Yves Lem@ire + E-MedHosting.com + (514) 729-8100 + [EMAIL PROTECTED] + == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] is there free php+mySql hosting?
Hi try www.f2s.com Peter Stevens wrote: Hi, Can anyone tell me if you can get free php+mysql hosting anywhere? Many thanks and regards, Peter Stevens Project Assistant DP - Berent APS Njalsgade 21G,5 2300 København S +45 32 64 12 00 - http://www.berent.dk http://www.berent.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] is there free php+mySql hosting?
From the archives: The number of free PHP web hosts is growing . More and more are offering MySQL options too! Each category below is in alphabetic order. Some don't require banners : http://www.1st-home.net/ (requires affiliate signups) http://www.mycgiserver.com/ http://www.portland.co.uk/ (allows your own domain name) http://www.saxen.net/ Some do require banners AND offer FREE MySQL : http://www.f2s.net/free/free%20home.htm http://www.grandcity.net/hosting/ http://hosting.datablocks.net/free/ http://www.jumpworld.net/ http://www.nexen.net/ http://www.spaceports.com/ http://www.surecity.com/ Some do require banners (no db): http://www.netcabins.com/ http://users.destiney.com/ http://www.worldzone.net/ Some require you be Open Source and offer many services : http://www.sourceforge.net/ If you later decide to pay for your web hosting, check out : http://hosts.php.net/ As it features a searchable directory and comments from users. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]O n Behalf Of Peter Stevens Sent: Thursday, May 03, 2001 6:02 AM To: [EMAIL PROTECTED] Subject: [PHP] is there free php+mySql hosting? Hi, Can anyone tell me if you can get free php+mysql hosting anywhere? Many thanks and regards, Peter Stevens Project Assistant DP - Berent APS Njalsgade 21G,5 2300 København S +45 32 64 12 00 - http://www.berent.dk http://www.berent.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] session_register()
Jennifer, there are at least two of us totally confused. I did a copy and paste of your code and got the expected results: session id is afb1f9e27afc752f7d9e96e096ca2209 session_register worked. testing is a registered variable with the contents of /tmp/sess_afb1f9e27afc752f7d9e96e096ca2209 being: testing|s:24:Let's see if this works.; I then tried your code with register_globals = off. Interestingly, I got session_register worked even though $testing was not registered (it can't be registered with register_globals off). I see nothing wrong with your code, so... some thoughts: 1. What browser are you using? I, and others, have seen erratic results with sessions using Netscape 4.x. If this is your browser, try your code with another browser, if possible. 2. This is a longshot, but who is PHP running as? By default, it is nobody. In any case, check that whomever PHP is running as has write permission to /tmp. 3. I cannot think of any other configuration settings in php.ini that might be the trouble, since turning register_globals off does not reproduce your results. I am stumped. Kirk -Original Message- From: Jennifer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 11:55 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] session_register() Johnson, Kirk wrote: -Original Message- From: Jennifer [mailto:[EMAIL PROTECTED]] Do you need to register a variable with the session before you assign it a value? Not in my experience. session_register should return true if the variable was successfully registered? It returns 1. The variable name and it's value should be written to the file with the same name as session_id()? Yes, here's a sample from a session file: superUser|s:3:Yes; Here's a sample session filename: sess_01bc2e24aa5291300887948f0af74899 This is all what I thought, but I am still having problems and I don't have a clue what I am missing. Here's an example that I have been paying with for testing. page1.php contains ?php session_start(); echo session id is .session_id().br\n; if (session_register(testing)) { echo session_register worked.br\n; } else { echo session_register did not workbr\n; } if (session_is_registered(testing)) { echo testing is a registered variablebr\n; } else { echo testing is not a registered variablebr\n; } $testing = Let's see if this works.; ? a href=page2.php??=SID?Go to next page./a The output of the above page, gives me session id is e35c2893382e28a14fa0455302edb06e session_register did not work testing is a registered variable Go to next page. and page2.php contains ?php session_start(); echo session id is .session_id().br\n; echo Testing: $testingbr\n; ? The output of page2 gives me session id is e35c2893382e28a14fa0455302edb06e Testing: I am totally confused. First off, why isn't it registering the variable? There is a file named e35c2893382e28a14fa0455302edb06e in my /tmp directory, but it is empty. Second, if it isn't registering the variable then why is session_is_registered(testing) returning true? Jennifer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how?
On Thu, May 03, 2001 at 03:56:55PM -0700, elias wrote: No, ... Actually,... I want it so generic, like myfile.txt can have like: - Welcome $username Enjoy your staying at: $site_name Mail admin. at $admin_mail for any questions... - so bascially, i don't want to do str_replace or else i could have used the sprintf() and with '%s' instead of str_replace... i even tried the eval() which should work, but it didn't, scroll down to message with Subject: $hello I don't think you understand eval(). Either that or I don't. If I understand correctly, eval(); requires a complete PHP statement. Welcome $username is not a complete PHP statement. Why don't you just make myfile.txt a valid php file and then include it? myfile.txt.php: Welcome ?php echo $username;? Enjoy your staying at: ?php echo $site_name;? Mail admin. at ?php echo $admin_mail? for any questions... index.php: ?php $username=eddie; $site_name=stripmall; $admin_mail=[EMAIL PROTECTED]; include(myfile.txt.php); ? I'm not sure if this is what you want, but it will send this to the browser: Welcome eddie Enjoy your staying at stripmall Mail admin. at [EMAIL PROTECTED] -- Jason Stechschulte [EMAIL PROTECTED] -- Think of prototypes as a funny markup language--the interpretation is left up to the rendering engine. -- Larry Wall in [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Hosts.
Check out www.spaceports.com. Subodh Gupta I have learned, Joy is not in things, it is in us. You will ultimately be known by what you give and not what you get. - Original Message - From: David Bruce [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 02, 2001 7:31 AM Subject: [PHP] Hosts. My host is Windows 98, Xitami and unstable MySQL and Perl/CGI. I'm looking for a *free* host, with CGI, Perl 5+, MySQL access, SSI PHP. Thanks, Owen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to catch the output of http:// - text file?
Hi Simon, Try the following for reading the files, for(i=1;i2000;i++) { $response=; $request=kbid=$i; //Header $header = POST kb.html HTTP/1.0\r\n; $header .= Content-type: application/x-www-form-urlencoded\r\n; $header .= Content-length: . strlen($request) . \r\n\r\n; //Open Connection $fp = fsockopen(www.mysite.com,80,$err_num,$err_msg, 30); if($fp) { fputs($fp, $header.$request); while(!feof($fp)) $response .= fgets($fp,2048); fclose($fp); } else { if(DEBUG) { echo ERR_NUM: $err_num\nERR_MSG: $err_msg; } //write response to a file echo $response; } Hope this helps you, Wieger Kraa de Simon wrote: Hi, PHP newbie. Can anyone help me with the following? Pseudo code: for(i=1;i2000;i++) { catch the output of http://www.mysite.com/kb.html?kbid= ? echo i ? and put the html code in a text file called /www/kb/kbid ? echo i ? .html } So the end result is 2000 html files on disk extacted from the http:// address... Thanks... Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] --- Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b SCO UnixWare 7.1.1, Progress 9.1a11 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Wieger Uffink tel: +31 20 428 6868 fax: +31 20 470 6905 web: http://www.usmedia.nl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Make text a submit button?
Hello, I am currently using image buttons for my submit buttons on a project I am working on. What I would like to use is regular text like a hyperlink. Does anyone know of how I can use text as the submit button? Thanks for any help Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] need CORBA/satellite examples
I have been searching for some time now for examples of code that uses = satellite, but the best I can find is the README and the entries in the = PHP manual. Can anyone point me to code that uses satellite that I can = learn from (or if you have code you don't want to post, feel free to = send directly)? I'm new to the specifics of CORBA, so seeing relevant = PHP code while wading through other CORBA docs would be very helpful. Thank you for any assistance! Pete
RE: [PHP] Make text a submit button?
a href=javascript:document.forms[0].submit()bleh/a Or something very similar. See the form.submit() function in your favorite Javacsript manual. -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: 3 May 2001 18:09 To: PHP User Group Subject: [PHP] Make text a submit button? Hello, I am currently using image buttons for my submit buttons on a project I am working on. What I would like to use is regular text like a hyperlink. Does anyone know of how I can use text as the submit button? Thanks for any help Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] very basic question, needs direction!
Hello, I am using PHP as my main language in my websites. I am planning to set up my own server to host all my domains. Is there a place, where I can see, how do I set up a server with PHP as the main language and what are the hardware/software requirements for this? All I need is just a url or if anybody already did this, please let me know. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Strange behaviour of mktime() in objects
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 2. 21:34 Subject: [PHP] Strange behaviour of mktime() in objects Hi folks, I have to make several conversions from / to timestamp (seconds in the UNIX-Epoche) here you see two snippets of my code File1 the testfile ? /* Testpage for Class timeStuff named test_sts_timestuff.html */ includests_timestuff.html; $STST = new timeStuff; $wert=2001_04_20; $STST - setTimeStamp($wert); ? File2 the Classfile ? /* Classfile named: sts_timestuff.html */ class timeStuff { var $TS; function setTimeStamp($wert) // $wert=2001_04_20; { (int)$pieces=explode(_,$wert); //even if I use (int) or not no change in output //show the input in pieces for($i=0; $i count($pieces) ; $i++) { echo TIMESTAMP[$i] = $pieces[$i]br; } $this - TS = mktime(12,00,00,$pieces[1],$pieces[3],$pieces[0]); you missed the indexing of the day element, you'd better write 2 instead of 3^ $this - TS = mktime(12,00,00,$pieces[1],$pieces[2],$pieces[0]); echo TIMESTAMP in Object = .date(H:i:s-Y-m-d,$this - TS).br; }/* end function */ }/* end class */ ? The output is : TIMESTAMP[0] = 2001 TIMESTAMP[1] = 04 TIMESTAMP[2] = 20 TIMESTAMP in Object = 13:00:00-2001-03-31 As you can see, the output of the pieces is correct, but the reassembling to a date gives a wrong date and time, (I would understand, if time is incorrect, but the date is absolutely out of tune) Any ideas what this could be?? Thanks in advance Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] is there free php+mySql hosting?
for informational purposes, an updatable page that contains all the free php web host information presented below can be found here : http://www.faqts.com/knowledge-base/view.phtml/aid/4058/fid/27/ regards, philip On Thu, 3 May 2001, Greg Schnippel wrote: From the archives: The number of free PHP web hosts is growing . More and more are offering MySQL options too! Each category below is in alphabetic order. Some don't require banners : http://www.1st-home.net/ (requires affiliate signups) http://www.mycgiserver.com/ http://www.portland.co.uk/ (allows your own domain name) http://www.saxen.net/ Some do require banners AND offer FREE MySQL : http://www.f2s.net/free/free%20home.htm http://www.grandcity.net/hosting/ http://hosting.datablocks.net/free/ http://www.jumpworld.net/ http://www.nexen.net/ http://www.spaceports.com/ http://www.surecity.com/ Some do require banners (no db): http://www.netcabins.com/ http://users.destiney.com/ http://www.worldzone.net/ Some require you be Open Source and offer many services : http://www.sourceforge.net/ If you later decide to pay for your web hosting, check out : http://hosts.php.net/ As it features a searchable directory and comments from users. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]O n Behalf Of Peter Stevens Sent: Thursday, May 03, 2001 6:02 AM To: [EMAIL PROTECTED] Subject: [PHP] is there free php+mySql hosting? Hi, Can anyone tell me if you can get free php+mysql hosting anywhere? Many thanks and regards, Peter Stevens Project Assistant DP - Berent APS Njalsgade 21G,5 2300 København S +45 32 64 12 00 - http://www.berent.dk http://www.berent.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] very basic question, needs direction!
Hi, have a look at this article: http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/ it describes the setup of Apache, PHP, SSL and MySQL. Johannes Web master [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I am using PHP as my main language in my websites. I am planning to set up my own server to host all my domains. Is there a place, where I can see, how do I set up a server with PHP as the main language and what are the hardware/software requirements for this? All I need is just a url or if anybody already did this, please let me know. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] apache toolbox
Just out of curiosity, what problems did you have ? Jerry Lake- [EMAIL PROTECTED] Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -Original Message- From: Chris Schneck [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 5:00 PM To: [EMAIL PROTECTED] Subject: [PHP] apache toolbox This might be a useful link for some people who are having problems with the combination of apache + ssl / php / mysql. I've used it and I had a couple problems, but after I actually read the README, everything was smooth :) www.apachetoolbox.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] is this the correct way to use round function?
Jacky [EMAIL PROTECTED] wrote: 1. (*) text/plain Is this the correct way to use round function with 2 decimal? $x = round((44.057/2.545),2); yep -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] very basic question, needs direction!
Web master [EMAIL PROTECTED] wrote: Hello, I am using PHP as my main language in my websites. I am planning to set up my own server to host all my domains. Is there a place, where I can see, how do I set up a server with PHP as the main language and what are the hardware/software requirements for this? All I need is just a url or if anybody already did this, please let me know. the php manual has a good install guide: http://www.php.net/manual/en/installation.php hardware.. depends, apache and php can run ok from 486 and up. software: apache as webserver mysql as database php as language -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] OT-Please bare with me :)
Hello, I am making a suite of php tolls that I want to have all incorporated in one management website. What I would like to have is a drop down menu in a frame on the left. A great example of what I want is the left drop down menu on the new Cobalt XTR server admin section. If anyone has a JavaScript or a tutorial how to make a drop down menu please send me a link. Thank you :) Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] OT-Please bare with me :)
In a message dated 03/05/2001 18:07:18 GMT Daylight Time, [EMAIL PROTECTED] writes: Hello, I am making a suite of php tolls that I want to have all incorporated in one management website. What I would like to have is a drop down menu in a frame on the left. A great example of what I want is the left drop down menu on the new Cobalt XTR server admin section. If anyone has a JavaScript or a tutorial how to make a drop down menu please send me a link. Thank you :) Brandon Hi not sure if this is exactly what your after but it may do the trick :-) It isn`t perfect coding but it does work so you should be able to model it to what you want. ? if ($loadpage==request_for_quote) { $FormType =forms/request_for_quote.php3; }elseif ($loadpage==general_enquiry) { $FormType =forms/general_enquiry.php3; }elseif ($loadpage==ask_a_question) { $FormType=forms/ask_a_question.php3; }elseif (!$loadpage) { $loadpage=request_for_quote; $FormType=forms/request_for_quote.php3; } ? SCRIPT LANGUAGE=JavaScript !-- function displaypage() { document.forms[0].submit(); } -- /SCRIPT SELECT NAME=loadpage onChange=displaypage() OPTION VALUE=request_for_quoteRequest for Quote/OPTION OPTION VALUE=ask_a_questionAsk A Question/OPTION/SELECT -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Error logging in PHP-4pl1 and Apache 1.3.19 w/ output buffering
I've an installation of PHP4pl1 running under Apache 1.3.19. Without output buffering enabled, the error logging is fine (going to Apache's error_log as expected) The problem is that when I turn on output buffering (to enable me to send cookies when I feel like it ;) the error logging stops being useful --- instead of handy error messages, I get a dump of the page in which the error occured. Not good. Does anyone have any suggestions about why this is happening, and how to get useful error logging with output buffering enabled? A reply off list (as well as to the group) would be wonderful since I don't normally have usenet access. TIA, Simon Stewart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] help variables ..
ok here is the problem.. im trying to create a php script that parses some info throws it into a database.. simple enough. now the program im getting the info from stores stuff in a flat file like so $VictimNumber1 = nickhere; $VictimNamenickhere = 2; now what i want to do is to do something like this $victimname['$victimenumber1'] so it would return $victimnamenickhere is this at all possible ?? oh yes if you cant tell already i am a newbie ;D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 3 May 2001 17:25:01 -0000 Issue 664
php-general Digest 3 May 2001 17:25:01 - Issue 664 Topics (messages 51215 through 51301): Re: REG_BADPAT ERROR! 51215 by: Jason Murray 51255 by: Gyozo Papp Re: session_register() 51216 by: Jennifer 51220 by: Warren Vail 51222 by: Jennifer 51284 by: Johnson, Kirk Proxy 51217 by: Selvin Sakal Re: substitute for assigning with array()? 51218 by: mailing_list.gmx.at Re: Website production tool in PHP 51219 by: Albrecht Guenther Re: HI 51221 by: Geir Eivind Mork Working with numbers 51223 by: Jennifer 51251 by: Christian Reiniger 51257 by: Gyozo Papp how? 51224 by: elias 51260 by: Jason Stechschulte 51261 by: elias 51285 by: Jason Stechschulte Re: Decimal to Ascii 51225 by: Rudolf Visagie Reading mime attachments into a rdbms 51226 by: Mattias Segerdahl 51268 by: Larry Hotchkiss is this the correct way to use round function? 51227 by: Jacky 51296 by: Henrik Hansen Re: How to catch the output of http:// - text file? 51228 by: Kraa de Simon 51229 by: Kraa de Simon 51231 by: Kraa de Simon 51287 by: Wieger Uffink Problem with Mcrypt + PHP 4.0.5 51230 by: Stefan Scherf Goodbye! 51232 by: Soeren Staun-Pedersen Help plz! 51233 by: elias 51234 by: Mattias Segerdahl 51236 by: elias 51237 by: Tristan.Pretty.risk.sungard.com 51276 by: Tristan.Pretty.risk.sungard.com Re: Sending information between pages??? 51235 by: Tim Ward is there free php+mySql hosting? 51238 by: Peter Stevens 51240 by: elias 51282 by: Rene Maldonado 51283 by: Greg Schnippel 51293 by: Philip Olson Re: open foxpro database 51239 by: Dezider Góra PHP 4.0.5 and PDFLib 51241 by: Jochen Kaechelin Searching for facts on big PHP websites 51242 by: Björn Schotte Maximum execution time of 30 seconds exceeded... 51243 by: Kraa de Simon 51244 by: Jon Haworth 51245 by: elias 51265 by: Michael Geier 51271 by: heinisch.creaction.de textarea -- what happens to my new lines 51246 by: Stampe, Lars 51249 by: heinisch.creaction.de 51258 by: Stampe, Lars 51262 by: elias 51263 by: Jon Haworth 51269 by: heinisch.creaction.de Check if a variable has been posted-- HOW? 51247 by: Martin Cabrera Diaubalick 51248 by: Nicolas Guilhot maximum execution time exceeded but !connection_timeout() ??? 51250 by: John Clements 51252 by: John Clements odbc 51253 by: claudia Include and require 51254 by: Ronald Re: Template programming 51256 by: Gyozo Papp log analysis scripts 51259 by: Paul Newby Returning Lowest Number Not In Array 51264 by: Mike Potter 51266 by: Matthew Luchak Re: mailing list 51267 by: Nikhil Goyal sessions and reg_globals=off 51270 by: ahmad varoqua 51274 by: Nicolas Guilhot Problems with ifx 51272 by: Oleg Stukalov Homesite - Windows and CVS 51273 by: Michael Stearne 51277 by: Altunergil, Oktay php/mySql SELECT where clause using dates. 51275 by: Dan Eskildsen 51278 by: Jon Rosenberg 51281 by: Pierre-Yves Lemaire feof with fsockopen don't work 51279 by: Thomas Häger Re: php/mySql SELECT where clause using dates. ooops 51280 by: Jon Rosenberg Re: Hosts. 51286 by: Subodh Gupta Make text a submit button? 51288 by: Brandon Orther 51290 by: Sander Pilon need CORBA/satellite examples 51289 by: Peter Dudley very basic question, needs direction! 51291 by: Web master 51294 by: Johannes Janson 51297 by: Henrik Hansen Re: Strange behaviour of mktime() in objects 51292 by: Gyozo Papp Re: apache toolbox 51295 by: Jerry Lake OT-Please bare with me :) 51298 by: Brandon Orther 51299 by: KPortsmout.aol.com Error logging in PHP-4pl1 and Apache 1.3.19 w/ output buffering 51300 by: Simon Stewart help variables .. 51301 by: exodus Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- and the line 236 is: $url=ereg_replace(amp;,,$url); BADPAT probably means Bad Pattern. Try:$url=ereg_replace(\amp\;,,$url); Jason what version of PHP are you running? It works for me on PHP 4.0.4pl1. (CGI) but, you may try: $pattern = quotemeta(amp;); // see quotemeta in the manual ! ereg_replace($pattern, , $url); - Original Message - From: Jason Murray [EMAIL PROTECTED] To: 'Martin Bittner-Lamy' [EMAIL
Re: [PHP] REG_BADPAT ERROR!
In article 007001c0d38f$c50929b0$a0a6ca18@renttib, [EMAIL PROTECTED] (Martin Bittner-Lamy) wrote: Warning: REG BADPAT in /usr/home/64.157.1.190/public html/test/segrabs.php on line 236 and the line 236 is: $url=ereg replace(amp;,,$url); Why are bother to use a regex function for this? str_replace() can do the job just as well, not to mention faster. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Include and require
According to the docu u should not require() files or external code in loops or u must use curly Bracket when used in if conditions. But everythink works fine. I require() successfully in for loops, I can use it in if..elseif..else constucts without curly brackets. (only one line of cause) So where is the difference between require() and include(). It depends on how you are using it. If you want what you are require()'ing to *vary* on each loop iteration, you must use include(). A require() is only executed once, during the initial parse of the file. An include() gets re-evaluated on each loop iteration, so you can vary the filename, etc. See http://www.php.net/manual/en/function.require.php for more. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File Uploads and Get Method
when i upload a file, the form method must be POST because when GET is used, it adds backslashes to the windows path name that already has backslashes, and this causes an error. for instance, the following snippet of code -- if ($add){ $newimage = whatever.gif; copy($image, $directory. / .$newimage); } print(form action=thispage.html action=GET enctype='multipart/form-data' input type=file name=imageinput type=submit name=add/form); produces the following error Warning: Unable to open C:\\My Documents\\My Pictures\\Sample.jpg which is the image i'm trying to upload. notice the double slashes in the path (btw, adding $image = str_replace(,\\,$image); does not help). so the solution is to use the POST method. now, on the same form, i have a multiple select box, where you can select multiple values from one select box. the code is as follows -- select name=country size=3 multiple option value=3Australia/option option value=4Brazil/option option value=2Russia/option option value=1USA/option /select if the user selects more than one country, then if you echo $country, it will show you only the last selected value for country. however, what you can do is break the query string at the ampersands, figure out all the countries the user has selected and put them in an array. in order to have a query string, the GET mothod must be used. that solves this problem. OOPSto upload the image, the POST method must be used, but to figure out the values from a multiple select box, the GET method must be used. if i use one, then the other breaks. does anyone have any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Include and require
for a lengthy post on the subject that clearly explains the differences/similarities/history between require and include, see this post by Zeev : RE: [PHP] Require() vs Include() http://marc.theaimsgroup.com/?l=php-generalm=97419027907315 regards, philip On Thu, 3 May 2001, Johnson, Kirk wrote: According to the docu u should not require() files or external code in loops or u must use curly Bracket when used in if conditions. But everythink works fine. I require() successfully in for loops, I can use it in if..elseif..else constucts without curly brackets. (only one line of cause) So where is the difference between require() and include(). It depends on how you are using it. If you want what you are require()'ing to *vary* on each loop iteration, you must use include(). A require() is only executed once, during the initial parse of the file. An include() gets re-evaluated on each loop iteration, so you can vary the filename, etc. See http://www.php.net/manual/en/function.require.php for more. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.5 Apache 2.0
I was wondering if anyone has gotten Apache 2.0 Beta to install with DSO Support and got PHP 4.0.5 to compile as a DSO using Apache 2.0? I am using FreeBSD 4.3 and can't seem to get it to work for the life of me. /'^'\ ( o o ) --oOOO--(_)--OOOo Devin Atencio ArosNet Systems Administration .oooO EMail: [EMAIL PROTECTED] ( ) Oooo. \ (( )- \_)) / (_/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] File Uploads and Get Method
-Original Message- now, on the same form, i have a multiple select box, where you can select multiple values from one select box. the code is as follows -- select name=country size=3 multiple [ snip ] /select if the user selects more than one country, then if you echo $country, it will show you only the last selected value for country. however, what you can do is break the query string at the ampersands, figure out all the countries the user has selected and put them in an array. in order to have a query string, the GET mothod must be used. that solves this problem. If you name the field country[], with the square brackets, all the user's selections will be in an array named $country when POST'ed. So, you can use POST to address both problems. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] BET News
http://www.mp3.com/mcpedro from [EMAIL PROTECTED] The question is this, If you placed a Jamaican born MC on a Hip Hop/Trance/Techno track and told him to flow without losing his yard essence (Jamaican Vibes), what would you get? Most likely confusion of course, unless the MC was Pedro! Peter Gracey a.k.a. MCPedro (Mp3Eternity) was born and raised in Kingston Jamaica, and later moved to Florida where he honed his skills. Pedro would be the first to admit, being raised on the streets of Waterhouse in a rough political climate, and then later in Miami, plays a large part in his no-nonsense militant aura. Influenced by artists such as Shabba Ranks, Garnett Silk, Bob Marley,Papa San, Maxi Priest, Luciano and Sanchez, and fused with his passion for writing, it was inevitable that Pedro would be heard. Leaving Jamaica College at 17, Pedro resided in Miami, San Diego, Seattle and back to Miami where he mingled with the underground culture, toasting on local sound systems and appearing at parties in all three cities. After taking time off from the military, Pedro returned with a vengeance to show his skills. Working the underground Dance Hall circuit with the likes of Tinga Stewart, RPI, Sanchez, Luciano, Barrington Levy, Buju Banton and Gloria Estefan. He continued to record his first single entitled Life in 1996. By this time Pedro has been touring with 303Infinity who then introduced him to Nadine Renee (The voice behind Planet Soul.. Set U Free)where melodic Dance Hall hooks combined with a smooth yet rugged Hip Hop/ Trance-Techno flow. He managed to touch Electronic fans like no other Dance Hall artist ever did, representing the real Hip Hop/Techno without losing his Jamaican borne flavor, yardcore. Please visit Pedro Music Station and feel free to download his tracks at no charge at http://www.mp3.com/mcpedro [EMAIL PROTECTED] : Email us with any comments or if you wish to stop recieving updates on Pedro. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MySQL select rand() with weighting?
Hi Guys, Does anyone know how to select one field randomnly from a MySQL table against a weighting column in the same row the field is selected from? For example, SELECT id, url, image FROM table ORDER BY rand() LIMIT 1. And have a column like weighting where values between 1 and 100 are held - The larger values making it more likely that they're going to get pulled out. So say I have three rows in the table, one weighing 100, the others weighing 50, the one weighhing 100 stands a better chance of being selected randomnly? I know I've not explained this too well, but hopefully *someone* will know what I'm rambling on about ;) Thanks as always, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Shorten String or encode/decode a string
I want to shorten a string that I'll be throwing through the url. It's not so much that it's too long, but it's ugly. What it is, is my query string that I need to pass through to different pages, i.e. viewing multiple pages. Anyway, I was looking at encode and decode features but not really sure that they could shorten it down significantly. Now I understand that I won't be able to use it, but I tried the crypt() function and liked how small it made it. The string information doesn't need to be secure in anyway, just smaller (and look like nothing understandable would be good also). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MySQL select rand() with weighting?
On Thu, 3 May 2001 20:15:26 +0100, James, Yz ([EMAIL PROTECTED]) wrote: Hi Guys, Does anyone know how to select one field randomnly from a MySQL table against a weighting column in the same row the field is selected from? For example, SELECT id, url, image FROM table ORDER BY rand() LIMIT 1. i guess you'd just go ' order by rand()*weighting' - Mark And have a column like weighting where values between 1 and 100 are held - The larger values making it more likely that they're going to get pulled out. So say I have three rows in the table, one weighing 100, the others weighing 50, the one weighhing 100 stands a better chance of being selected randomnly? I know I've not explained this too well, but hopefully *someone* will know what I'm rambling on about ;) Thanks as always, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: php-list- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Starting PHP script with crontab
is there a service on the web that can do this for you? i once found a site that would accept a url and an interval and would retrieve that url (therefore running any code you had in there) on your interval - Noah Anuradha Ratnaweera [EMAIL PROTECTED] wrote in message Pine.LNX.4.21.0105021110320.342-10@presario">news:Pine.LNX.4.21.0105021110320.342-10@presario... If you are not careful, anyone will be able to run the script! Anuradha On Thu, 19 Apr 2001, Bertjan Schrader wrote: I need tot start a PHP script at night with the crontab. I tried to do it with lynx (lynx http://www.domain.nl/test.php) as a commandline within the crontab. Lynx is starting but the PHP script is not working. Anyone an idea how to do it? OS: Redhat Linux 5.2 Apache PHP as a apache module thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Starting PHP script with crontab
also sprach Noah Spitzer-Williams (on Thu, 03 May 2001 03:34:02PM -0400): with lynx (lynx http://www.domain.nl/test.php) as a commandline within did you use 'lynx -dump url'??? martin; (greetings from the heart of the sun.) \ echo mailto: !#^.*|tr * mailto:; net@madduck -- may your future be limited only by your dreams. -- christa mcauliffe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Redirect With Authentication Question
Authentication Question... My company subscribes to several pay-to-view e-commerce sites that require htaccess-type authentication. To keep things simple for our users and to ensure that our users don't use these accounts w/out our permission, we would like to keep the account IDs and passwords from the user's direct view. A simple but not entirely effective solution is to include the id/password in the URL... http://user:[EMAIL PROTECTED]/index.html The problem with the above-noted method is that the account ID and password are clearly visible. What I would rather do is point the users at a PHP script that then redirects them to the correct site with authentication already handled. I can easily handle the redirect using... header(Location: ... ) What I haven't figured out is how to include the authentication in the redirect. I understand how to use base64_encode() to encode the ID:password string. What I can't figure out is how to pass this info along with the redirect. Any thoughts on if/how this could be accomplished? For the record, I tried a different approach where I used fsockopen(), fputs(), and fpassthru() to successfully connect/authenticate and receive the HTML stream. This will actually display the results (messy). The problem with this approach is that the links on the page are all broken as the user's browser is still pointing at the local web server. In a nutshell, how can I redirect a web client to a remote site and include the authentication info as part of the redirect. Thanks, Stan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Starting PHP script with crontab
Noah Spitzer-Williams wrote: is there a service on the web that can do this for you? i once found a site that would accept a url and an interval and would retrieve that url (therefore running any code you had in there) on your interval - Noah cronservice.com is one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] question about broadcast application
My bosses came to me and asked me to spec out a broadcast mailer (spam box) that clients could: - log into - choose a pre-approved list (clients could have multiple lists) - choose a stored email - send sample - send broadcast I know that Qmail and EzMLM are the products to use, but does anyone have any tips or suggestions, or see any possible problems with this (besides the obvious UCE issue)?? Commercial/Open Source application suggestions appreciated. thanx. mike. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Need a partner for PHP dev.
Hi, I know this isn't the best place to post this, but I tried a lot of other places without much success. I am developing a very flexible shopping cart system, as I have clients who needs one and I think that the available software is either overpriced or lacks features / flexibility. I have a good part of the job done, although I am really busy and I need to get it done ASAP. I am looking for someone who has about the same skills as me, and could work from home. Very motivated Knows PHP with mySQL (I have 4-5 months experience) An idea of what ecommerce is If possible knows unix environment I am a full time student and plan on doing this during summer break, so you'll understand that I am not looking for a professional here, which is why I have so much troubles finding someone. Please, email me for more info. -- Cedric Veilleux, [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] changing a file on the server using a web form
Hi, I have installed mod_php on my Apache web server and there is something I was curious about. I would like there to be a web page with a form that a user can enter some info into.. and it change a file in say /etc/file.txt when they submit the form .. any tips or advice on how I would get started doing this? Thanks in advance. Sherman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] using an array with form list values
I need to check that a form entry defined as an array contains a value before initiating the foreach code in my script. I have my form field defined in my form as: ?php print ' select name=preferred_location[]size=3 MULTIPLE option value=BermudaBermuda/option option value=CaliforniaCalifornia/option option value=CaribbeanCaribbean/option option value=CarolinasCarolinas/option option value=Florida-AtlanticFlorida-Atlantic/option option value=Florida-Gulf coastFlorida-Gulf coast/option option value=Florida-Pan handleFlorida-Pan handle/option option value=HawaiiHawaii/option option value=MediterraneanMediterranean/option option value=MexicoMexico/option option value=S.Pacific/AutraliaS.Pacific/Autralia/option /select'; ? And my script code as: foreach ( $preferred_location as $location ) { $msg .= $location\n; } As long as the user selects at least one form value from the list box, the script processes without error. If no item is selected -- This msg is rcved: Warning: Non array argument supplied for foreach() in /usr/local/etc/httpd/htdocs/test/beaches/beaches_quote.scp.php3 on line 30 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] problem search in array
Hi! This file will not work for me. I have tried in several ways and I want it to print Got word if it find $word. $filename = test.xml; $fp = fopen($filename, r); $string = fread($fp, filesize($filename)); $string = strip_tags($string); $refined_string = explode( , $string); if (in_array ($word, $refined_string)){ print Got word; } fclose ($fp); -- If You know what is wrong I am very thankful for help. Regards Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] using an array with form list values
Try enclosing the foreach inside an: - if block which checks that count($preferred_location) 0; or, - if block which checks if it is defined, if($preferred_location). Hopefully, one of these should work :) Kirk -Original Message- From: Claudia [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 2:08 PM To: [EMAIL PROTECTED] Subject: [PHP] using an array with form list values I need to check that a form entry defined as an array contains a value before initiating the foreach code in my script. I have my form field defined in my form as: ?php print ' select name=preferred_location[]size=3 MULTIPLE option value=BermudaBermuda/option option value=CaliforniaCalifornia/option option value=CaribbeanCaribbean/option option value=CarolinasCarolinas/option option value=Florida-AtlanticFlorida-Atlantic/option option value=Florida-Gulf coastFlorida-Gulf coast/option option value=Florida-Pan handleFlorida-Pan handle/option option value=HawaiiHawaii/option option value=MediterraneanMediterranean/option option value=MexicoMexico/option option value=S.Pacific/AutraliaS.Pacific/Autralia/option /select'; ? And my script code as: foreach ( $preferred_location as $location ) { $msg .= $location\n; } As long as the user selects at least one form value from the list box, the script processes without error. If no item is selected -- This msg is rcved: Warning: Non array argument supplied for foreach() in /usr/local/etc/httpd/htdocs/test/beaches/beaches_quote.scp.php 3 on line 30 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Redirect With Authentication Question
Take a look at: ftp://ftp.isi.edu/in-notes/rfc2617.txt To receive authorization, the client sends the userid and password, separated by a single colon (:) character, within a base64 [7] encoded string in the credentials. basic-credentials = base64-user-pass base64-user-pass = base64 [4] encoding of user-pass, except not limited to 76 char/line user-pass = userid : password userid = *TEXT excluding : password= *TEXT Userids might be case sensitive. If the user agent wishes to send the userid Aladdin and password open sesame, it would use the following header field: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== A client SHOULD assume that all paths at or deeper than the depth of the last symbolic element in the path field of the Request-URI also are within the protection space specified by the Basic realm value of the current challenge. A client MAY preemptively send the corresponding Authorization header with requests for resources in that space without receipt of another challenge from the server. Similarly, when a client sends a request to a proxy, it may reuse a userid and password in the Proxy-Authorization header field without receiving another challenge from the proxy server. See section 4 for security considerations associated with Basic authentication. In article [EMAIL PROTECTED] you write: Authentication Question... My company subscribes to several pay-to-view e-commerce sites that require htaccess-type authentication. To keep things simple for our users and to ensure that our users don't use these accounts w/out our permission, we would like to keep the account IDs and passwords from the user's direct view. A simple but not entirely effective solution is to include the id/password in the URL... http://user:[EMAIL PROTECTED]/index.html The problem with the above-noted method is that the account ID and password are clearly visible. What I would rather do is point the users at a PHP script that then redirects them to the correct site with authentication already handled. I can easily handle the redirect using... header(Location: ... ) What I haven't figured out is how to include the authentication in the redirect. I understand how to use base64_encode() to encode the ID:password string. What I can't figure out is how to pass this info along with the redirect. Any thoughts on if/how this could be accomplished? For the record, I tried a different approach where I used fsockopen(), fputs(), and fpassthru() to successfully connect/authenticate and receive the HTML stream. This will actually display the results (messy). The problem with this approach is that the links on the page are all broken as the user's browser is still pointing at the local web server. In a nutshell, how can I redirect a web client to a remote site and include the authentication info as part of the redirect. Thanks, Stan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] using an array with form list values
Something like this should help: if( is_array($preferred_location) ) { #your code goes here. } In article 9csden$8qu$[EMAIL PROTECTED] you write: I need to check that a form entry defined as an array contains a value before initiating the foreach code in my script. I have my form field defined in my form as: ?php print ' select name=preferred_location[]size=3 MULTIPLE option value=BermudaBermuda/option option value=CaliforniaCalifornia/option option value=CaribbeanCaribbean/option option value=CarolinasCarolinas/option option value=Florida-AtlanticFlorida-Atlantic/option option value=Florida-Gulf coastFlorida-Gulf coast/option option value=Florida-Pan handleFlorida-Pan handle/option option value=HawaiiHawaii/option option value=MediterraneanMediterranean/option option value=MexicoMexico/option option value=S.Pacific/AutraliaS.Pacific/Autralia/option /select'; ? And my script code as: foreach ( $preferred_location as $location ) { $msg .= $location\n; } As long as the user selects at least one form value from the list box, the script processes without error. If no item is selected -- This msg is rcved: Warning: Non array argument supplied for foreach() in /usr/local/etc/httpd/htdocs/test/beaches/beaches_quote.scp.php3 on line 30 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]