[PHP] Error Reporting

2011-12-23 Thread Floyd Resler
I know this is a very basic question and I'm almost embarrassed to ask it, but 
it's something I really struggle with.  That is, getting the right combination 
of error reporting options together to report the errors I want.  Right now, I 
get the errors I want except for parse errors.  Basically, I want all errors 
but not warnings.  What would be a good combination of error report options for 
my php.ini file?

Thanks!
Floyd


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



Re: [PHP] Error Reporting

2011-12-23 Thread Jim Lucas
On 12/23/2011 8:13 AM, Floyd Resler wrote:
 I know this is a very basic question and I'm almost embarrassed to ask it, 
 but it's something I really struggle with.  That is, getting the right 
 combination of error reporting options together to report the errors I want.  
 Right now, I get the errors I want except for parse errors.  Basically, I 
 want all errors but not warnings.  What would be a good combination of error 
 report options for my php.ini file?
 
 Thanks!
 Floyd
 
 

I run this on my server:

error_reporting = E_ALL
display_errors = On
log_errors = On

It shows me everything, including warnings.

If you want to hide the Warning, then you would use this

error_reporting = E_ALL  ~E_NOTICE
display_errors = On
log_errors = On

E_NOTICE includes warnings.

Reference here: http://us.php.net/manual/en/errorfunc.constants.php

-- 
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/

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



Re: [PHP] Error Reporting/Display Errors Issues?

2011-05-10 Thread xianhua zhou
You may need to check the running php code,  those values can be
changed during runtime.

2011/5/10 Mike Mackintosh mike.mackint...@angrystatic.com:
 Anyone else notice PHP throwing Warning and Notices even when display errors 
 and error reporting disabled?

 I compiled PHP with the following:

 './configure'  '--prefix=/usr/local/php-5.3.3' '--enable-cli' 
 '--disable-debug' '--disable-rpath' '--disable-static' '--with-pic' 
 '--with-openssl=/usr' '--enab
 le-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-curl' 
 '--with-zlib-dir=/usr' '--with-xsl' '--enable-exif' '--enable-ftp' 
 '--with-gd' '--enable-gd-native-ttf' '-
 -with-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' 
 '--with-freetype-dir=/usr' '--with-gettext' '--with-iconv' '--with-imap' 
 '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--ena
 ble-mbstring' '--with-mcrypt' '--with-mhash' '--with-mime-magic' 
 '--with-mysql=/usr/local/mysql-5.1.49' '--with-pcre-regex=/usr' 
 '--with-pspell=/usr' '--enable-sockets' '--enable-wd
 dx' '--with-xmlrpc' '--with-zlib=/usr' '--with-pear' '--with-layout=GNU' 
 '--with-ldap' '--enable-pdo' '--enable-soap' 
 '--with-apxs2=/usr/local/apache-2.2.16/bin/apxs' '--enable-pcnt
 l' '--enable-mailparse' '--enable-zip' '--with-zip=/usr' '--with-bz2=/usr' 
 '--with-config-file-path=/etc' 
 '--with-config-file-scan-dir=/usr/local/php-5.3.3/etc' '--with-pdo-mysql=/u
 sr/local/mysql-5.1.49' '--with-openssl=/usr'

 I have also set the following:

 display_errors = Off = Off
 display_startup_errors = Off = Off
 error_append_string = no value = no value
 error_log = no value = no value
 error_prepend_string = no value = no value
 error_reporting = 0 = 0

 But i continue to receive Strict/Notice and Warnings in code that i wish to 
 be hidden.

 Any suggestions?

 Thanks,

 Mike
 --
 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] Error Reporting/Display Errors Issues?

2011-05-10 Thread admin
Try this for me in a page you wish to not display errors.
?php

error_reporting(0);
ini_set('display_errors', 0);

?


What you are doing with this function is over riding the php.ini file and
turning off the errors on that page.
Place the code at the beginning of php before any includes.

If this works errors are turned on or your disabling function is malformed.



Richard L. Buskirk



-Original Message-
From: Mike Mackintosh [mailto:mike.mackint...@angrystatic.com] 
Sent: Monday, May 09, 2011 10:34 PM
To: php-general@lists.php.net
Subject: [PHP] Error Reporting/Display Errors Issues?

Anyone else notice PHP throwing Warning and Notices even when display errors
and error reporting disabled?

I compiled PHP with the following:

'./configure'  '--prefix=/usr/local/php-5.3.3' '--enable-cli'
'--disable-debug' '--disable-rpath' '--disable-static' '--with-pic'
'--with-openssl=/usr' '--enab
le-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-curl'
'--with-zlib-dir=/usr' '--with-xsl' '--enable-exif' '--enable-ftp'
'--with-gd' '--enable-gd-native-ttf' '-
-with-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-freetype-dir=/usr' '--with-gettext' '--with-iconv' '--with-imap'
'--with-kerberos=/usr' '--with-imap-ssl=/usr' '--ena
ble-mbstring' '--with-mcrypt' '--with-mhash' '--with-mime-magic'
'--with-mysql=/usr/local/mysql-5.1.49' '--with-pcre-regex=/usr'
'--with-pspell=/usr' '--enable-sockets' '--enable-wd
dx' '--with-xmlrpc' '--with-zlib=/usr' '--with-pear' '--with-layout=GNU'
'--with-ldap' '--enable-pdo' '--enable-soap'
'--with-apxs2=/usr/local/apache-2.2.16/bin/apxs' '--enable-pcnt
l' '--enable-mailparse' '--enable-zip' '--with-zip=/usr' '--with-bz2=/usr'
'--with-config-file-path=/etc'
'--with-config-file-scan-dir=/usr/local/php-5.3.3/etc' '--with-pdo-mysql=/u
sr/local/mysql-5.1.49' '--with-openssl=/usr'

I have also set the following:

display_errors = Off = Off
display_startup_errors = Off = Off
error_append_string = no value = no value
error_log = no value = no value
error_prepend_string = no value = no value
error_reporting = 0 = 0

But i continue to receive Strict/Notice and Warnings in code that i wish to
be hidden.

Any suggestions?

Thanks,

Mike
-- 
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] Error Reporting/Display Errors Issues?

2011-05-10 Thread Mike Mackintosh
Unfortunately setting that within the PHP file directly still results in errors 
and notices being displayed. I'm at a loss.

Sent from my iPhone

On May 10, 2011, at 5:40, ad...@buskirkgraphics.com wrote:

 Try this for me in a page you wish to not display errors.
 ?php
 
 error_reporting(0);
 ini_set('display_errors', 0);
 
 ?
 
 
 What you are doing with this function is over riding the php.ini file and
 turning off the errors on that page.
 Place the code at the beginning of php before any includes.
 
 If this works errors are turned on or your disabling function is malformed.
 
 
 
 Richard L. Buskirk
 
 
 
 -Original Message-
 From: Mike Mackintosh [mailto:mike.mackint...@angrystatic.com] 
 Sent: Monday, May 09, 2011 10:34 PM
 To: php-general@lists.php.net
 Subject: [PHP] Error Reporting/Display Errors Issues?
 
 Anyone else notice PHP throwing Warning and Notices even when display errors
 and error reporting disabled?
 
 I compiled PHP with the following:
 
 './configure'  '--prefix=/usr/local/php-5.3.3' '--enable-cli'
 '--disable-debug' '--disable-rpath' '--disable-static' '--with-pic'
 '--with-openssl=/usr' '--enab
 le-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-curl'
 '--with-zlib-dir=/usr' '--with-xsl' '--enable-exif' '--enable-ftp'
 '--with-gd' '--enable-gd-native-ttf' '-
 -with-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
 '--with-freetype-dir=/usr' '--with-gettext' '--with-iconv' '--with-imap'
 '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--ena
 ble-mbstring' '--with-mcrypt' '--with-mhash' '--with-mime-magic'
 '--with-mysql=/usr/local/mysql-5.1.49' '--with-pcre-regex=/usr'
 '--with-pspell=/usr' '--enable-sockets' '--enable-wd
 dx' '--with-xmlrpc' '--with-zlib=/usr' '--with-pear' '--with-layout=GNU'
 '--with-ldap' '--enable-pdo' '--enable-soap'
 '--with-apxs2=/usr/local/apache-2.2.16/bin/apxs' '--enable-pcnt
 l' '--enable-mailparse' '--enable-zip' '--with-zip=/usr' '--with-bz2=/usr'
 '--with-config-file-path=/etc'
 '--with-config-file-scan-dir=/usr/local/php-5.3.3/etc' '--with-pdo-mysql=/u
 sr/local/mysql-5.1.49' '--with-openssl=/usr'
 
 I have also set the following:
 
 display_errors = Off = Off
 display_startup_errors = Off = Off
 error_append_string = no value = no value
 error_log = no value = no value
 error_prepend_string = no value = no value
 error_reporting = 0 = 0
 
 But i continue to receive Strict/Notice and Warnings in code that i wish to
 be hidden.
 
 Any suggestions?
 
 Thanks,
 
 Mike
 -- 
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Error Reporting/Display Errors Issues?

2011-05-09 Thread Mike Mackintosh
Anyone else notice PHP throwing Warning and Notices even when display errors 
and error reporting disabled?

I compiled PHP with the following:

'./configure'  '--prefix=/usr/local/php-5.3.3' '--enable-cli' '--disable-debug' 
'--disable-rpath' '--disable-static' '--with-pic' '--with-openssl=/usr' '--enab
le-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-curl' 
'--with-zlib-dir=/usr' '--with-xsl' '--enable-exif' '--enable-ftp' '--with-gd' 
'--enable-gd-native-ttf' '-
-with-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' 
'--with-freetype-dir=/usr' '--with-gettext' '--with-iconv' '--with-imap' 
'--with-kerberos=/usr' '--with-imap-ssl=/usr' '--ena
ble-mbstring' '--with-mcrypt' '--with-mhash' '--with-mime-magic' 
'--with-mysql=/usr/local/mysql-5.1.49' '--with-pcre-regex=/usr' 
'--with-pspell=/usr' '--enable-sockets' '--enable-wd
dx' '--with-xmlrpc' '--with-zlib=/usr' '--with-pear' '--with-layout=GNU' 
'--with-ldap' '--enable-pdo' '--enable-soap' 
'--with-apxs2=/usr/local/apache-2.2.16/bin/apxs' '--enable-pcnt
l' '--enable-mailparse' '--enable-zip' '--with-zip=/usr' '--with-bz2=/usr' 
'--with-config-file-path=/etc' 
'--with-config-file-scan-dir=/usr/local/php-5.3.3/etc' '--with-pdo-mysql=/u
sr/local/mysql-5.1.49' '--with-openssl=/usr'

I have also set the following:

display_errors = Off = Off
display_startup_errors = Off = Off
error_append_string = no value = no value
error_log = no value = no value
error_prepend_string = no value = no value
error_reporting = 0 = 0

But i continue to receive Strict/Notice and Warnings in code that i wish to be 
hidden.

Any suggestions?

Thanks,

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



[PHP] Error Reporting

2008-09-16 Thread Naz
I am trying to turn on errors in the browser, but for some reason they 
are being suppressed.


In php.ini I have display_errors = On and error_reporting = E_STRICT

What else could be suppressing errors?

السلام عليكم
- Naz.

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



Re: [PHP] Error Reporting

2008-09-16 Thread Micah Gersten
E_STRICT only shows one type of error.  If you want everything than you
need to set E_ALL | E_STRICT
http://usphp.com/manual/en/errorfunc.constants.php#errorfunc.constants.errorlevels.e-strict

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Naz wrote:
 I am trying to turn on errors in the browser, but for some reason they
 are being suppressed.

 In php.ini I have display_errors = On and error_reporting = E_STRICT

 What else could be suppressing errors?

 السلام عليكم
 - Naz.


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



[PHP] error reporting

2007-07-26 Thread Bruce Cowin
I'm running PHP 5.1 on IIS.  My dev environment is all local on my
machine.  My php.ini has the following error reporting settings:

error_reporting  =  E_ALL
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
error_log = syslog

To test, I've written a little script that divides by 0.  When I run
the script from the command line, I get entries in my Event Log as
expected, but if I load the page into my browser (Firefox), no error is
reported in the Event Log.  

I've checked http://www.php.net/manual/en/ref.errorfunc.php but can't
find anything there.  I figure I must be missing something pretty
obvious but not sure what it is.  The script and logged error from the
command line are below.  Thanks for any help.

script:
html
titlehead/head/title
body
?php

$a = 5;
$b = 0;
$c = $a / $b;
echo $c;
?
/body
/html

logged error from command line:
The description for Event ID ( 2 ) in Source ( PHP-5.1.2 ) cannot be
found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event: php[2132], PHP Warning:  Division by zero in
C:\Inetpub\wwwroot\PHP\Testing\error.php on line 11.

Regards,

Bruce

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



Re: [PHP] Error Reporting for file commands

2006-08-04 Thread Richard Lynch
On Tue, July 25, 2006 10:32 am, James Nunnerley wrote:
 We've created a file manager which allows users to access their web
 space on
 a server.  It's working brilliantly, except that it would seem there
 are
 some caching issues, either by the system cache or the web server
 cache that
 are causing us a headache.

 When the script tries to delete a file, we always check (using
 file_exists)
 to see whether the file exists before it's deleted.

But if some other process is deleting that file, you have a race
condition.

It's pointless to check before you delete, really -- You simply have
to use the result from unlink() to know if it worked or not.

 The check comes back true, but the unlink then fails, saying no file
 or
 directory there!

 We've tried turning off all errors (using error_reoprting(0) ) but
 this
 would seem to have little difference in the error - it still comes
 back with
 a failure.

Any time the solution is error_reporting(0) then you are doing
something fundamentally wrong.

 We are using our own error handling, but before the command is carried
 out,
 there is this 0 call...

If you use set_error_handler(), it is called regardless of
error_reporting() settings.
http://php.net/set_error_handler

 Does anyone know how we can stop these errors?

I would suggest that you make sure that you are using the FULL PATH to
unlink() -- Relying on any kind of relative path is just going to get
you into trouble.

-- 
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



[PHP] Error Reporting for file commands

2006-07-25 Thread James Nunnerley
We've created a file manager which allows users to access their web space on
a server.  It's working brilliantly, except that it would seem there are
some caching issues, either by the system cache or the web server cache that
are causing us a headache.

When the script tries to delete a file, we always check (using file_exists)
to see whether the file exists before it's deleted.

The check comes back true, but the unlink then fails, saying no file or
directory there!

We've tried turning off all errors (using error_reoprting(0) ) but this
would seem to have little difference in the error - it still comes back with
a failure.

We are using our own error handling, but before the command is carried out,
there is this 0 call...

Does anyone know how we can stop these errors?

Cheers
Nunners

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



Re: [PHP] Error Reporting for file commands

2006-07-25 Thread Jon Anderson

You could try prefixing the unlink function call with an @:

if (file_exists($fn)) {
   @unlink($fn);
}

The @ should suppress any errors.

jon

James Nunnerley wrote:

We've created a file manager which allows users to access their web space on
a server.  It's working brilliantly, except that it would seem there are
some caching issues, either by the system cache or the web server cache that
are causing us a headache.

When the script tries to delete a file, we always check (using file_exists)
to see whether the file exists before it's deleted.

The check comes back true, but the unlink then fails, saying no file or
directory there!

We've tried turning off all errors (using error_reoprting(0) ) but this
would seem to have little difference in the error - it still comes back with
a failure.

We are using our own error handling, but before the command is carried out,
there is this 0 call...

Does anyone know how we can stop these errors?

Cheers
Nunners

  


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



[PHP] RE: Spam:[PHP] Error Reporting for file commands

2006-07-25 Thread James Nunnerley
 [snip]
 When the script tries to delete a file, we always check (using
 file_exists) to see whether the file exists before it's deleted.

 The check comes back true, but the unlink then fails, saying no file or
 directory there!
 [/snip]

 Could you please post the code you are using to check and unlink the
 file?

Heres the function - sometimes the scandir fails, sometimes the unlink,
sometimes the rmdir at the end.  They all have @ to try and surpress the
error, but I think it's a system halt failure - I can only assume?

You'll also see there are quite a lot of clearstatcache - that was another
attempt to sort this problem out!

function system_rmdir($dir) {
$current_error_level = error_level();
error_reporting(0);
$dir = $dir./;
$dir=str_replace(//, /, $dir);
clearstatcache();
if (is_dir($dir)) {
$dir_contents = scandir($dir);
foreach ($dir_contents as $item) {
clearstatcache();
if (is_dir($dir.$item)  $item != '.'  $item !=
'..') {
system_rmdir($dir.$item.'/');
} elseif (file_exists($dir.$item)  $item != '.' 
$item != '..') {
@unlink($dir.$item);
}
}
clearstatcache();
if (is_dir($dir)) {
@rmdir($dir);
}
}
error_reporting($current_error_level);
}

Thanks
Nunners

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



Re: [PHP] RE: Spam:[PHP] Error Reporting for file commands

2006-07-25 Thread Jochem Maas
James Nunnerley wrote:
 [snip]
 When the script tries to delete a file, we always check (using
 file_exists) to see whether the file exists before it's deleted.

 The check comes back true, but the unlink then fails, saying no file or
 directory there!
 [/snip]

 Could you please post the code you are using to check and unlink the
 file?
 
 Heres the function - sometimes the scandir fails, sometimes the unlink,
 sometimes the rmdir at the end.  They all have @ to try and surpress the
 error, but I think it's a system halt failure - I can only assume?

my mind boggles as to what a 'system halt failure' is. is a system fails to
halt It would suggest that it's still running, and if it *has* halted then any 
attempt
to run a script (php or otherwise) is futile... maybe I'm missing something. :-)

 
 You'll also see there are quite a lot of clearstatcache - that was another
 attempt to sort this problem out!

a few things:

1. I don't tihnk you need all those clearstatcache() calls .. from the manual:
Note:  This function caches information about specific filenames, so you only 
need to call clearstatcache() if you are
performing multiple operations on the same filename and require the information 
about that particular file to not be
cached.

2. you might be looking at a user/group permissions problem... maybe start 
echoing out the
user and/or group owner of the files to see if that correlates with the 
failures.

3. turn error reporting to full in order to try and determine the problem?

 
 function system_rmdir($dir) {
   $current_error_level = error_level();
   error_reporting(0);
   $dir = $dir./;
   $dir=str_replace(//, /, $dir);
   clearstatcache();
   if (is_dir($dir)) {
   $dir_contents = scandir($dir);
   foreach ($dir_contents as $item) {
   clearstatcache();
   if (is_dir($dir.$item)  $item != '.'  $item !=
 '..') {
   system_rmdir($dir.$item.'/');
   } elseif (file_exists($dir.$item)  $item != '.' 
 $item != '..') {
   @unlink($dir.$item);
   }
   }
   clearstatcache();
   if (is_dir($dir)) {
   @rmdir($dir);
   }
   }
   error_reporting($current_error_level);
 }
 
 Thanks
 Nunners
 

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



RE: [PHP] php error reporting problem

2006-03-30 Thread Ford, Mike
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

2006-03-30 Thread Ford, Mike
 

-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

2006-03-29 Thread ngwarai zed
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

2006-03-29 Thread Ford, Mike
 -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

2006-03-29 Thread ngwarai zed
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

2006-03-29 Thread Christopher Murtagh
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

2006-03-29 Thread Christopher Murtagh
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

2006-03-28 Thread ngwarai zed
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

2006-03-28 Thread John Nichel

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

2006-03-28 Thread Paul Novitski

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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-24 Thread Jochem Maas

Bob Hartung wrote:

Jasper
  If if make a file containing only
  ?php
phpinfo() ;
  ?
  I get what I expected.


take a good look at where php is reading its ini file from
- it may not be where you expect



  If I make a file containing
?php

phpinfo() ;

// Now a simple class and a call to the class
class Simple()
{
void __construct()


'void' is not a php keyword. that would give a parse error



{
echo In the constructor ;
}
}

$newSimple = new Simple ;

?

  I get NO output or errors in the browser window.  If I select view 
source it returns:

   htmlbody/bodyhtml

Eh?  Anyone with any other ideas

Tnx

Bob Hartung

Jasper Bryant-Greene wrote:
snip all before.



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



[PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Bob Hartung

Hi all,
  Slowly I'm progressing.
  Now how to turn error reporting on for a test apache server.

  I have made the following changes to /etc/php.ini:

  error_reporting = E_ALL
  display_errors = On
  error_log = /var/log/php_errors

  On errors I still have no in browser display nor is anything written 
to the log file.


  Any suggestions?

TIA

Bob

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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Jasper Bryant-Greene
On Sun, 2005-10-23 at 17:31 -0400, Bob Hartung wrote:
 Hi all,
Slowly I'm progressing.
Now how to turn error reporting on for a test apache server.
 
I have made the following changes to /etc/php.ini:
 
error_reporting = E_ALL
display_errors = On
error_log = /var/log/php_errors
 
On errors I still have no in browser display nor is anything written 
 to the log file.

Make a file containing just the following line and view it in your
browser:

?php phpinfo(); ?

See if the path to php.ini shown in that file is /etc/php.ini. If it
isn't, then you're editing the wrong php.ini.

Also, make sure you're not overriding those values in a .htaccess file
or in a script.

What kind of errors are happening that aren't being displayed? For
example in an output buffering handler, an error could just cause your
script to output nothing.

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: [EMAIL PROTECTED]
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Bob Hartung

Jasper
  If if make a file containing only
  ?php
phpinfo() ;
  ?
  I get what I expected.

  If I make a file containing
?php

phpinfo() ;

// Now a simple class and a call to the class
class Simple()
{
void __construct()
{
echo In the constructor ;
}
}

$newSimple = new Simple ;

?

  I get NO output or errors in the browser window.  If I select view 
source it returns:

   htmlbody/bodyhtml

Eh?  Anyone with any other ideas

Tnx

Bob Hartung

Jasper Bryant-Greene wrote:
snip all before.

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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Jasper Bryant-Greene
On Sun, 2005-10-23 at 21:31 -0400, Bob Hartung wrote:
 Jasper
If if make a file containing only
?php
  phpinfo() ;
?
I get what I expected.
 
If I make a file containing
 ?php
 
 phpinfo() ;
 
 // Now a simple class and a call to the class
   class Simple()

Your error is here^^ (brackets shouldn't be there)

But PHP should tell you that by throwing a Fatal error. What are the
values of error_reporting and display_errors that display in the
phpinfo() output?

By the way, the htmlbody/body/html is put there by your
browser, not PHP. PHP is actually outputting absolutely nothing in the
response-body.

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: [EMAIL PROTECTED]
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Derek Williams

Bob Hartung wrote:

Jasper
  If if make a file containing only
  ?php
phpinfo() ;
  ?
  I get what I expected.

  If I make a file containing
?php

phpinfo() ;

// Now a simple class and a call to the class
class Simple()
{
void __construct()
{
echo In the constructor ;
}
}

$newSimple = new Simple ;

?

  I get NO output or errors in the browser window.  If I select view 
source it returns:

   htmlbody/bodyhtml

Eh?  Anyone with any other ideas

Tnx

Bob Hartung

Jasper Bryant-Greene wrote:
snip all before.

How about ?php error_log('this should write to the file 
var/log/php_errors'); echo 'a test to write to error log file'; ?


Which should write to your error log file,php_errors, in the existing 
directory var/log.  The browser should also render a test to write to 
error log file.


Have you tried changing the log file name to something else? I don't 
think that php_errors is a key word, but you never know.


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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Bob Hartung

Jasper  Derek

  phpinfo() says:
configuration file path /etc/php.ini

  PHP Core
  DirectiveLocal Value   Master Value

display_errorsOff   Off
error_logno value  no value
log errorson on

Derek's idea sends nothing to the log but does send to the browser.

It seems that /etc/php.ini is not being parsed since it says:

  error_reporting  =  E_ALL
  display_errors = On
  display_startup_errors = On
  log_errors = On

error_log = /var/log/php_error

I'm not sure where to turn at this point, except to get some sleep and 
attach this problem again tomorrow night when I return home from work.


Thanks!  Update tomorrow

Bob

Jasper Bryant-Greene wrote:

On Sun, 2005-10-23 at 21:31 -0400, Bob Hartung wrote:


Jasper
  If if make a file containing only
  ?php
phpinfo() ;
  ?
  I get what I expected.

  If I make a file containing
?php

phpinfo() ;

// Now a simple class and a call to the class
class Simple()



Your error is here^^ (brackets shouldn't be there)

But PHP should tell you that by throwing a Fatal error. What are the
values of error_reporting and display_errors that display in the
phpinfo() output?

By the way, the htmlbody/body/html is put there by your
browser, not PHP. PHP is actually outputting absolutely nothing in the
response-body.



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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Jasper Bryant-Greene
On Sun, 2005-10-23 at 23:01 -0400, Bob Hartung wrote:
 Jasper  Derek
 
phpinfo() says:
   configuration file path /etc/php.ini
 
PHP Core
DirectiveLocal Value   Master Value
 
 display_errorsOff   Off
 error_logno value  no value
 log errorson on
 
 Derek's idea sends nothing to the log but does send to the browser.
 
 It seems that /etc/php.ini is not being parsed since it says:
 
error_reporting  =  E_ALL
display_errors = On
display_startup_errors = On
log_errors = On

/etc/php.ini *is* being parsed, it says so right there (above). However,
display_errors isn't. Do a search inside /etc/php.ini for
display_errors, see if there's more than one declaration for it. Make
sure it isn't commented out (sounds silly, but you never know)...

Oh, and check the permissions on /etc/php.ini, just in case.

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: [EMAIL PROTECTED]
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4 - RESOLVED!!

2005-10-23 Thread Bob Hartung

It wasn't what I was looking for but I enable it:
include_path = .:/php/includes

 This was commented out.  After uncommenting it all works as I expected 
except that my syntax in the class was wrong.  Now I can at least start 
to learn.


Thanks Jasper and Derek - you gave me a shove in the right direction.

Tnx

Bob



Jasper Bryant-Greene wrote:

On Sun, 2005-10-23 at 23:01 -0400, Bob Hartung wrote:


Jasper  Derek

  phpinfo() says:
configuration file path /etc/php.ini

  PHP Core
  DirectiveLocal Value   Master Value

display_errorsOff   Off
error_logno value  no value
log errorson on

Derek's idea sends nothing to the log but does send to the browser.

It seems that /etc/php.ini is not being parsed since it says:

  error_reporting  =  E_ALL
  display_errors = On
  display_startup_errors = On
  log_errors = On



/etc/php.ini *is* being parsed, it says so right there (above). However,
display_errors isn't. Do a search inside /etc/php.ini for
display_errors, see if there's more than one declaration for it. Make
sure it isn't commented out (sounds silly, but you never know)...

Oh, and check the permissions on /etc/php.ini, just in case.



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



[PHP] Error Reporting

2004-06-28 Thread Tom Chubb
I ave a strange problem with my error reporting!
I have set php.ini to: error_reporting  =  E_ALL but I don't see any errors.
(After I was happy things were working on my Apache Test Server, I uploaded
to my web host and discovered errors.)
Thanks,

Tom

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



Re: [PHP] Error Reporting

2004-06-28 Thread Larry E . Ullman
I ave a strange problem with my error reporting!
I have set php.ini to: error_reporting  =  E_ALL but I don't see any 
errors.
(After I was happy things were working on my Apache Test Server, I 
uploaded
to my web host and discovered errors.)
Make sure that display_errors is on and that you restart the Web server 
after changing the php.ini file (as another responder already pointed 
out).

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


Re: [PHP] Error Reporting help

2004-01-20 Thread Chris Edwards
Thanks to all who responded, my ISP must have restarted my web server late
night, as this morning I'm now getting those old familiar error messages.


- Original Message - 
From: John W. Holmes [EMAIL PROTECTED]
To: Chris Edwards [EMAIL PROTECTED]
Cc: 
Sent: Monday, January 19, 2004 2:53 PM
Subject: Re: [PHP] Error Reporting help


 Chris Edwards wrote:
  but do I need to do something to
  get PHP to actually work off of these setting once they have been
changed,

 Restart your web server.

 -- 
 ---John Holmes...

 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

 php|architect: The Magazine for PHP Professionals  www.phparch.com

 -- 
 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] Error Reporting help

2004-01-19 Thread Chris Edwards
Thanks for all you replies, most of what you have suggested, I had already
tried, in vain, before joining the list.

I retried most of the combinations and still cannot get it to report syntax
errors. If I have errors, from say undefined variables, the error handler
catches those just fine.

Question: when I use the ini_set, does that stay set for the lifetime of the
script executing or is it set for good? The reason I ask, is I wonder if the
permissions on the 'Ini file is blocking me from modifying it.

All help is much appreciated.

Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Monday 19 January 2004 07:30, Chris Edwards wrote:

  It's almost like it parses it before it tries to execute any lines and
if a
  syntax error occurs, it doesn't execute any of the script.

 That's right.

  The prior version would run up until the syntax error and then give you
the
  line if error, which usually meant the syntax error was on the previous
  line.

 I don't think any version of PHP has ever done that.

 More likely your prior version of PHP had display_errors enabled. In
general
 you can enable and display all errors using:

   error_reporting (E_ALL);
   ini_set('display_errors', 1);

 But if display_errors (in php.ini) is disabled then syntax errors will
not
 be displayed -- they can only be viewed in the error log.

 -- 
 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
 --
 /*
 Most people will listen to your unreasonable demands, if you'll consider
 their unacceptable offer.
 */

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



Re: [PHP] Error Reporting help

2004-01-19 Thread Jason Wong
On Monday 19 January 2004 22:34, Chris Edwards wrote:

 I retried most of the combinations and still cannot get it to report syntax
 errors. If I have errors, from say undefined variables, the error handler
 catches those just fine.

Again:

  But if display_errors (in php.ini) is disabled then syntax errors will

 not

  be displayed -- they can only be viewed in the error log.

IOW have a look at the output of phpinfo(), if display_errors is off, then 
no matter what combinations you try you will NOT be able to see syntax 
errors!

 Question: when I use the ini_set, does that stay set for the lifetime of
 the script executing or is it set for good?

Only during the execution of the script.

-- 
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
--
/*
Wouldn't this be a great world if being insecure and desperate were a turn-on?
-- Broadcast News
*/

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



Re: [PHP] Error Reporting help

2004-01-19 Thread Chris Edwards
Here's a snippet from my  PHI_INI

;   - Show all errors
;
error_reporting  =  E_ALL
;error_reporting = E_ALL  ~E_NOTICE  ~E_WARNING  ~E_CORE_WARNING  
~E_USER_WARNING  ~E_USER_NOTICE  ~E_COMPILE_WARNING

display_errors = On

The commented out error_reporting was the original setting and
display_errors was Off

I changed them to the values you see above. When I execute my script and use
init_get() the values appear to be right, but do I need to do something to
get PHP to actually work off of these setting once they have been changed,
i.e. some kind of refresh

Thanks



Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Monday 19 January 2004 22:34, Chris Edwards wrote:

  I retried most of the combinations and still cannot get it to report
syntax
  errors. If I have errors, from say undefined variables, the error
handler
  catches those just fine.

 Again:

   But if display_errors (in php.ini) is disabled then syntax errors
will
 
  not
 
   be displayed -- they can only be viewed in the error log.

 IOW have a look at the output of phpinfo(), if display_errors is off,
then
 no matter what combinations you try you will NOT be able to see syntax
 errors!

  Question: when I use the ini_set, does that stay set for the lifetime of
  the script executing or is it set for good?

 Only during the execution of the script.

 -- 
 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
 --
 /*
 Wouldn't this be a great world if being insecure and desperate were a
turn-on?
 -- Broadcast News
 */

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



Re: [PHP] Error Reporting help

2004-01-19 Thread John W. Holmes
Chris Edwards wrote:
but do I need to do something to
get PHP to actually work off of these setting once they have been changed,
Restart your web server.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


Re: [PHP] Error Reporting help

2004-01-19 Thread Jason Wong
On Tuesday 20 January 2004 03:44, Chris Edwards wrote:
 Here's a snippet from my  PHI_INI

 ;   - Show all errors
 ;
 error_reporting  =  E_ALL
 ;error_reporting = E_ALL  ~E_NOTICE  ~E_WARNING  ~E_CORE_WARNING  
 ~E_USER_WARNING  ~E_USER_NOTICE  ~E_COMPILE_WARNING

 display_errors = On

With those settings you should be able to see syntax errors.

 The commented out error_reporting was the original setting and
 display_errors was Off

 I changed them to the values you see above. When I execute my script and
 use init_get() the values appear to be right, but do I need to do something
 to get PHP to actually work off of these setting once they have been
 changed, i.e. some kind of refresh

You need to restart the webserver for any changes in php.ini to take effect.

-- 
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
--
/*
What passes for woman's intuition is often nothing more than man's
transparency.
-- George Nathan
*/

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



[PHP] Error Reporting help

2004-01-18 Thread Chris Edwards
My hosting company recently upgraded to PHP 4.3.0. Since doing this I no
longer get syntax type errors, from my typo's inside my PHP scripts. These
use to come up in my browser when that page was requested and the script
run.

I have spent hours going through the online help, trying to set a number of
the error reporting levels and parameters  but cannot get to where it will
report on a syntax error.

For example if I code

echo This is a syntax error because of the double quote start and the
single quote end ';

I just get a blank screen.

I have 14 pages of PHP settings printed out, so for any kind person that can
help, I can respond with their values quickly.

Thanks
Chris Edwards

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



Re: [PHP] Error Reporting help

2004-01-18 Thread Adam i Agnieszka Gasiorowski FNORD
Chris Edwards wrote:

[cut]
 
 For example if I code
 
 echo This is a syntax error because of the double quote start and the
 single quote end ';
 
 I just get a blank screen.
 
 I have 14 pages of PHP settings printed out, so for any kind person that can
 help, I can respond with their values quickly.

Try putting this at the beginning
 of your script:

 ini_set('display_errors', 1);

-- 
Seks, seksi, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info  { iWanToDie }   WiNoNa)   (
http://szatanowskie-ladacznice.0-700.pl  foReVeR(  *  )
Poznaj jej zwiewne ksztaty... http://www.opera.com 007

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



Re: [PHP] Error Reporting help

2004-01-18 Thread John W. Holmes
Chris Edwards wrote:
My hosting company recently upgraded to PHP 4.3.0. Since doing this I no
longer get syntax type errors, from my typo's inside my PHP scripts. These
use to come up in my browser when that page was requested and the script
run.
You probably need to have them turn on display_errors (or do so yourself 
with an .htaccess file, if allowed).

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


Re: [PHP] Error Reporting help

2004-01-18 Thread Chris Edwards
Tried that, thanks, no joy.

It's almost like it parses it before it tries to execute any lines and if a
syntax error occurs, it doesn't execute any of the script.

The prior version would run up until the syntax error and then give you the
line if error, which usually meant the syntax error was on the previous
line.

Adam I Agnieszka Gasiorowski Fnord [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]
 Chris Edwards wrote:

 [cut]

  For example if I code
 
  echo This is a syntax error because of the double quote start and the
  single quote end ';
 
  I just get a blank screen.
 
  I have 14 pages of PHP settings printed out, so for any kind person that
can
  help, I can respond with their values quickly.

 Try putting this at the beginning
  of your script:

  ini_set('display_errors', 1);

 -- 
 Seks, seksiæ, seksolatki... news:pl.soc.seks.moderowana
 http://hyperreal.info  { iWanToDie }   WiNoNa)   (
 http://szatanowskie-ladacznice.0-700.pl  foReVeR(  *  )
 Poznaj jej zwiewne kszta³ty... http://www.opera.com 007

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



Re: [PHP] Error Reporting help

2004-01-18 Thread Jason Wong
On Monday 19 January 2004 07:30, Chris Edwards wrote:

 It's almost like it parses it before it tries to execute any lines and if a
 syntax error occurs, it doesn't execute any of the script.

That's right.

 The prior version would run up until the syntax error and then give you the
 line if error, which usually meant the syntax error was on the previous
 line.

I don't think any version of PHP has ever done that.

More likely your prior version of PHP had display_errors enabled. In general 
you can enable and display all errors using:

  error_reporting (E_ALL);
  ini_set('display_errors', 1);

But if display_errors (in php.ini) is disabled then syntax errors will not 
be displayed -- they can only be viewed in the error log.

-- 
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
--
/*
Most people will listen to your unreasonable demands, if you'll consider
their unacceptable offer.
*/

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



Re: [PHP] error reporting

2003-10-17 Thread Mike Migurski
Heh yes umm i know this. But how i could i catch this before is spits out
to an ugly error page so i can send to a custom error page.

Why would anyone but you ever see a parse error? It's the sort of thing
you fix before setting up custom error handling. :)

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



[PHP] error reporting

2003-10-16 Thread Richard Baskett
If I use:

ini_set(error_reporting, 0);
ini_set(display_errors, 0);

It still shows the errors.. if I use the error_reporting function.. it still
shows the errors, no matter what I do.. it still shows the errors!

What am I missing?  I have it set in the php,ini to show errors, but I want
to be able to suppress them within the individual scripts, but it's not
working.. and when I use ini_get() it shows their values to be what I just
set them to be, but yet.. it is still showing the errors! Ugh :(

Help!

Rick

Every person you meet - and everything you do in life - is an opportunity
to learn something. - Tom Clancy

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



Re: [PHP] error reporting

2003-10-16 Thread John W. Holmes
Richard Baskett wrote:
If I use:

ini_set(error_reporting, 0);
ini_set(display_errors, 0);
It still shows the errors.. if I use the error_reporting function.. it still
shows the errors, no matter what I do.. it still shows the errors!
What am I missing?  I have it set in the php,ini to show errors, but I want
to be able to suppress them within the individual scripts, but it's not
working.. and when I use ini_get() it shows their values to be what I just
set them to be, but yet.. it is still showing the errors! Ugh :(
What kind of errors? Ths will not prevent parse errors from being shown.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


Re: [PHP] error reporting

2003-10-16 Thread Richard Baskett
on 10/16/03 16:51, John W. Holmes at [EMAIL PROTECTED] wrote:

 Richard Baskett wrote:
 If I use:
 
 ini_set(error_reporting, 0);
 ini_set(display_errors, 0);
 
 It still shows the errors.. if I use the error_reporting function.. it still
 shows the errors, no matter what I do.. it still shows the errors!
 
 What am I missing?  I have it set in the php,ini to show errors, but I want
 to be able to suppress them within the individual scripts, but it's not
 working.. and when I use ini_get() it shows their values to be what I just
 set them to be, but yet.. it is still showing the errors! Ugh :(
 
 What kind of errors? Ths will not prevent parse errors from being shown.

Hmm.. ok well that's what I didn¹t want to be shown :)  Ok then if I disable
error_reporting and display_errors in php.ini, how can I on a script basis,
show the parse errors and other errors?  Since I couldn¹t get that to work
either :(

Rick

Science without religion is lame, religion without science is blind. -
Albert Einstein

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



Re: [PHP] error reporting

2003-10-16 Thread Richard Baskett
on 10/16/03 16:51, John W. Holmes at [EMAIL PROTECTED] wrote:

 Richard Baskett wrote:
 If I use:
 
 ini_set(error_reporting, 0);
 ini_set(display_errors, 0);
 
 It still shows the errors.. if I use the error_reporting function.. it still
 shows the errors, no matter what I do.. it still shows the errors!
 
 What am I missing?  I have it set in the php,ini to show errors, but I want
 to be able to suppress them within the individual scripts, but it's not
 working.. and when I use ini_get() it shows their values to be what I just
 set them to be, but yet.. it is still showing the errors! Ugh :(
 
 What kind of errors? Ths will not prevent parse errors from being shown.

Ok I figured it out.. All I needed was for you to tell me exactly what you
told me, so that I could explore other options instead of just thinking I
was doing something wrong :)

So what I did was set error_reporting to E_PARSE and then display_errors to
On since I found out that I couldn¹t change the status of display_errors
either, but I can change error_reporting within my scripts.. so that's what
I did :)

Thanks for that help!

Rick

To realize the worth of the anchor we need to feel the storm. - Unknown

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



Re: [PHP] error reporting

2003-10-16 Thread daniel
on the topic of error reporting, am i able to catch fatal/parse errors yet ?

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



Re: [PHP] error reporting

2003-10-16 Thread John W. Holmes
[EMAIL PROTECTED] wrote:

on the topic of error reporting, am i able to catch fatal/parse errors yet ?
How could a PHP script catch a Parse Error? The script hasn't started 
because there is, ummm, a Parse Error! :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


Re: [PHP] error reporting

2003-10-16 Thread daniel
 ---John Holmes...

 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

 php|architect: The Magazine for PHP Professionals – www.phparch.com

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

Heh yes umm i know this. But how i could i catch this before is spits out
to an ugly error page so i can send to a custom error page.

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



[PHP] Error reporting at runtime

2003-06-25 Thread Anthony
I have error reporting turned off in my php.ini file on my production
server.  I have an app I'm writing that I need to run on the same server (no
one can see it though).  Anyway.  I want to turn on error reporting during
runtime for this particular app while I'm debugging it.  so I put
error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); in the script,
but I don;t see any warnings.  I also tried error_reporting(2047); or
error_reporting(8);  still nothing.  To sest it, I tried to echo some random
variable that doesn't exist in the very next line, but no warning about it.
So what gives?  What am I doing wrong?  Basicaly I want the same effect as
if I had error_reporting  =  E_ALL set in php.ini.

- Anthony



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



Re: [PHP] Error reporting at runtime

2003-06-25 Thread Robert Cummings
This is hardly perfect since it shows all errors, but it works for me:

ini_set( 'display_errors',   1 );
ini_set( 'log_errors',   1 );
ini_set( 'error_reporting', -1 );


Anthony wrote:
 
 I have error reporting turned off in my php.ini file on my production
 server.  I have an app I'm writing that I need to run on the same server (no
 one can see it though).  Anyway.  I want to turn on error reporting during
 runtime for this particular app while I'm debugging it.  so I put
 error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); in the script,
 but I don;t see any warnings.  I also tried error_reporting(2047); or
 error_reporting(8);  still nothing.  To sest it, I tried to echo some random
 variable that doesn't exist in the very next line, but no warning about it.
 So what gives?  What am I doing wrong?  Basicaly I want the same effect as
 if I had error_reporting  =  E_ALL set in php.ini.
 
 - Anthony
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



RE: [PHP] Error reporting at runtime

2003-06-25 Thread Ford, Mike [LSS]
 -Original Message-
 From: Anthony [mailto:[EMAIL PROTECTED]
 Sent: 25 June 2003 12:36
 
 I have error reporting turned off in my php.ini file on my production
 server.  I have an app I'm writing that I need to run on the 
 same server (no
 one can see it though).  Anyway.  I want to turn on error 
 reporting during
 runtime for this particular app while I'm debugging it.  so I put
 error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); 
 in the script,
 but I don;t see any warnings.  I also tried error_reporting(2047); or
 error_reporting(8);  still nothing.  To sest it, I tried to 
 echo some random
 variable that doesn't exist in the very next line, but no 
 warning about it.
 So what gives?  What am I doing wrong?  Basicaly I want the 
 same effect as
 if I had error_reporting  =  E_ALL set in php.ini.

Well, that would be error_reporting(E_ALL);

Do you also have display_error turned Off in php.ini?  If so, this
suppresses all error from the output, regardless of the error_reporting
level -- you'll need to turn it back on as well using
ini_set('display_errors', '1');.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Error reporting at runtime

2003-06-25 Thread Anthony
Thanks.  That did the trick.  According to a post from Mike Ford, it was
ini_set( 'display_errors', 1 ); that was messing me up.  I have
display_error turrned off in php.ini too, so even though my reporting was
on, nothing was sent to the browser.  Thanks for the help guys :)

- Anthony


Robert Cummings [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 This is hardly perfect since it shows all errors, but it works for me:

 ini_set( 'display_errors',   1 );
 ini_set( 'log_errors',   1 );
 ini_set( 'error_reporting', -1 );


 Anthony wrote:
 
  I have error reporting turned off in my php.ini file on my production
  server.  I have an app I'm writing that I need to run on the same server
(no
  one can see it though).  Anyway.  I want to turn on error reporting
during
  runtime for this particular app while I'm debugging it.  so I put
  error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); in the
script,
  but I don;t see any warnings.  I also tried error_reporting(2047); or
  error_reporting(8);  still nothing.  To sest it, I tried to echo some
random
  variable that doesn't exist in the very next line, but no warning about
it.
  So what gives?  What am I doing wrong?  Basicaly I want the same effect
as
  if I had error_reporting  =  E_ALL set in php.ini.
 
  - Anthony
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

 --
 .-.
 | Worlds of Carnage - http://www.wocmud.org   |
 :-:
 | Come visit a world of myth and legend where |
 | fantastical creatures come to life and the  |
 | stuff of nightmares grasp for your soul.|
 `-'



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



[PHP] error reporting linenumber and filename

2003-06-16 Thread Bas Jobsen
Hi,

Running the code below, shows an errror in line 2 as expected.
How do i get the linenumber of the function call? 3 here.

?
function test($x){if($x!='a')trigger_error('error: call test with argument 1 
equals a',E_USER_ERROR);}
test('b');
?

Best regards,

Bas

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



RE: [PHP] error reporting linenumber and filename[Scanned]

2003-06-16 Thread Michael Egan
Use the predefined constant:

__LINE__

Regards,

Michael Egan

-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]
Sent: 16 June 2003 12:50
To: PHP General
Subject: [PHP] error reporting linenumber and filename[Scanned]


Hi,

Running the code below, shows an errror in line 2 as expected.
How do i get the linenumber of the function call? 3 here.

?
function test($x){if($x!='a')trigger_error('error: call test with argument 1 
equals a',E_USER_ERROR);}
test('b');
?

Best regards,

Bas

-- 
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] error reporting linenumber and filename[Scanned]

2003-06-16 Thread Bas Jobsen
Hi Michael,

 I'm not sure that there is a way beyond this to show the line within the
 function but I don't see that this would be necessary - at least not for
 resolving errors.

i'm building a class for html table, will give you a short example (see 
below).
Running testtable.php will produce Error: you can't open a new table on line 
13 on file /home/table.php, but i will get line 7 on testtable.php cause 
the wrong function is call there.

table.php:
--
?
class table
{
var $open;

function table()
{
$this-open=false;
}

function open()
{
if($this-open)echo 'Error: you can\'t open a new table on line 
'.__LINE__.' on file '.__FILE__;
else 
{
?table?
$this-open=true;
}

}
function close()
{
if(!$this-open)echo 'Error: you can\'t close a table which not open 
on 
line '.__LINE__.' on file '.__FILE__;
else 
{
?/table?
$this-open=false;
}   
}   
}   
?
--

testtable.php:
--
?
include('table.php');
$TABLE=new table;
$TABLE-open();
$TABLE-close();
$TABLE-open();
$TABLE-open();
?
--
 


Op maandag 16 juni 2003 15:10, schreef u:
 Bas,

 The __LINE__ constant will return the line number of the script from which
 the call is made.  This should be enough to isolate any error.

 I recently had a detailed look at the phpBB (www.phpbb.com)  application
 and they use their own 'message_die' function which ensures that whenever
 errors occur they give a detailed explanation of the error together with
 the file name ( __FILE__ ) and the line number which produced the error.

 I'm not sure that there is a way beyond this to show the line within the
 function but I don't see that this would be necessary - at least not for
 resolving errors.

 HTH,

 Michael Egan

 -Original Message-
 From: Bas Jobsen [mailto:[EMAIL PROTECTED]
 Sent: 16 June 2003 13:14
 To: Michael Egan
 Subject: Re: [PHP] error reporting linenumber and filename[Scanned]


 Dear Michael,

 Thanks for your respons, maybe i don't inderstand your solution but:

 1function line()
 2{
 3 echo __line__;
 4}
 5line();

 will print 3 and not 5

 best regards,

 Bas

 Op maandag 16 juni 2003 14:05, schreef u:
  Use the predefined constant:
 
  __LINE__
 
  Regards,
 
  Michael Egan
 
  -Original Message-
  From: Bas Jobsen [mailto:[EMAIL PROTECTED]
  Sent: 16 June 2003 12:50
  To: PHP General
  Subject: [PHP] error reporting linenumber and filename[Scanned]
 
 
  Hi,
 
  Running the code below, shows an errror in line 2 as expected.
  How do i get the linenumber of the function call? 3 here.
 
  ?
  function test($x){if($x!='a')trigger_error('error: call test with
  argument 1 equals a',E_USER_ERROR);}
  test('b');
  ?
 
  Best regards,
 
  Bas

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



RE: [PHP] error reporting linenumber and filename[Scanned]

2003-06-16 Thread Ford, Mike [LSS]
 -Original Message-
 From: Bas Jobsen [mailto:[EMAIL PROTECTED]
 Sent: 16 June 2003 14:39
 
  I'm not sure that there is a way beyond this to show the 
 line within the
  function but I don't see that this would be necessary - at 
 least not for
  resolving errors.
 
 i'm building a class for html table, will give you a short 
 example (see 
 below).
 Running testtable.php will produce Error: you can't open a 
 new table on line 
 13 on file /home/table.php, but i will get line 7 on 
 testtable.php cause 
 the wrong function is call there.

If you're running PHP 4.3.0 or later, there's http://www.php.net/debug_backtrace which 
might help.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] error reporting linenumber and filename

2003-06-16 Thread Marek Kilimajer
Not possible with current php

Bas Jobsen wrote:
Hi,

Running the code below, shows an errror in line 2 as expected.
How do i get the linenumber of the function call? 3 here.
?
function test($x){if($x!='a')trigger_error('error: call test with argument 1 
equals a',E_USER_ERROR);}
test('b');
?

Best regards,

Bas



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


[PHP] error reporting

2002-08-14 Thread Georgie Casey

rite,

without access to the php.ini file, how can i get php to print all errors on
my web server. it runs linux
--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



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




Re: [PHP] error reporting

2002-08-14 Thread Bas Jobsen

start your file with :
error_reporting(E_ALL);

Op woensdag 14 augustus 2002 20:09, schreef Georgie Casey:
 rite,

 without access to the php.ini file, how can i get php to print all errors
 on my web server. it runs linux
 --
 Regards,
 Georgie Casey
 [EMAIL PROTECTED]

 ***
 http://www.filmfind.tv
 Online Film Production Directory
 ***

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




[PHP] error reporting

2002-06-09 Thread Scott 'INtense!' Reismanis

Hey all,
 
I recently installed Apache2, PHP4.2 on my win2k box as a module. It
works fine however say a script has a syntax error all that happens is a
blank screen is displayed. No errors are shown and thus it is very hard
to debug when I don't know what the error is, and what line it occurs
on. Have I missed some setting when installing apache? I have tried
changing the error reporting levels to no avail. Any more suggestions?
 
Regards, Scott
 



Re: [PHP] error reporting

2002-06-09 Thread Jason Wong

On Monday 10 June 2002 09:42, Scott 'INtense!' Reismanis wrote:
 Hey all,

 I recently installed Apache2, PHP4.2 on my win2k box as a module. It
 works fine however say a script has a syntax error all that happens is a
 blank screen is displayed. No errors are shown and thus it is very hard
 to debug when I don't know what the error is, and what line it occurs
 on. Have I missed some setting when installing apache? I have tried
 changing the error reporting levels to no avail. Any more suggestions?

Read php.ini, the section on error reporting and its comments. And the manual 
too.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
And I doubt complaining to the author gets you anything but a free procmail
 rule.

- Alan Cox on asking authors to document their code
*/


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




[PHP] error reporting

2001-07-24 Thread Justin French

Hi,

On my local test server (PHP4.0.1, FreeBSD, MySQL), when I 
get a general error (bad code) it reports error type on 
file/script on line 1.

It allways says line 1, even if it's line 4028.

I've had experience with this happening if there is a 
structure problem with { brackets } missing (on any server), 
but never for general syntax-kinda errors.


But on my live server (a couple of different ISPs), the 
error reports the correct line, as you would expect.


Since it's only on my test server, I assume it's a problem 
with the config file, or something like that, but don't know 
where to start any ideas?


Maybe I can switch on an errors function at the start of each
script?


Justin French

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] error reporting

2001-05-02 Thread BigVeggie


Is there any way to see my errors on he screen. The server has error 
reporting turned off.
Ive tried setting error_reporting()function setting it to E_ALL etc. It still 
does not work.
Does any one know what I can do?

Clint

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] error reporting/handling

2001-04-26 Thread Jack Dempsey

manesh,

its in your php.ini file under error handling and logging...
seek and ye shall find...

-jack

-- 
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]