Arcady Genkin wrote:
> [message format fixed]
> "..s.c.o.t.t.." <[EMAIL PROTECTED]> writes:
>
> > > I'm trying to send PHP errors into a separate log file.  I have the
> > > following in php.ini:
> > >
> > >   log_errors = On
> > >   error_log = /var/www/logs/php-errors.log
> > >
> > > After apache restarted the errors are now being sent to apache's error
> > > log, but not the one I specified.  Any ideas?
> >
> > does the directory exist?
>
> This is the same directory where Apache writes its own logs.  It' only
> writeable to root, but I thought that the controlling apache process
> would be responsible for creating the file (controlling apache runs as
> root).

    The controlling process is not running PHP however. PHP is probably
    running as www or nobody.

    Try writing to /tmp (or some other directory writeable by nobody)

> > does php or apache have the right to create new files
> > in /var/www/logs/?
> >
> > if the file exists, are the permissions set correctly on it?
> >
> > keep in mind that the user that owns apache usually
> > has very limited powers
>
> Well, see above.  If Apache can write its own logs there, it should be
> able to write PHP's logs there too, right?

    No way - totally different things.

> What worries me is that the logs are directed into apache's error
> logs.  This makes me think that the problem is not with permissions...
>
> Any further ideas, anyone?

    If you really want to write to the same log directory as the
    apache logs, use PHP's apache_note function to pass data to apache
    and in your httpd.conf file use a custom log format for the
    data passed.

    --zak


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

Reply via email to