georgiajae.blogg.se

Mac os x apache loading php 5 but php 7 is running
Mac os x apache loading php 5 but php 7 is running












  1. #Mac os x apache loading php 5 but php 7 is running mac os x#
  2. #Mac os x apache loading php 5 but php 7 is running mac os#
  3. #Mac os x apache loading php 5 but php 7 is running install#

You can also quickly check which yours is using by running php -v. Sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php Sudo a2dismod php7.0 & sudo a2enmod php5.6 & sudo service apache2 restart Or from php7.0 to php5.6: # For php in web apps Sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php Sudo a2dismod php5.6 & sudo a2enmod php7.0 & sudo service apache2 restart

mac os x apache loading php 5 but php 7 is running

To switch from php 5.6 to php 7.0 you need to do two things: # For php in web apps Installing both php5.6 & php7.0 was clean in my case: no complain of issues, etc.

#Mac os x apache loading php 5 but php 7 is running install#

You can do so with: sudo add-apt-repository apt-get apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 php5.6-curl php5.6-gd php5.6-mcrypt php5.6-xml php5.6-xmlrpc Therefore, in some cases, it might be sensible to have both php 7.0 and php 5.x, so that you can choose which version to use for your needs at any time. Ubuntu 16.04 comes with php 7.0, and some php applications might still fail with php 7.0. Sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-mbstring php7.0-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0Īpache: sudo a2dismod php5.6 sudo a2enmod php7.0 sudo service apache2 restartĬLI: sudo update-alternatives -set php /usr/bin/php7.0Īpache: sudo a2dismod php7.0 sudo a2enmod php5.6 sudo service apache2 restartĬLI: sudo update-alternatives -set php /usr/bin/php5.6 So if after you follow the below instructions you face this situation, you may need to disable the proxy_fcgi apache module: sudo a2dismod proxy_fcgi proxy sudo service apache2 restartĪctually is not required to remove php7.0, you can install php5.6 together ( also because you will have dependency problem with phpmyadmin package that required php7.0)Īssuming libapache2-mod-php is a suitable way to enable PHP in Apache for you, you can proceed in this way: sudo add-apt-repository ppa:ondrej/php

#Mac os x apache loading php 5 but php 7 is running mac os#

As mentioned in earlier post, this way you don't need to disable/enable System Integrity Protection on Mac OS X.Today I got again problem with PHP 7 running despite I have disabled php7.0 apache module: phpinfo was showing php 7 using fastCGI. If you want to configure Xdebug on another PHP version then just repeat from step 2 all the way to 11. Run php -v and it will show Xdebug has been configured correctly.

mac os x apache loading php 5 but php 7 is running

Zend_extension="/usr/local/lib/php/7.3.1/extensions/xdebug.so" then save the change. Here, 7.3.1 is the current version that I switched earlier, change this to match your PHP version. Xdebug extension xdebug.so gets compiled in modules directory.Ĭreate a new directory path under /usr/local/lib/php/7.3.1/extensions/ and copy xdebug.so to this location. Run phpize to configure the build for the new Zend engine.

mac os x apache loading php 5 but php 7 is running

This will switch from PHP 7.1 to PHP 7.3.ĭownload the latest Xdebug source from xdebug website.Įxtract the Xdebug tar and navigate to extracted directory, where you'd see all the files. Install autoconf with brew brew install autoconf.Ĭhange to the PHP version that you want Xdebug on, run brew unlink & brew link -force -overwrite php.

#Mac os x apache loading php 5 but php 7 is running mac os x#

7.1, 7.2 and 7.3 on Mac OS X mojave, you can to do the following: If you have brew installed with multiple PHP versions i.e. I'm not making progress in terms of find out how I can resolve this error: Symbol not found: _xdebug_monitored_function_dtor In /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so When I check my apache log I get the following error: Failed loading /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so: dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so, 9): Symbol not found: _xdebug_monitored_function_dtor This used to work on PHP 5 so I hope someone can help me and anyone else in future struggling with this issue. PHP Warning: xdebug: Unable to register functions, unable to load in Unknown on line 0Īnd yes, the path to the file is correct: $ ls /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so PHP Warning: Method xdebug_start_function_monitor() cannot be a NULL However, Xdebug doesn't load and checking php -i give no results: $php -i | grep xdebug Zend_extension = "/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"

mac os x apache loading php 5 but php 7 is running

Here's what my /etc/php.ini looks like where I configure Xdebug: Loaded Configuration File => /etc/php.ini My php.ini is definitely being loaded: $ php -i | grep php.iniĬonfiguration File (php.ini) Path => /etc While configuring Apache I also created a new /etc/php.ini from the /etc/ file, made sure to check that is was being loaded by PHP after restarting Apache, however the version of Xdebug extension that ships with macOS 10.13 doesn't seem to load or show up when you run phpinfo() So macOS High Sierra 10.13 now comes with PHP 7.1.














Mac os x apache loading php 5 but php 7 is running