I've made a Symfony2 installation on my machine.
When I check the requirements in my local url:
localhost/Symfony2/web/config.php
It says:
MAJOR PROBLEMS
Set the "date.timezone" setting in php.ini* (like Europe/Paris).
RECOMMENDATIONS
Set short_open_tag to off in php.ini*.
Set magic_quotes_gpc to off in php.ini*.
- Changes to the php.ini file must be done in "/etc/php5/apache2/php.ini".
I've made the required changes both in /etc/php5/apache2/php.ini
and in /etc/php5/cli/php.ini
:
date.timezone = "Europe/Madrid"
short_open_tag = Off
magic_quotes_gpc = Off
Both short_open_tag
and magic_quotes_gpc
where already set to Off when I checked the php.ini files.
After that I've restarted apache2:
sudo service apache2 restart
However I still get the same error messages.
I use Symfony 2.1.2, Ubuntu 12.04 and PHP 5.3.6
UPDATE:
If I run phpinfo() from the browser, it says the Loaded Configuration File it's located in:
/etc/php5/apache2/php.ini
If I run php -i | grep php.ini
it says the Loaded Configuration File it's located in:
/etc/php5/cli/php.ini
These are the two files where I've already made the changes.
I've made sure that the changes have been saved in the file. I also have used phpinfo() in a php file and executed it in the browser. It says that the values for date.timezone are not set, and magic_quotes_gc and short_open_tag are set to On.
If I execute php app/check.php
, the requirements are resolved, so I suppose that /etc/php5/cli/php.ini
it's working correctly and there is only a problem with /etc/php5/apache2/php.ini
, which is the one that works with the browser.
Be sure to remove the comment semi colon from the beginning of the string also from /etc/php5/cli/php.ini
From :
;date.timezone = "America/Vancouver"
To:
date.timezone = "America/Vancouver"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With