[PHP] PHP Error logging
Hello, I currently have a strange issue where we are seeing 'random errors' being displayed to end users. What I find most interesting is that in the php.ini file we have the following error settings. error_reporting = E_ALL ~E_NOTICE display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off track_errors = Off I thought that if we had dislay_errors = Off then end users should never see errors displayed on the web page. However at apparently random times we do still see errors being reported, its not consistent at all. To give a better idea of the problem we have 8 web servers, they all run an identical copy of the site which is stored on a common netapp nfs filer. At apparently random times we see that 1 out of 8 servers will reported strange errors like 'use of undefined constant' or 'Undefined variable'. What's most strange about these errors is that if the code was faulty wouldn't we expect to see the errors on all web servers? and secondly wouldn't we expect to see the errors constantly rather than at apparently random intervals? The php.ini files have a modify time of mid 2010 and yet this problem has only started in the last few weeks. Has anyone else experienced similar problems in the past and if so what was the root cause? Regards, Jimmy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Error logging
On Mon, Jan 17, 2011 at 19:33, Jimmy Stewpot mail...@oranged.to wrote: Hello, I currently have a strange issue where we are seeing 'random errors' being displayed to end users. What I find most interesting is that in the php.ini file we have the following error settings. error_reporting = E_ALL ~E_NOTICE display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off track_errors = Off I thought that if we had dislay_errors = Off then end users should never see errors displayed on the web page. However at apparently random times we do still see errors being reported, its not consistent at all. To give a better idea of the problem we have 8 web servers, they all run an identical copy of the site which is stored on a common netapp nfs filer. At apparently random times we see that 1 out of 8 servers will reported strange errors like 'use of undefined constant' or 'Undefined variable'. What's most strange about these errors is that if the code was faulty wouldn't we expect to see the errors on all web servers? and secondly wouldn't we expect to see the errors constantly rather than at apparently random intervals? The php.ini files have a modify time of mid 2010 and yet this problem has only started in the last few weeks. Has anyone else experienced similar problems in the past and if so what was the root cause? Sounds like someone added either ini_set('display_errors','On') in the script being called or an include, added a local php.ini file to the directory (or a parent directory), or added a php_flag to .htaccess in the directory (or a parent). Try checking into those possibilities. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php error
ERR_DB_NO_DB_PASS What will this meen? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php error
mattias wrote: ERR_DB_NO_DB_PASS What will this meen? No database password has been set in config. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error loadin file
On Feb 11, 2008 10:40 AM, [EMAIL PROTECTED] wrote: HEllo with the next code i am trying for loading one file $mibool = FALSE; $Descriptor2 = fopen(usuarios.txt,r); Does this file exist in the directory from which the script is ultimately run, and is it readable? yes (both) $usuarios=array(); $i=0; while(!feof($Descriptor2)){ $buffer = fgets($Descriptor2,4086); $usuarios[$i]=$buffer; $i++; } fclose($Descriptor2); $miusername = trim($username); foreach($usuarios as $valor){ $mivalor=trim($valor); if(strcasecmp($mivalor,$miusername) == 0){ $mibool=TRUE; }else{ } } if($mibool == TRUE){ }else{ header(Location:out.php); } but into the log fiel appears this error: [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2 can you help me for solving thsi error? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- /Dan Daniel P. Brown Senior Unix Geek ? while(1) { $me = $mind--; sleep(86400); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php error loadin file
HEllo with the next code i am trying for loading one file $mibool = FALSE; $Descriptor2 = fopen(usuarios.txt,r); $usuarios=array(); $i=0; while(!feof($Descriptor2)){ $buffer = fgets($Descriptor2,4086); $usuarios[$i]=$buffer; $i++; } fclose($Descriptor2); $miusername = trim($username); foreach($usuarios as $valor){ $mivalor=trim($valor); if(strcasecmp($mivalor,$miusername) == 0){ $mibool=TRUE; }else{ } } if($mibool == TRUE){ }else{ header(Location:out.php); } but into the log fiel appears this error: [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2 can you help me for solving thsi error? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error loadin file
Daniel Brown wrote: On Feb 11, 2008 11:12 AM, [EMAIL PROTECTED] wrote: On Feb 11, 2008 10:40 AM, [EMAIL PROTECTED] wrote: HEllo with the next code i am trying for loading one file $mibool = FALSE; $Descriptor2 = fopen(usuarios.txt,r); Does this file exist in the directory from which the script is ultimately run, and is it readable? yes (both) And is the file being opened properly? Perhaps those error messages are old, from when you first started testing the script. Try emptying the error log and running the script again to see if they're still being written. It is currently February 11, your logs state January 11. Did it take you one month to find this list? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error loadin file
On Feb 11, 2008 10:40 AM, [EMAIL PROTECTED] wrote: HEllo with the next code i am trying for loading one file $mibool = FALSE; $Descriptor2 = fopen(usuarios.txt,r); Does this file exist in the directory from which the script is ultimately run, and is it readable? $usuarios=array(); $i=0; while(!feof($Descriptor2)){ $buffer = fgets($Descriptor2,4086); $usuarios[$i]=$buffer; $i++; } fclose($Descriptor2); $miusername = trim($username); foreach($usuarios as $valor){ $mivalor=trim($valor); if(strcasecmp($mivalor,$miusername) == 0){ $mibool=TRUE; }else{ } } if($mibool == TRUE){ }else{ header(Location:out.php); } but into the log fiel appears this error: [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: feof(): supplied argument is not a valid stream resource in miscripts.php on line 47, referer: scripts1.php [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning: fgets(): supplied argument is not a valid stream resource in miscripts.php on line 48, referer: scripts1.php [Fri Jan 11 22:44:24 2 can you help me for solving thsi error? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- /Dan Daniel P. Brown Senior Unix Geek ? while(1) { $me = $mind--; sleep(86400); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error loadin file
On Feb 11, 2008 11:12 AM, [EMAIL PROTECTED] wrote: On Feb 11, 2008 10:40 AM, [EMAIL PROTECTED] wrote: HEllo with the next code i am trying for loading one file $mibool = FALSE; $Descriptor2 = fopen(usuarios.txt,r); Does this file exist in the directory from which the script is ultimately run, and is it readable? yes (both) And is the file being opened properly? Perhaps those error messages are old, from when you first started testing the script. Try emptying the error log and running the script again to see if they're still being written. -- /Dan Daniel P. Brown Senior Unix Geek ? while(1) { $me = $mind--; sleep(86400); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error catching
Hi. I have been asked to try to catch the php error generated when the PHP script exceed execution time, but I do not know if that can be done... Any ideas? Mainly I want to show a custimized error page instead of that error (kind of Sorry but we are busy right now or something similar) Thanks. -- .-. | Miguel J. Jiménez | | Programador Senior | | Área de Internet/XSL/PHP| | [EMAIL PROTECTED] | :-: | ISOTROL, S.A. | | Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.| | Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).| | Teléfono: +34 955 036 800 - Fax: +34 955 036 849| | http://www.isotrol.com | :-: | The dark side lives within all of us, from the most primitive | | species, to the most highly evolved. | | Da'an, Earth Final Conflict | '-' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error catching
Miguel J. Jiménez wrote: Hi. I have been asked to try to catch the php error generated when the PHP script exceed execution time, but I do not know if that can be done... Any ideas? Mainly I want to show a custimized error page instead of that error (kind of Sorry but we are busy right now or something similar) Depends what the error is. See http://php.net/set_error_handler for details. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php Error Output Redirection
Hi, Is anyone know that errors generated by php (like Notice: Uninitialized string offset: 0 in ...) may stored in a php variable and print out later ? I want to put them some other location and show them in a debug window. I do this for my error reporting and I could not manage how to do with php messages. Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php Error Output Redirection
Use the set_error_handle function: http://us2.php.net/manual/en/function.set-error-handler.php saqib http://www.full-disk-encryption.net On 12/18/06, Sancar Saran [EMAIL PROTECTED] wrote: Hi, Is anyone know that errors generated by php (like Notice: Uninitialized string offset: 0 in ...) may stored in a php variable and print out later ? I want to put them some other location and show them in a debug window. I do this for my error reporting and I could not manage how to do with php messages. Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Saqib Ali, CISSP, ISSAP http://www.full-disk-encryption.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php Error Output Redirection
Sancar Saran wrote: Hi, Is anyone know that errors generated by php (like Notice: Uninitialized string offset: 0 in ...) may stored in a php variable and print out later ? I want to put them some other location and show them in a debug window. I do this for my error reporting and I could not manage how to do with php messages. congratulations, you are the 1,000,000th php user not to bother so much as think of looking in the manual: http://php.net/manual/en/ref.errorfunc.php http://php.net/manual/en/language.operators.errorcontrol.php http://php.net/manual/en/function.error-reporting.php http://php.net/manual/en/function.set-error-handler.php http://php.net/manual/en/function.error-get-last.php Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php Error Output Redirection
On Monday 18 December 2006 15:39, Jochem Maas wrote: Sancar Saran wrote: Hi, Is anyone know that errors generated by php (like Notice: Uninitialized string offset: 0 in ...) may stored in a php variable and print out later ? I want to put them some other location and show them in a debug window. I do this for my error reporting and I could not manage how to do with php messages. congratulations, you are the 1,000,000th php user not to bother so much as think of looking in the manual: http://php.net/manual/en/ref.errorfunc.php http://php.net/manual/en/language.operators.errorcontrol.php http://php.net/manual/en/function.error-reporting.php http://php.net/manual/en/function.set-error-handler.php http://php.net/manual/en/function.error-get-last.php Regards Sancar Oh really? so where is my spy-adware windows trojan prize ? Thank you Jochem, asking you always easy than the searching documentation and I always wonder what can I do without you and your great comments :). I promise, next time I'll try to do better. Really !!! ;) Sancar... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php Error Output Redirection
On Mon, 2006-12-18 at 20:55 +0200, Sancar Saran wrote: Oh really? so where is my spy-adware windows trojan prize ? Thank you Jochem, asking you always easy than the searching documentation and I always wonder what can I do without you and your great comments :). I promise, next time I'll try to do better. ominousToneWe'll be watching.../ominousTone Really !!! ;) ominousTone... .../ominousTone -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error log
Hi I'm using PHP 4.4.0 (cli) and all of the errors / warnings are written to file. I can see all of the direct errors but when I have an error inside an include file the script fails and the error is not shown in the log. I have to guess Where the error is. Any idea what I'm missing. Thanks Berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP error log
Are you using the constants predefined? __FILE__ __LINE__ Or also try using backtrace, http://mx.php.net/debug_backtrace Regards! Edwin. -Mensaje original- De: Weber Sites LTD [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 20 de Abril de 2006 07:43 a.m. Para: php-general@lists.php.net CC: [EMAIL PROTECTED] Asunto: [PHP] PHP error log Hi I'm using PHP 4.4.0 (cli) and all of the errors / warnings are written to file. I can see all of the direct errors but when I have an error inside an include file the script fails and the error is not shown in the log. I have to guess Where the error is. Any idea what I'm missing. Thanks Berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error log
Please, explain how are you logging the errors. Weber Sites LTD wrote: Hi I'm using PHP 4.4.0 (cli) and all of the errors / warnings are written to file. I can see all of the direct errors but when I have an error inside an include file the script fails and the error is not shown in the log. I have to guess Where the error is. Any idea what I'm missing. Thanks Berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error log
Run the include file separately and see if it produces an error. Also make sure that if you have short open tags=OFF that your include file uses normal tags. Code normally helps. Wolf Weber Sites LTD wrote: Hi I'm using PHP 4.4.0 (cli) and all of the errors / warnings are written to file. I can see all of the direct errors but when I have an error inside an include file the script fails and the error is not shown in the log. I have to guess Where the error is. Any idea what I'm missing. Thanks Berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP error log
Actually I'm not looking for help with the code. The problem is more of a principle problem. Because I don't want users to see errors and warnings When there is a problem all of the errors go to a log file Instead of the standard output. As long as the error (any error) occurs in the file I'm Working on, I can see the error in the error log. If the Error is in a file I include I don't see the error. This is not something special for my system. I think It's a definition in the php.ini to suppress errors to Standard output and log them to a file instead. I have : error_reporting = E_ALL|E_STRICT display_errors = Off display_startup_errors = Off log_errors = On track_errors = Off error_log = /usr/local//logs/php_errors (the Is not the real path) warn_plus_overloading = Off Thanks -Original Message- From: Wolf [mailto:[EMAIL PROTECTED] Sent: Thursday, April 20, 2006 5:15 PM To: Weber Sites LTD Cc: php-general@lists.php.net Subject: Re: [PHP] PHP error log Run the include file separately and see if it produces an error. Also make sure that if you have short open tags=OFF that your include file uses normal tags. Code normally helps. Wolf Weber Sites LTD wrote: Hi I'm using PHP 4.4.0 (cli) and all of the errors / warnings are written to file. I can see all of the direct errors but when I have an error inside an include file the script fails and the error is not shown in the log. I have to guess Where the error is. Any idea what I'm missing. Thanks Berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error log
On Thu, April 20, 2006 7:42 am, Weber Sites LTD wrote: I'm using PHP 4.4.0 (cli) and all of the errors / warnings are written to file. I can see all of the direct errors but when I have an error inside an include file the script fails and the error is not shown in the log. I have to guess Where the error is. Any idea what I'm missing. Perhaps the include file[s] in question are using this function: http://php.net/error_reporting And, if so, you should seriously consider NOT using those include files. Program with code SO BAD that they need to call error_reporting to hide their errors instead of fixing the errors are probably programs you do not want to use in the first place. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php error reporting problem
On 29 March 2006 15:25, ngwarai zed wrote: phpinfo says Configuration File (php.ini) Path /etc/php.ini And the file I am editing is /etc/php.ini Is this not the one Iam supposed to edit? On list please! H'mmm -- file permissions? You've stopped and restarted Apache? Which operating system? Starting to clutch at straws, now! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] php error reporting problem
-Original Message- From: ngwarai zed [mailto:[EMAIL PROTECTED] Sent: 30 March 2006 13:36 I am using Fedora core 4. yes I stopped and restarted apache On 3/30/06, Ford, Mike wrote: On 29 March 2006 15:25, ngwarai zed wrote: phpinfo says Configuration File (php.ini) Path /etc/php.ini And the file I am editing is /etc/php.ini Is this not the one Iam supposed to edit? On list please! H'mmm -- file permissions? You've stopped and restarted Apache? Which operating system? Starting to clutch at straws, now! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List ( http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
Re: [PHP] php error reporting problem
I checked the apache error log and the error is written there just as I expected like below. [client 127.0.0.1] PHP Parse error: parse error, unexpected T_STRING, expecting ',' or ';' on line 90, referer: http://localhost/form.html The problem is I know what the error is. What I want is for the error to be shown when I run the script not to be just written to the error log. I tried changing display_errors = On and error_reporting = On in php.ini , restarted httpd but when I check with phpinfo() I still see display_errors set to Off and error_reporting set to 2047. My php script still does not show any errors. Why are my changes to php.ini not refrlected when I run phpinfo() ? Where am I getting it all wrong? Display_error and errror_reporting were a typo. I wrote these correctly while editing php.ini. I mean I wrote display_errors and error_reporting. Thanks in advance
RE: [PHP] php error reporting problem
-Original Message- From: ngwarai zed [mailto:[EMAIL PROTECTED] Sent: 29 March 2006 14:39 To: Christopher Murtagh The problem is I know what the error is. What I want is for the error to be shown when I run the script not to be just written to the error log. I tried changing display_errors = On and error_reporting = On in php.ini , restarted httpd but when I check with phpinfo() I still see display_errors set to Off and error_reporting set to 2047. My php script still does not show any errors. Why are my changes to php.ini not refrlected when I run phpinfo() ? Where am I getting it all wrong? You're not editing the right php.ini -- check phpinfo() for where it says it's expecting php.ini to be (right near the top), and go edit that instead. Cheers! Mike Mike Ford, Electronic Information Services Adviser, Learning Support Services, JG125, The Library, James Graham Building, Headingley Campus, Beckett Park, LEEDS, LS6 3QS, United Kingdom Tel: +44 113 283 2600 extn 4730Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error reporting problem
Thanks Christopher for your help. I followed you numbered advicestep by step. 1) I verified that there weren't any typo's that were causing fatal problems in my php.ini 2) looked at the output of phpinfo() and verified the location of the php.ini script. /etc/php.ini .This is the file I am modifying 3) checked my apache config, could not see anything that might be overriding my setup. 4) checked my script for any ini_set() function calls that might be changing display_errors. I did not use any ini_set() functions But still the problem is not solved. Just to recap on the problem: I just want the deliberate php errors Imake to shown as errors on the php page when the script runs. Thanks in advance On 3/29/06, Christopher Murtagh [EMAIL PROTECTED] wrote: On Wed, 2006-03-29 at 16:38 +0300, ngwarai zed wrote: I tried changing display_errors = On and error_reporting = On in php.ini , restarted httpd but when I check with phpinfo() I still see display_errors set to Off and error_reporting set to 2047. My php script still does not show any errors. Why are my changes to php.ini not refrlected when I run phpinfo() ? Where am I getting it all wrong? Here are the things I would try (I'm assuming Linux/Apache setup): 1) verify that there aren't any typo's that are causing fatal problems in your php.ini 2) look at the output of phpinfo() and verify the location of the php.ini script. Default locations on *nix systems can be /usr/local/lib/php.ini or /etc/php.ini depending on how PHP was built. You might be modifying the wrong file (I've done that more than once). 3) check your apache config, see if there's anything that might be overriding your setup. 4) check your script for any ini_set() function calls that might be changing display_errors. Cheers, Chris
Re: [PHP] php error reporting problem
On Wed, 2006-03-29 at 18:25 +0300, ngwarai zed wrote: But still the problem is not solved. Just to recap on the problem: I just want the deliberate php errors Imake to shown as errors on the php page when the script runs. Yes, that should be the normal behaviour. Check your error_reporting setting. It should be one of the following (see below). The most common would be: error_reporting = E_ALL If this still doesn't work, try the default php.ini.dist and copy it over your php.ini. Cheers, Chris - error_reporting values - ; reporting level ; E_ALL - All errors and warnings (doesn't include E_STRICT) ; E_ERROR - fatal run-time errors ; E_WARNING - run-time warnings (non-fatal errors) ; E_PARSE - compile-time parse errors ; E_NOTICE - run-time notices (these are warnings which often result ; from a bug in your code, but it's possible that it was ; intentional (e.g., using an uninitialized variable and ; relying on the fact it's automatically initialized to an ; empty string) ; E_STRICT - run-time notices, enable to have PHP suggest changes ; to your code which will ensure the best interoperability ; and forward compatibility of your code ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup ; E_CORE_WARNING- warnings (non-fatal errors) that occur during PHP's ; initial startup ; E_COMPILE_ERROR - fatal compile-time errors ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) ; E_USER_ERROR - user-generated error message ; E_USER_WARNING- user-generated warning message ; E_USER_NOTICE - user-generated notice message -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error reporting problem
On Wed, 2006-03-29 at 16:38 +0300, ngwarai zed wrote: I tried changing display_errors = On and error_reporting = On in php.ini , restarted httpd but when I check with phpinfo() I still see display_errors set to Off and error_reporting set to 2047. My php script still does not show any errors. Why are my changes to php.ini not refrlected when I run phpinfo() ? Where am I getting it all wrong? Here are the things I would try (I'm assuming Linux/Apache setup): 1) verify that there aren't any typo's that are causing fatal problems in your php.ini 2) look at the output of phpinfo() and verify the location of the php.ini script. Default locations on *nix systems can be /usr/local/lib/php.ini or /etc/php.ini depending on how PHP was built. You might be modifying the wrong file (I've done that more than once). 3) check your apache config, see if there's anything that might be overriding your setup. 4) check your script for any ini_set() function calls that might be changing display_errors. Cheers, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php error reporting problem
hi, I omitted a semicolon ; at the end of a php statement on purpose to see what the error looks like. I ran the script and a blank page just came out.No error message. I then edited php.ini and set Display_errors = On and errror_reporting = E_ALL then restarted httpd. Ran the script again and the same thing happens. My question is:- how do I make php to show me a simple error like omitting a semicolon?
Re: [PHP] php error reporting problem
ngwarai zed wrote: hi, I omitted a semicolon ; at the end of a php statement on purpose to see what the error looks like. I ran the script and a blank page just came out.No error message. I then edited php.ini and set Display_errors = On and errror_reporting = E_ALL then restarted httpd. Ran the script again and the same thing happens. My question is:- how do I make php to show me a simple error like omitting a semicolon? Sure you're editing the right php.ini file? No .htaccess files disabling error display? ini_set turning it off? -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error reporting problem
At 10:57 AM 3/28/2006, ngwarai zed wrote: hi, I omitted a semicolon ; at the end of a php statement on purpose to see what the error looks like. I ran the script and a blank page just came out.No error message. I then edited php.ini and set Display_errors = On and errror_reporting = E_ALL then restarted httpd. Ran the script again and the same thing happens. My question is:- how do I make php to show me a simple error like omitting a semicolon? If you omit the semicolon at the end of a line, PHP attempts to join it with the next line into one statement. Sometimes, by coincidence, this results in a legal statement. To show the error message, enter two statements that you're sure will combine into invalid syntax, such as: $x = 4 $y = 3; Their concatenation results in: $x = 4 $y = 3; which should get you parse error, unexpected T_VARIABLE. Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php error message
I am new to working with php and I am having trouble trying to figure out this following error message that is displayed when I access a php file. Can you tell me what this error message means (in plain English) and what steps I might take to correct it? Warning: Cannot modify header information - headers already sent by (output started at /usr/home/ecmartin/public_html/ethics06/calendarlogin.php:8) in /usr/home/ecmartin/public_html/ethics06/sas.php on line 34 The page that displays this error has a small php log-in script on in. (Depending on where I place the script in the page code, the error message moves to a different location on the page). The page originally was an html page that contained typical stylesheet data, javascript scripts (for headers and menus) and a flash-based menu. ALL of these features still work when the page is displayed (as well as the php log-in script), however, I cannot get rid of the error message. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error tracking on new server
- Original Message - From: Terry Romine [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, August 07, 2005 10:03 AM Subject: [PHP] PHP error tracking on new server ... The problem is that when an error occurs, the page just comes up blank, Does your hosting service give you access to the PHP error log? Mine lists it under CGI Errors or something like that, but I can go to a web page and refresh it and see my PHP errors. lk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error tracking on new server
My hosting service recently switched to a newer server and in transporting the websites (many) over, they set up php different (vers 4.3.10). I know it's not nice to show errors on a published website, but I don't have a testing server, and I need to debug scripts once in a while. The problem is that when an error occurs, the page just comes up blank, and I have to practically pick it apart one line at a time to track down the problem. I tried ini_set('display_errors',TRUE); error_reporting(E_ERROR | E_WARNING | E_PARSE); but that doesn't seem to matter either. From phpinfo() it says display_errors is set off and error_reporting is 7. Any ideas on what flag may need to be set and how to do it on a file- by-file basis so I am only tweaking it when testing? Terry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error tracking on new server
Hey Terry-- On 8/7/05 11:03 AM, Terry Romine [EMAIL PROTECTED] wrote: Any ideas on what flag may need to be set and how to do it on a file- by-file basis so I am only tweaking it when testing? Terry Does your hosting provider support .htaccess? If so, you may be able to change the error reporting settings by providing your own .htaccess file which contains something like: php_flag display_errors on HTH, Marco -- BeebleX - The PHP Search Engine http://beeblex.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error on form
Hello, I am trying to get a form to work integrating html with PHP. the code I have is: ? $form_block = FORM METHOD=\POST\ ACTION=\$PHP_SELF\ pstrongYour Name:/strong /br INPUT type=\text\ NAME=\senders_name\ SIZE=30/p pstrongpYour E-mail Address:/strong /br INPUT type=\text\ NAME=\senders_email\ SIZE=30/p pstrongMessage:/strong /br TEXTAREA NAME=\message\ COLS=30 ROWS=5 WRAP=virtual/TEXTAREA/p INPUT type=\hidden\ name=\op\ value=\ds\ pINPUT TYPE=\submit\ NAME=\submit\ VALUE=\Send this Form\/p /FORM; if ($_POST['op'] !=ds) { // they need to see the form echo $form_block; } else if ($_POST['op'] ==ds) { //check value of $_POST['sender name'] if ($_POST['sender_name'] ==) { $name_err = font color=redPlease enter your name!/font /br; $send =no; } //check value of $_POST['sender_email'] if ($POST['sender_email'] ==) { $email_err =font color=redPlease enter your email address!/font /br; $send= no; } //check value of $_POST['message'] if ($POST['message'] ==) { $message_err = font color=redPlease enter a message!/font /br; $send =no; } if ($send !=no) { //it's o.k to send, so build the mail $msg =E-MAIL SENT FROM WWW SITE\n; $msg .=Senders Name: $POST['senders_name']\n; $msg .=Senders E-MAIL: $POST['senders_email']\n; $msg .=Senders Name: $POST['message']\n\n; $to =[EMAIL PROTECTED]; $subject = There has been a disturbance in the Force; $mailheaders .=Reply-To: $_POST['sender_email']\n; //send the mail mail ($to, $subject, $msg, $mailheaders); //display confirmation to user echo pmail has been sent!/p; } else if ($send ==no) { //print error messages echo $name_err; echo $email_err; echo $message_err; echo $form_block; } } ? and the error I get is: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form_test.php on line 58 the above code is just the php form part of the page not the entire code, so it would be impossible to determine line 58, but I was hoping someone would be able to spot the problem or at least explain the error to a relative newbie. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP error on form
[snip] Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form_test.php on line 58 [/snip] Send us the first 60 or so lines of the code and we'll see what we can see. I strongly suspect that it is the lines where you have; echo $a_variable; The quotes in this case are not needed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP error on form
[snip] and the error I get is: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form_test.php on line 58 [/snip] I forgot to say that the code you sent does not include 58 lines... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP error on form
From: Bruce Gilbert [mailto:[EMAIL PROTECTED] Hello, I am trying to get a form to work integrating html with PHP. the code I have is: ? $form_block = FORM METHOD=\POST\ ACTION=\$PHP_SELF\ pstrongYour Name:/strong /br INPUT type=\text\ NAME=\senders_name\ SIZE=30/p pstrongpYour E-mail Address:/strong /br INPUT type=\text\ NAME=\senders_email\ SIZE=30/p pstrongMessage:/strong /br TEXTAREA NAME=\message\ COLS=30 ROWS=5 WRAP=virtual/TEXTAREA/p INPUT type=\hidden\ name=\op\ value=\ds\ pINPUT TYPE=\submit\ NAME=\submit\ VALUE=\Send this Form\/p /FORM; if ($_POST['op'] !=ds) { // they need to see the form echo $form_block; } else if ($_POST['op'] ==ds) { //check value of $_POST['sender name'] if ($_POST['sender_name'] ==) { $name_err = font color=redPlease enter your name!/font /br; $send =no; } //check value of $_POST['sender_email'] if ($POST['sender_email'] ==) { $email_err =font color=redPlease enter your email address!/font /br; $send= no; } //check value of $_POST['message'] if ($POST['message'] ==) { $message_err = font color=redPlease enter a message!/font /br; $send =no; } if ($send !=no) { //it's o.k to send, so build the mail $msg =E-MAIL SENT FROM WWW SITE\n; $msg .=Senders Name: $POST['senders_name']\n; $msg .=Senders E-MAIL: $POST['senders_email']\n; $msg .=Senders Name: $POST['message']\n\n; $to =[EMAIL PROTECTED]; $subject = There has been a disturbance in the Force; $mailheaders .=Reply-To: $_POST['sender_email']\n; //send the mail mail ($to, $subject, $msg, $mailheaders); //display confirmation to user echo pmail has been sent!/p; } else if ($send ==no) { //print error messages echo $name_err; echo $email_err; echo $message_err; echo $form_block; } } ? and the error I get is: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form _test.php on line 58 the above code is just the php form part of the page not the entire code, so it would be impossible to determine line 58, but I was hoping someone would be able to spot the problem or at least explain the error to a relative newbie. thanks I don't think your error message is indicative of this, but PHP /will/ choke on your lines that include array key references in them, such as: $mailheaders .=Reply-To: $_POST['sender_email']\n; In those cases, you need to either leave the quotes for the variable or enclose the var in curly braces: $mailheaders .=Reply-To: . $_POST['sender_email'] . \n; $mailheaders .=Reply-To: {$_POST['sender_email']}\n; I generally prefer the latter, but it's entirely up to the user. Try fixing those and see if it still errors. -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error on form
--- Bruce Gilbert [EMAIL PROTECTED] wrote: Hello, I am trying to get a form to work integrating html with PHP. I see a couple problems... This line: if ($POST['sender_email'] ==) { Should probably be: if ($_POST['sender_email'] ==) { Note the underscore in $_POST Same thing here: if ($POST['message'] ==) { Should probably be: if ($_POST['message'] ==) { You are getting errors here: $msg .=Senders Name: $_POST['senders_name']\n; $msg .=Senders E-MAIL: $_POST['senders_email']\n; $msg .=Senders Name: $_POST['message']\n\n; $to =[EMAIL PROTECTED]; $subject = There has been a disturbance in the Force; $mailheaders .=Reply-To: $_POST['sender_email']\n; You can't echo out the post vars like that these lines need to look like: $msg .=Senders Name: .$_POST['senders_name'].\n; $msg .=Senders E-MAIL: .$_POST['senders_email'].\n; $msg .=Senders Name: .$_POST['message'].\n\n; $to =[EMAIL PROTECTED]; $subject = There has been a disturbance in the Force; $mailheaders .=Reply-To: .$_POST['sender_email'].\n; It sounds like the error on line 58 (whatever that is) is probably something similar to the last problem. -k. Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php error
Hi I've a strange problem When I try to send a form with method=POST to a php-file I always get an HTTP 404 error. I really don't know why, because the file exists on the server. I use IIS 5.1 Tnx. Stefan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php error with MySql
- Original Message - From: Wil [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, January 06, 2005 9:35 PM Subject: [PHP] Php error with MySql I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); Try echo mysql_error() just after your query. It's rather common to make typos or forget to select DB. $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? Thanks, Wil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php error with MySql
Apologies...just have had loose fingers - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Wil [EMAIL PROTECTED]; php-general@lists.php.net Sent: Thursday, January 06, 2005 3:31 PM Subject: RE: [PHP] Php error with MySql [snip] ...stuff... Wil [/snip] I replied to this over an hour ago, please do not repost. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php error with MySql
I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? Thanks, Wil
[PHP] Php error with MySql
I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? Thanks, Wil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php error with MySql
I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? Thanks, Wil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Php error with MySql
[snip] I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? [/snip] Perhaps your query failed, but you've got no error checking. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php error with MySql
From: Wil Hitchman [EMAIL PROTECTED] I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; Your query has failed for some reason, so $qResult is not a valid result set. Use mysql_error() to find out why. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php error with MySql
Wil Hitchman wrote: I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? Thanks, Wil Echo out mysql_error() after you execute mysql_query() -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Php error with MySql
[snip] ...stuff... Wil [/snip] I replied to this over an hour ago, please do not repost. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php error with MySql
sounds like there's something up with the query, perhaps the wrong table name. as a debugging method I usually use the die() clause when performing a query so I can ensure the query is correct. try using this: $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC) or die(could not run the query: . mysql_error()); chances are there is not a blog_entries table or an id field in the database you're connecting to. hope that helps, brian on 1/6/05 12:50 PM, Wil Hitchman at [EMAIL PROTECTED] wrote: I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? Thanks, Wil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php error with MySql
Wil Hitchman wrote: I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? What it's saying is that MySQL didn't like something you did, so could *NOT* give you back your blog_entries. So the $qResult is *NOT* a set of blog_entries. It's fasically just got the value FALSE in it -- because that's what mysql_query() returns when you mess up. The most likely source of your trouble is that your SQL query is 'wrong' somehow. Since it's so simple, we can pretty much say that either glob_entries is not the right table, or 'id' isn't the right field name. In general, however, you should do: $qResult = mysql_query(...) or trigger_error(mysql_error(), E_USER_ERROR); http://php.net/mysql_error will tell you EXACTLY what MySQL doesn't like. PS It's also possible (though unlikely given the actual error message and code you shows us) that you never connected to your database. You should do the same kind of thing with mysql_error where you do your mysql_connect(). -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php error with MySql
Wil wrote: I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 n= //error ends here with the following bit of code $qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC); $nRows = mysql_num_rows($qResult); $rString =n=.$nRows; If I am just naming a variable how is the argument not valid? It's not valid because your query didn't execute as you expected. So, there is no result resource. I would suggest you use mysql_error() after your query to see what's wrong. Janet -- Janet Valade -- janet.valade.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error catching....
What are those php functions that catch the PHP errors, not display it and do something to it while the user load a webpage. I don't remember what those are. :-( FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error catching....
What are those php functions that catch the PHP errors, not display it and do something to it while the user load a webpage. I don't remember what those are. :-( Look around set_error_handler() Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error catching....
* Thus wrote Scott Fletcher: What are those php functions that catch the PHP errors, not display it and do something to it while the user load a webpage. I don't remember what those are. :-( It sounds like you're looking for http://php.net/set_error_handler Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error catching....
On Tuesday 20 July 2004 22:48, Scott Fletcher wrote: What are those php functions that catch the PHP errors, not display it and do something to it while the user load a webpage. I don't remember what those are. :-( manual Error Handling and Logging Functions -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I disagree with what you say, but will defend to the death your right to tell such LIES! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error catching....
Close, but still not quite it. I can't remember what I did 6 to 8 months ago. I do remember that it was written to temporary suppress the php error while the other part of the php script can be allow to execute before unsupressing the php error. I do not meant the @ part.. It was a function where I can enter the PHP's defined parameter in the function. Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Scott Fletcher: What are those php functions that catch the PHP errors, not display it and do something to it while the user load a webpage. I don't remember what those are. :-( It sounds like you're looking for http://php.net/set_error_handler Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error catching....
* Thus wrote Scott Fletcher: Close, but still not quite it. I can't remember what I did 6 to 8 months ago. I do remember that it was written to temporary suppress the php error while the other part of the php script can be allow to execute before unsupressing the php error. I do not meant the @ part.. It was a function where I can enter the PHP's defined parameter in the function. or perhaps $oldval = ini_set('display_errors', false); // code ini_set('display_errors', $oldval); Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP error catching....
[snip] Close, but still not quite it. I can't remember what I did 6 to 8 months ago. I do remember that it was written to temporary suppress the php error while the other part of the php script can be allow to execute before unsupressing the php error. I do not meant the @ part.. It was a function where I can enter the PHP's defined parameter in the function. [/snip] Maybe http://www.php.net/error_reporting ? [re-snip] I can't remember what I did 6 to 8 months ago. [/re-snip] /* commenting is your friend */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error catching....
error_reporting( E_NONE )? Jon Scott Fletcher wrote: Close, but still not quite it. I can't remember what I did 6 to 8 months ago. I do remember that it was written to temporary suppress the php error while the other part of the php script can be allow to execute before unsupressing the php error. I do not meant the @ part.. It was a function where I can enter the PHP's defined parameter in the function. Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Scott Fletcher: What are those php functions that catch the PHP errors, not display it and do something to it while the user load a webpage. I don't remember what those are. :-( It sounds like you're looking for http://php.net/set_error_handler Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error catching....
[re-snip] I can't remember what I did 6 to 8 months ago. [/re-snip] /* commenting is your friend */ I definitely agree with you on that... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP error catching....
Error handlers? Plus, you can set up PHP to log errors to a file in 'php.ini'... -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 9:48 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP error catching What are those php functions that catch the PHP errors, not display it and do something to it while the user load a webpage. I don't remember what those are. :-( FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [php] error in manual?
On the page http://www.php.net/manual/en/language.oop5.visibility.php the first part reads: The visibility of a member or method can be defined by prefixing the declaration with the keywords: public, protected or private. Public declared items can be allow access to any caller. Protected limits access access to only classes inherited. Protected limits visiblity only to the class that defines the item. should be [I think] The visibility of a member or method can be defined by prefixing the declaration with the keywords: public, protected or private. Public declared items can be allow access to any caller. Protected limits access access to only classes inherited. PRIVATE limits visiblity only to the class that defines the item. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [php] error in manual?
Yes you're correct, this was fixed about a week ago and will show up when the manual is next built (which should be soon), here's the diff: http://cvs.php.net/diff.php/phpdoc/en/language/oop5/visibility.xml?r1=1.2r2=1.3 When you find errors like this be sure to file a doc bug report at bugs.php.net but be sure to search the bug database first! For example here's the report for this very bug: http://bugs.php.net/bug.php?id=29187 Regards, Philip On Tue, 20 Jul 2004, Nick W wrote: On the page http://www.php.net/manual/en/language.oop5.visibility.php the first part reads: The visibility of a member or method can be defined by prefixing the declaration with the keywords: public, protected or private. Public declared items can be allow access to any caller. Protected limits access access to only classes inherited. Protected limits visiblity only to the class that defines the item. should be [I think] The visibility of a member or method can be defined by prefixing the declaration with the keywords: public, protected or private. Public declared items can be allow access to any caller. Protected limits access access to only classes inherited. PRIVATE limits visiblity only to the class that defines the item. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Error
May be the cause is, that you've specified some include file with include('somefile'); but the file doesn't exist in /usr/share/php dir, which is the default path for include (.inc) files to be saved. OK, I see your point. The problem is I don't know what file/ directory it's looking for, so I don't know where to look for it. Like I said this a generic install, I didn't make any changes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Error
Can anyone tell me what linux and php is asking for here, this dir. and file is at this location, and chmoded to 755. Failed opening required './libraries/grab_globals.lib.php' (include_path='.:/php/includes:/usr/share/php') I guess what I'm asking is, it says the path is .:/php/includes I can't find that on the machine anywere and /usr/share/php that I did find, and I put the libraries dir. at that location, it still says it's not there What am I doing wrong Thanks...Tim
Re: [PHP] PHP Error
Tim Trimble wrote: Can anyone tell me what linux and php is asking for here, this dir. and file is at this location, and chmoded to 755. Failed opening required './libraries/grab_globals.lib.php' (include_path='.:/php/includes:/usr/share/php') I guess what I'm asking is, it says the path is .:/php/includes I can't find that on the machine anywere and /usr/share/php that I did find, and I put the libraries dir. at that location, it still says it's not there What am I doing wrong Thanks...Tim With the dot slash (./), it's looking for the file in a directory under the same directory that the script is running in - somefile.php - libraries | - grab_globals.lib.php -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error logs?
Where are the PHP error logs kept? Thanks, J. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error logs?
On Mon, 2003-10-20 at 16:34, Joseph Bannon wrote: Where are the PHP error logs kept? In the PHP error log file. Cheers, Rob. Ps. See your php.ini for the appropriate setting: error_log ;) -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php error log : productinfo finished message
Hi there, I have some wired messages inside my php errorlog file, telling me: [30-Jul-2003 20:02:53] ProductInfo finished There is an entry every few seconds! Does anybody know what this means? Thanx, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error log : productinfo finished message
* Thus wrote Merlin ([EMAIL PROTECTED]): Hi there, I have some wired messages inside my php errorlog file, telling me: [30-Jul-2003 20:02:53] ProductInfo finished There is an entry every few seconds! Does anybody know what this means? most likely a php script is using syslog() to report that 'ProductInfo finished'. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error log : productinfo finished message
most likely a php script is using syslog() to report that 'ProductInfo finished'. what is syslog and which ProductInfo? Can you be more specific? Thanx, merlin -- lt;IFRAME SRC=http://saratoga.globosapiens/associates/report_member.php?u=3color=EEE EEE scrolling=no frameborder=0 TITLE=My travel articles width=330 height=155 ALLOWTRANSPARENCY=truea href=http://www.globosapiens.net; title=Worldwide Travel CommunityaTravel Communitya/ /IFRAME Curt Zirzow [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] * Thus wrote Merlin ([EMAIL PROTECTED]): Hi there, I have some wired messages inside my php errorlog file, telling me: [30-Jul-2003 20:02:53] ProductInfo finished There is an entry every few seconds! Does anybody know what this means? most likely a php script is using syslog() to report that 'ProductInfo finished'. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error log : productinfo finished message
* Thus wrote Merlin ([EMAIL PROTECTED]): most likely a php script is using syslog() to report that 'ProductInfo finished'. what is syslog and which ProductInfo? Can you be more specific? syslog() is a phpfunction that allows php script to write to the phplog file. http://php.net/syslog I'm not entirely sure what the ProductInfo is. I'm assuming it has to do with one of the scripts running on your server. Perhaps a 'find /webdir/ -name *.php -exec grep ProductInfo {} \;' might yield the problem. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error messages
I am getting this error message when i use file() to convert a text document to an array. Warning: file(http://www.something.com/the_filename.txt;) - Error 0 in /nfs/cust/directory_structure/index.php on line 21 I have looked on google and on php.net/docs for information on this problem (error 0 and error docs) and i cannot find any. can anyone point me to a php error documentation file or tell me what is wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error page not redirecting
I'm having a dispute with an ISP (surprise) about the non-functioning of a PHP error script. Currently, the error script is at http://www.touristguides.org.uk/error.php - a direct click on that link will redirect you, using: header(Location: http://www.touristguides.org.uk/index.php;); And sure enough, you end up at /index.php However, when I ask for /nosuchpage I get a blank window, and the following source is output: htmlbody/body/html And that's all. I've stripped down all the complicated stuff from the error page, and I can't understand why it will redirect fine if it's called directly, but not if it is functioning as an error page (the .htaccess has the necessary ErrorDocument directives in it). The ISP say I believe the problem may lie in the fact a 404 status has already been sent so it nullifies the 302 redirect status. I suggest searching php.net for more details - which, naturally, I have done, without enlightenment. But the script works nicely on another server, suggesting that it might be something to do with the Apache configuration. I'm rapidly getting out of my depth now, and would appreciate some guidance on where to turn next. Thanks, Nick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error page not redirecting
Nick Holden wrote: I'm having a dispute with an ISP (surprise) about the non-functioning of a PHP error script. Currently, the error script is at http://www.touristguides.org.uk/error.php - a direct click on that link will redirect you, using: header(Location: http://www.touristguides.org.uk/index.php;); And sure enough, you end up at /index.php However, when I ask for /nosuchpage I get a blank window, and the following source is output: htmlbody/body/html And that's all. I've stripped down all the complicated stuff from the error page, and I can't understand why it will redirect fine if it's called directly, but not if it is functioning as an error page (the .htaccess has the necessary ErrorDocument directives in it). The ISP say I believe the problem may lie in the fact a 404 status has already been sent so it nullifies the 302 redirect status. I suggest searching php.net for more details - which, naturally, I have done, without enlightenment. But the script works nicely on another server, suggesting that it might be something to do with the Apache configuration. I'm rapidly getting out of my depth now, and would appreciate some guidance on where to turn next. Thanks, Nick I'm not an expert at this either, but you could test whether the nosuchpage 404 is getting to your error.php by replacing the redirection with some ordinary html that will display a message to you. At least that way you will know whether its the location header that is the problem or not. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error page not redirecting
At 10:59 10-2-2003, you wrote: I'm having a dispute with an ISP (surprise) about the non-functioning of a PHP error script. Currently, the error script is at http://www.touristguides.org.uk/error.php - a direct click on that link will redirect you, using: header(Location: http://www.touristguides.org.uk/index.php;); And sure enough, you end up at /index.php However, when I ask for /nosuchpage I get a blank window, and the following source is output: And that's all. - check the url of 'nosuchpage' (i assume that that is a directory?), try to include the filename: /nosuchpage/index.html - check whether you rely on POST or GET data in '/nosuchpage' - if this fails, try a .htaccess file with a line ErrorDocument 404 /nosuchpage/error.php this will save your POST and GET variables (must be a RELATIVE link) But the script works nicely on another server, suggesting that it might be something to do with the Apache configuration. is it approached via exactly the same detour? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Error
I was able to successfully install the php on my win2k server. I am, however, getting an error any time I try to initialize a variable. This is the error I am getting: Notice: Undefined index: adv_auth in ...\mysql\lib.inc.php on line 132 I am not sure as to whether I forgot to do something when I installed php or whether I need to somehow modify IIS so that variable initialization will work. Thank you. Sincerely, Dale -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Error
This is just a notice, somewhere in the code is something like this if($array['index']=='something') do_something(); but $array['index'] is undefined. Should be if(is_array($array) array_key_exists('index',$array) $array['index']=='something') ... (which is quite long). Another option is to set up error_reporting to E_ALL ~E_NOTICE in your php.ini (you used php.ini-recomended, right?) Dale wrote: I was able to successfully install the php on my win2k server. I am, however, getting an error any time I try to initialize a variable. This is the error I am getting: Notice: Undefined index: adv_auth in ...\mysql\lib.inc.php on line 132 I am not sure as to whether I forgot to do something when I installed php or whether I need to somehow modify IIS so that variable initialization will work. Thank you. Sincerely, Dale -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP error starting Apache 2.0.40
List, Cannot load /opt/httpd/modules/libphp4.so into server: /opt/httpd/modules/libphp4.so: undefined symbol: mbstr_treat_data I'm getting this trying to start Apache 2.0.40 with PHP 4.2.3, can anyone point to where I should start looking? I looked at google but only found a few results. Has anyone else seen this? /B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Error
Yeah right... Sure, we can use ob_start(), but the poster of original message apparently does not make any use of these functions , therefore his problem is easily solvable by just keeping track of output start rather then creating a whole buffering system. After all, why would you use some strange (for the poster) functions when he can just delete the space/newline after ? ? Thanks for suggesting an alternative. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 6:49 PM To: Maxim Maletsky Subject: RE: [PHP] PHP Error it says that on line 15 of settings.php there's an output. you need to set cookies BEFORE any output. that's not quiet right! you can use the output buffering functions such as ob_start() to avoid this problem! -- 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] Emanuel.exe -- 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 Error
Goody, a virus. LOL Note: According to the Virus scanner used on php.net (or on the mailing list. whichever) Emanuel.exe is a virus. Here is the URL for information on it: http://vil.mcafee.com/dispVirus.asp?virus_k=98881; Gotta hate when that happens. -- Plutarck Should be working on something... ...but forgot what it was. jessica [EMAIL PROTECTED] wrote in message 016a01c0cbff$69f1fee0$0300a8c0@acer345t">news:016a01c0cbff$69f1fee0$0300a8c0@acer345t... Yeah right... Sure, we can use ob_start(), but the poster of original message apparently does not make any use of these functions , therefore his problem is easily solvable by just keeping track of output start rather then creating a whole buffering system. After all, why would you use some strange (for the poster) functions when he can just delete the space/newline after ? ? Thanks for suggesting an alternative. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 6:49 PM To: Maxim Maletsky Subject: RE: [PHP] PHP Error it says that on line 15 of settings.php there's an output. you need to set cookies BEFORE any output. that's not quiet right! you can use the output buffering functions such as ob_start() to avoid this problem! -- 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 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 Error
Hello Folks , I'm rebuilding my PHP Site with a new design and i want to keep my set_cookie commands to allow people own settings for my site , but actually now it gives me this error message : Warning: Cannot add header information - headers already sent by (output started at /www/htdocs/phptest/Quake.lu/www/settings.php:15) in /www/htdocs/phptest/Quake.lu/www/settingsystem.php on line 6 Any idea what's wrong with my php script ? I'm looking up to your help Thanks , bye Marc Dondlinger (aka HiGhPwR) [EMAIL PROTECTED] http://www.quakeXtreme.com http://www.quake.lu -- 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 Error
it says that on line 15 of settings.php there's an output. you need to set cookies BEFORE any output. Cheers, Maxim Maletsky www.PHPBeginner.com -Original Message- From: Marc Dondlinger [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 6:37 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP Error Hello Folks , I'm rebuilding my PHP Site with a new design and i want to keep my set_cookie commands to allow people own settings for my site , but actually now it gives me this error message : Warning: Cannot add header information - headers already sent by (output started at /www/htdocs/phptest/Quake.lu/www/settings.php:15) in /www/htdocs/phptest/Quake.lu/www/settingsystem.php on line 6 Any idea what's wrong with my php script ? I'm looking up to your help Thanks , bye Marc Dondlinger (aka HiGhPwR) [EMAIL PROTECTED] http://www.quakeXtreme.com http://www.quake.lu -- 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 Error
Yeah right... Sure, we can use ob_start(), but the poster of original message apparently does not make any use of these functions , therefore his problem is easily solvable by just keeping track of output start rather then creating a whole buffering system. After all, why would you use some strange (for the poster) functions when he can just delete the space/newline after ? ? Thanks for suggesting an alternative. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 6:49 PM To: Maxim Maletsky Subject: RE: [PHP] PHP Error it says that on line 15 of settings.php there's an output. you need to set cookies BEFORE any output. that's not quiet right! you can use the output buffering functions such as ob_start() to avoid this problem! -- 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]
Re: [PHP] php error code.
Whoa Whoa! Wait a minute! There is a couple of webservers here that use PHP. Some of them when it display the error message or warning message, it never display the "include_path='.:/usr/local/lib/php.ini'". Some of the other, it did display the "include_path'.:/usr/local/lib/php.ini'". So, something definitely is going on that I don't know about. So, I wanted to know how to turn off the display "include_path'.:/usr/local/lib/php.ini' when there is a error message. That's all. Scott ""Scott Fletcher"" [EMAIL PROTECTED] wrote in message 9a04nt$5bi$[EMAIL PROTECTED]">news:9a04nt$5bi$[EMAIL PROTECTED]... Hi! When the website have a script error, it display the error message (sort of a debugging error). What I don't like about that error message is that it display the include_path comments. Warning: Failed opening '../dp_banner_menu_final1_support.php' for inclusion (include_path='.:/usr/local/lib/php.ini') in /home/website/test_knowledge_base/support/tech_support.php on line 10 The comment with "(include_path='.:/usr/local/lib/php.ini')". It would tell people where the the php.ini file is and would encourage somebody to hack into it. What can I do about it? Would I be better off with using the PHP x.xx.xx pl1 instead of PHP x.xx.xx? Thanks, Scott -- 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 error code.
On Friday 30 March 2001 15:54, you wrote: Warning: Failed opening '../dp_banner_menu_final1_support.php' for inclusion (include_path='.:/usr/local/lib/php.ini') in /home/website/test_knowledge_base/support/tech_support.php on line 10 The comment with "(include_path='.:/usr/local/lib/php.ini')". It would tell people where the the php.ini file is and would encourage somebody to hack into it. Don't worry about that. if someone can get enough rights on your server to edit php.ini, then he can also execute "find" to, well, find it in the first place. So it absolutely doesn't matter whether that info is displayed or not. btw - No user should get a warning on your pages anyway :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Even idiots can handle computers, and many do. -- 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 error code.
Hi! When the website have a script error, it display the error message (sort of a debugging error). What I don't like about that error message is that it display the include_path comments. Warning: Failed opening '../dp_banner_menu_final1_support.php' for inclusion (include_path='.:/usr/local/lib/php.ini') in /home/website/test_knowledge_base/support/tech_support.php on line 10 The comment with "(include_path='.:/usr/local/lib/php.ini')". It would tell people where the the php.ini file is and would encourage somebody to hack into it. What can I do about it? Would I be better off with using the PHP x.xx.xx pl1 instead of PHP x.xx.xx? Thanks, Scott -- 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 error code.
If you have permission to modify php.ini, see the setting "display_errors" and the attached comments. You can tell PHP to write these error messages to a log file instead of to the browser. Kirk -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 1:07 PM To: [EMAIL PROTECTED] Subject: [PHP] php error code. Hi! When the website have a script error, it display the error message (sort of a debugging error). What I don't like about that error message is that it display the include_path comments. What can I do about it? Would I be better off with using the PHP x.xx.xx pl1 instead of PHP x.xx.xx? Thanks, Scott -- 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 error code.
In a message dated 29/03/2001 21:42:57 GMT Daylight Time, [EMAIL PROTECTED] writes: If you have permission to modify php.ini, see the setting "display_errors" and the attached comments. You can tell PHP to write these error messages to a log file instead of to the browser. Kirk If I make a change to my php.ini file, once I re-upload it do I need to restart the server or something as none of my changes are taking place? Ade -- 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 error code.
Yes, the php.ini files is read when apache start. py At 03:53 PM 3/29/01 -0500, you wrote: In a message dated 29/03/2001 21:42:57 GMT Daylight Time, [EMAIL PROTECTED] writes: If you have permission to modify php.ini, see the setting "display_errors" and the attached comments. You can tell PHP to write these error messages to a log file instead of to the browser. Kirk If I make a change to my php.ini file, once I re-upload it do I need to restart the server or something as none of my changes are taking place? Ade -- 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]
[PHP] PHP error parsing SQL string containing assoc. array
I'm trying to write a sql statement (for Oracle) that uses an associative array element as a dynamic value. PHP is choking on this line: $sql = "insert into sessions(session_id, user_id, session_expiration) values ('$sess_id', $user_fields['USER_ID'], sysdate + ($user_fields['MINS_TILL_EXPIRE'] * 1/1440))" I get this error back from PHP: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' Can I not use my associative array like this? -- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: [EMAIL PROTECTED] hm: [EMAIL PROTECTED] ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- 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 error parsing SQL string containing assoc. array
Hi All, PHP is unable to resolve the variable you are trying to use within a stting. If you use complex array structures you have to write it like this: $sql = "insert into sessions(session_id, user_id, session_expiration) values ('$sess_id', " . $user_fields['USER_ID'] . "', sysdate + (" . $user_fields'MINS_TILL_EXPIRE'] . " * 1/1440))"; or use $sql = sprintf("insert into sessions(session_id, user_id, session_expiration) values ('%s', sysdate + (%i * 1/1440))", $sess_id', $user_fields['USER_ID'], $user_fields['MINS_TILL_EXPIRE']); Your sample code also mised a ' after the first variable ! - Frank I'm trying to write a sql statement (for Oracle) that uses an associative array element as a dynamic value. PHP is choking on this line: $sql = "insert into sessions(session_id, user_id, session_expiration) values ('$sess_id', $user_fields['USER_ID'], sysdate + ($user_fields['MINS_TILL_EXPIRE'] * 1/1440))" I get this error back from PHP: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' Can I not use my associative array like this? -- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: [EMAIL PROTECTED] hm: [EMAIL PROTECTED] ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- 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]