Jump to content

PHP-test on OpenSuse Linux 11.3 - ugliest errors (garbage code wherever i look)


dilbertone

Recommended Posts

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 !?

 

Link to comment
Share on other sites

suse-linux:/usr/perl # php learnmecha.php
That'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

Link to comment
Share on other sites

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!

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.