I followed a guide which used home-brew to install the lastest version of php (5.4.8) on OSX Mountain Lion.
I then followed a guide which showed me how to setup and use the pre-installed apache on OSX.
However when I try running up a base Symfony 2 project I get a bunch of errors relating to missing date.timezone in the php.ini.
However I have this correctly setup the php.ini but doing a quick phpinfo() in the Symfony project shows that its using the old preinstalled version of php (5.3) rather than the new one.
In terminal if I type which php
& php -v
, It shows the correct new version is being used.
But the phpinfo()
shows
For PHP 8.0 to work correctly in the "PHP as Apache" mode, enable the PHP-FPM FastCGI option in the web server features: Settings → Features → Web-server (WWW) → Edit button. For FastCGI (Nginx + PHP-FPM) the version can be changed in PHP list at the user level or in the user editing from at the admin level.
php in the Web server document root (installdir/apache2/htdocs/ for Apache or installdir/nginx/html for NGINX). Make sure the Web server is running, open a browser and type http://localhost/phptest.php. You should then see a screen showing detailed information about the PHP version you are using and installed modules.
Did you follow all the instructions provided in the Caveats?
Run brew info php54
to see them again.
Especially the line:
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php5_module /usr/local/Cellar/php54/5.4.8/libexec/apache2/libphp5.so
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