How do I change the default path of PHP in XAMPP?

一个人想着一个人 提交于 2019-12-01 05:51:27
  1. Download your desired version of the PHP thread-safe binary (zipped) from http://windows.php.net/download/.
  2. Unzip the downloaded version of the PHP in a separate directory. Please make sure that your new php directory's name is not "PHP". (For example, use php54 for PHP 5.4)
  3. Copy the new PHP directory into your XAMPP directory. (DO NOT overwrite your existing php directory!)
  4. Now go to your xampp/apache/conf/extra directory. Make a backup of, then open the httpd-xampp.conf file.
  5. Change the following variables/directives:

    PHPINIDir to be [your xampp folder]/[new version of PHP]

    LoadModule to be [your xampp folder]/[new version of PHP]/php5apache2_2.dll

  6. Save the httpd-xampp.conf file. Restart your XAMPP apache server. If your server get restarted successfully, then your server's PHP version was upgraded. You can check the status of your PHP version by using the URL [localhost][:port]/xampp/phpinfo.php.

If you are still having issues, try this as well:

Change the LoadFile "[xammp folder]/php/php5ts.dll" directive to LoadFile "[xampp folder]/php54/php5ts.dll"

Source : http://www.techflirt.com/how-to-upgrade-php-in-xampp/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!