dilbertone Posted November 15, 2010 Share Posted November 15, 2010 good day PHP-test on OpenSuse Linux 11.3 - ugliest errors (garbage code wherever i look) - i get seasick - this is too much to me. I am willing to throw the computer out of the windows... Well to begin with the beginning: i am brandnew to PHP on OpenSuse 11.3 i just start with PHP while running a first test - this here <?php echo date("Y/m/d") . "<br />"; echo date("Y.m.d") . "<br />"; echo date("Y-m-d") ?> i get ugly Effekts see the output suse-linux:/usr/perl # php learnmecha.php PHP Warning: date(): 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 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/perl/learnmecha.php on line 2 2010/11/15<br />PHP Warning: date(): 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 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/perl/learnmecha.php on line 3 2010.11.15<br />PHP Warning: date(): 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 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/perl/learnmecha.php on line 4 suse-linux:/usr/perl # well - can i say that php runs - but not safe or what is this -- do you have another test - i want to test if the PHP runs well !? Quote Link to comment https://forums.phpfreaks.com/topic/218754-php-test-on-opensuse-linux-113-ugliest-errors-garbage-code-wherever-i-look/ Share on other sites More sharing options...
ManiacDan Posted November 15, 2010 Share Posted November 15, 2010 suse-linux:/usr/perl # php learnmecha.phpThat's pointing to PERL, not PHP. But your error messages are PHP. I don't know why you're getting that ouput. As for the rest, they are PHP warnings. You need to set a default timezone in PHP.ini or use date_default_timezone_set to set the timezone. This is exactly what the error message says, so I don't know if this sentence is going to help you at all. -Dan Quote Link to comment https://forums.phpfreaks.com/topic/218754-php-test-on-opensuse-linux-113-ugliest-errors-garbage-code-wherever-i-look/#findComment-1134591 Share on other sites More sharing options...
dilbertone Posted November 15, 2010 Author Share Posted November 15, 2010 Hello Dan, mille grazie - many thanks to you! <?php error_reporting(-1); ini_set('display_errors', TRUE); setlocale(LC_ALL,'de_DE@euro', 'de_DE', 'de', 'ge'); date_default_timezone_set('Europe/Berlin'); echo date("Y/m/d") . "<br />"; echo date("Y.m.d") . "<br />"; echo date("Y-m-d"); ?> now it is all right! output: suse-linux:/usr/perl # php learnmecha.php 2010/11/15<br />2010.11.15<br />2010-11-15 suse-linux:/usr/perl # php learnmecha.php 2010/11/15<br />2010.11.15<br />2010-11-15 suse-linux:/usr/perl # btw: sure thing - you are right - the path (and the learnmecha-file-name ) all that points to perl... but i have to do some clean-ups on the machine! thx again have a great day! Quote Link to comment https://forums.phpfreaks.com/topic/218754-php-test-on-opensuse-linux-113-ugliest-errors-garbage-code-wherever-i-look/#findComment-1134643 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.