Re: logging erros and user access to logs

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

 



On 3/28/07, Juergen Wind <jwind@xxxxxx> wrote:



Jason Joines-3 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.
>
>
> Jason
> ===========
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
phpinfo() only reflects values set in php.ini (globally), http.conf (f.e.
per vhost) or .htaccess (per folder and below)
and only if phpinfo is called from inside that folder/vhost.
ini_set is only in the scope of your script.
so you can't test the effects of your ini_set values  using phpinfo() at
all.
you have to test the behaviour of the script or put a corresponding  echo
ini_get('...') after your ini_set.

You can simply put the phpinfo() at the end of your script. It will
show the ini_set items.

If you don't believe me, try this script:
<?php
ini_set("allow_url_fopen","Off");
phpinfo();
?>

Under local value it will show you Off, and on master value it will
show On (Atleast that's how i configured it :) )

Tijnema
--
View this message in context: http://www.nabble.com/logging-erros-and-user-access-to-logs-tf3403238.html#a9718409
Sent from the PHP - General mailing list archive at Nabble.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


[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