Re: [PHP] php.ini not creating logs

2002-06-21 Thread Michael Sweeney

First, run a php script that calls phpinfo() and make sure that the php
module in your server is running against the php.ini file you think it
is. Verify the name and path of the log file.

Second, make sure that errors are being reported, meaning check your
php.ini file for the "error_reporting" directive and make sure it says
something like "error_reporting = E_ALL & ~E_NOTICE" - make sure the
line is not commented out.

Third, check the ownership and permissions on the log file AND the
directory the log file is in and make sure that they're such that the
webserver can write to them.

Restart the webserver. Write a php script with an error in it and
request the script. 

Rinse and repeat.

..michael..



On Fri, 2002-06-21 at 11:00, Anil Garg wrote:
> ya i have tried that too..
> wot else can be the problem.
> my php.ini looks like this:

> 
> 
> > Like i said make sure the webserver has the privilege to write to the log
> > file...
> >
> >
> >
> >



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




Re: [PHP] php.ini not creating logs

2002-06-21 Thread Ray Hunter

Do this, set "log_errors = on" in your php.ini file.  Do not set the
"error_log = file" comment that line out and all other error_log ones as
well.  This will then log all errors to apache's log files and you can view
the errors there.


RAY HUNTER


- Original Message -
From: "Anil Garg" <[EMAIL PROTECTED]>
To: "Ray Hunter" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 12:00 PM
Subject: Re: [PHP] php.ini not creating logs


> ya i have tried that too..
> wot else can be the problem.
> my php.ini looks like this:
> 
> ; Print out errors (as a part of the output).  For production web sites,
> ; you're strongly encouraged to turn this feature off, and use error
logging
> ; instead (see below).  Keeping display_errors enabled on a production web
> site
> ; may reveal security information to end users, such as file paths on your
> Web
> ; server, your database schema or other information.
> display_errors = Off
>
> ; Even when display_errors is on, errors that occur during PHP's startup
> ; sequence are not displayed.  It's strongly recommended to keep
> ; display_startup_errors off, except for when debugging.
> display_startup_errors = Off
>
> ; Log errors into a log file (server-specific log, stderr, or error_log
> (below))
> ; As stated above, you're strongly advised to use error logging in place
of
> ; error displaying on production web sites.
> log_errors = /var/log/php-errors.log
>
> ; Store the last error/warning message in $php_errormsg (boolean).
> track_errors = On
>
> ; Disable the inclusion of HTML tags in error messages.
> ;html_errors = Off
>
> ; String to output before an error message.
> ;error_prepend_string = ""
>
> ; String to output after an error message.
> ;error_append_string = ""
>
> ; Log errors to specified file.
> ;error_log = Off
> -----------
>
>
> - Original Message -
> From: "Ray Hunter" <[EMAIL PROTECTED]>
> To: "Anil Garg" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, June 21, 2002 1:53 PM
> Subject: Re: [PHP] php.ini not creating logs
>
>
> > Like i said make sure the webserver has the privilege to write to the
log
> > file...
> >
> >
> >
> >
> > S RAY HUNTER
> > email: [EMAIL PROTECTED]
> > www: http://www.venticon.com
> > aim: spinebl8d3
> >
> >
> >
> > - Original Message -
> > From: "Anil Garg" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Friday, June 21, 2002 11:40 AM
> > Subject: [PHP] php.ini not creating logs
> >
> >
> > >
> > >  Hi,
> > >
> > >  sorry i forgot to mention that.
> > >  yes i restarted my webserver.
> > >
> > >  In fact the error  messages are getting hidden(on setting
> display_errors
> > =
> > >  Off) but the logs are not getting created:(log_errors =
> > >  /var/log/php-errors.log ) in php.ini file.
> > >
> > >  thanx
> > >  anil
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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.ini not creating logs

2002-06-21 Thread Anil Garg

ya i have tried that too..
wot else can be the problem.
my php.ini looks like this:

; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web
site
; may reveal security information to end users, such as file paths on your
Web
; server, your database schema or other information.
display_errors = Off

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed.  It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off

; Log errors into a log file (server-specific log, stderr, or error_log
(below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = /var/log/php-errors.log

; Store the last error/warning message in $php_errormsg (boolean).
track_errors = On

; Disable the inclusion of HTML tags in error messages.
;html_errors = Off

; String to output before an error message.
;error_prepend_string = ""

; String to output after an error message.
;error_append_string = ""

; Log errors to specified file.
;error_log = Off
---


- Original Message -
From: "Ray Hunter" <[EMAIL PROTECTED]>
To: "Anil Garg" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 1:53 PM
Subject: Re: [PHP] php.ini not creating logs


> Like i said make sure the webserver has the privilege to write to the log
> file...
>
>
>
>
> S RAY HUNTER
> email: [EMAIL PROTECTED]
> www: http://www.venticon.com
> aim: spinebl8d3
>
>
>
> - Original Message -
> From: "Anil Garg" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, June 21, 2002 11:40 AM
> Subject: [PHP] php.ini not creating logs
>
>
> >
> >  Hi,
> >
> >  sorry i forgot to mention that.
> >  yes i restarted my webserver.
> >
> >  In fact the error  messages are getting hidden(on setting
display_errors
> =
> >  Off) but the logs are not getting created:(log_errors =
> >  /var/log/php-errors.log ) in php.ini file.
> >
> >  thanx
> >  anil
> >
> >
> >
> >
> >
> > --
> > 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.ini not creating logs

2002-06-21 Thread Ray Hunter

Like i said make sure the webserver has the privilege to write to the log
file...




S RAY HUNTER
email: [EMAIL PROTECTED]
www: http://www.venticon.com
aim: spinebl8d3



- Original Message -
From: "Anil Garg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 11:40 AM
Subject: [PHP] php.ini not creating logs


>
>  Hi,
>
>  sorry i forgot to mention that.
>  yes i restarted my webserver.
>
>  In fact the error  messages are getting hidden(on setting display_errors
=
>  Off) but the logs are not getting created:(log_errors =
>  /var/log/php-errors.log ) in php.ini file.
>
>  thanx
>  anil
>
>
>
>
>
> --
> 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