CodeIgniter Forums
Showing Warning on screen. How do I stop this? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Showing Warning on screen. How do I stop this? (/showthread.php?tid=36162)



Showing Warning on screen. How do I stop this? - El Forum - 11-23-2010

[eluser]stowell48[/eluser]
Hi, I am trying to run my code locally, but I am getting a php warning error displayed instead of showing my page. Is this a setting that I change in codeigniter, or would this be a php setting?

Also, I get this warning when trying to use the libraries/Zip.php file. Is it possible to fix this warning so that it doesn't display this?

Thanks


A PHP Error was encountered

Severity: Warning

Message: substr() [function.substr]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for '-7.0/no DST' instead

Filename: libraries/Zip.php

Line Number: 161


Showing Warning on screen. How do I stop this? - El Forum - 11-23-2010

[eluser]vitoco[/eluser]
error_reporting it's the php function that enable/disable errors, warnings, notices...etc.

http://php.net/manual/en/errorfunc.configuration.php
http://www.php.net/manual/en/function.error-reporting.php

Saludos


Showing Warning on screen. How do I stop this? - El Forum - 11-23-2010

[eluser]pickupman[/eluser]
Make sure you have the correct timezone setting in your php.ini file
[url="http://php.net/manual/en/datetime.configuration.php"]Datetime configuration[/url]


Showing Warning on screen. How do I stop this? - El Forum - 11-23-2010

[eluser]stowell48[/eluser]
[quote author="pickupman" date="1290585726"]Make sure you have the correct timezone setting in your php.ini file
[url="http://php.net/manual/en/datetime.configuration.php"]Datetime configuration[/url][/quote]

Awesome... Thanks for the help.

Putting the correct timezone in the php settings did the trick.


Showing Warning on screen. How do I stop this? - El Forum - 12-09-2010

[eluser]mike7418[/eluser]
In system/applications/config/config.php line 176 $config['log+threshold'] =1; by default. change to 0 if you do not want to see any errors until you get the site functioning correctly.


Showing Warning on screen. How do I stop this? - El Forum - 12-10-2010

[eluser]InsiteFX[/eluser]
Add to index.php
Code:
// PHP 5.3 will BITCH without this! PyroCMS Development Team.
if (ini_get('date.timezone') == '')
{
    date_default_timezone_set('GMT');
}

InsiteFX