Re: logging erros and user access to logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007. 03. 15, csütörtök keltezéssel 16.08-kor Jason Joines ezt írta:
> Richard Lynch wrote:
> > On Thu, March 15, 2007 2:47 pm, Jason Joines wrote:
> >> Richard Lynch wrote:
> >>> On Thu, March 15, 2007 8:25 am, Jason Joines wrote:
> >>>> Richard Lynch wrote:
> >>>>> Get the errors OFF the web page (display_errors OFF) and into the
> >>>>   <?php
> >>>>     error_reporting(E_PARSE);
> >>>>     ini_set('display_errors','On');
> >>>>     ini_set('display_startup_errors','On');
> >>>>     include('mypage.php');
> >>>>   ?>
> >>>> Then when debugging was done, just delete the debug script.
> >>>>
> >>>>     I moved it to a test server and could get it to work but only
> >>>> if
> >>>> display_errors was set to on in the global php.ini file.  I can't
> >>>> do
> >>>> that on the production server.  The manual says display_errors can
> >>>> be
> >>>> overridden in a script.  I used ini_get() to see if the value was
> >>>> actually being changed, it was.  However, it still doesn't print
> >>>> the
> >>>> errors unless the global ini is set.
> >>>>
> >>>>     Any ideas as to why it's not working?
> >>> Put <?php phpinfo();?> into the mypage.php and see if its "Master"
> >>> and
> >>> "Local" values are different for display_errors.
> >>>
> >>> If they are, then it worked, and you SHOULD see the errors.
> >>>
> >>
> >>
> >>     Well they weren't different so I guess it didn't work.  Seems odd
> >> to
> >> me that get_ini would show it has having been changed but phpinfo
> >> doesn't.
> > 
> > Sounds like a bug to me -- They ought to at least agree on what the
> > setting is, even if you weren't allowed to change it...
> > 
> > Check the bug reports and file one, I guess:
> > http://bugs.php.net
> > 
> 
> 
>     I thought I might try a modification of your virtual hosts
> suggestion.  Perhaps create a virtual host with the same document root
> as the main virtual host but turn display_errors on globally for the
> debug vhost using phpflag.  First I tried it in a .htaccess file and
> then in my main apache config file, httpd.conf.  Each time resulted in
> the error:
> "Invalid command 'phpflag', perhaps mis-spelled or defined by a module
> not included in the server configuration."

you misspelled it, there is no "phpflag" command actually.
there is php_flag command and php_value command which you can use
in .htaccess files (php_flag for flags which can have On/Off states
only, php_value for others)

hope that helps
Zoltán Németh

> 
>     I'm starting to think that all of the ini override stuff was
> implemented in a later version of PHP than I'm using.  Haven't figured
> out when it was implemented yet though.
> 
> 
> Jason
> ===========
> 

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux