0
I am calling the following functions to pick up the current date and year:
$mes = date("m");
$ano = date("Y");
It works when I’m in localhost
, however, when I upload the application to the server I don’t get any information of these methods. I am using PHP 5.3.
Any suggestions on how to make this information appear?
What have you tried?
– Sr. André Baill
Yes, add these lines at the beginning of the file,
ini_set('display_errors', true); error_reporting(E_ALL);
and see if there are any errors. It may be the case that Timezone is not set. Take a look at some php materials in wiki and be sure to see the tour– rray
Other than that I haven’t tried anything else, because in locallhost everything appears correctly. I’m new to PHP, so I don’t have much idea what’s going on.
– Alessandra
Is it just that code that trouble? There’s nothing else?
– rray
That’s right. I’ll check the Timezone.
– Alessandra
Is there an error? put (edit) it in the question
– rray
@James_evans do you have just one simple PHP file with just these two calls or do you have more stuff? Are PHP versions of your machine and server the same? Or at least compatible? Apache server is running OK?
– Erick Gallani
It doesn’t show up. Well, I’ve set up Timezone and I’ll upload the application to the server and see if something pops up, because on localhost everything is ok.
– Alessandra
localhost uses the same version of php as the production host?
– rray
@rray, in production PHP is 5.3 and in development is 5.5
– Alessandra
The code you have in question is the same code that is giving problem in the production host or has more?
– rray
@rray, it’s the same code.
– Alessandra
wtf? , could be problem in installing php on the production host, very strange this
– rray
Yeah... I’ll wait for the support staff to put the system into production to see what happens. Thanks for the help!
– Alessandra