简体   繁体   中英

PHP on NGINX not loading php.ini

I've spent a few hours today setting up WNMP (Windows, NGINX, MySQL, PHP) on Windows 8.1. Everything's working perfectly until I try to access my Wordpress installation:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Well, I've got php_mysql.dll and php_mysqli.dll enabled in php.ini - which isn't being loaded. php_info() gives me

Configuration File (php.ini) Path   C:\WINDOWS
Loaded Configuration File           (none)

I've tried everything I can think of ( PHPRC environment variable and copying php.ini into C:\\Windows ) but PHP won't play ball. I'm using NGINX 1.7.0, PHP 5.5.12 (thread-safe) and MySQL Server 5.6.17. I have restarted the server (in its entirety - NGINX, PHP FastCGI and MySQL) about three hundred times.

1st. check php startup error. U find there. php unable to load modules.

check php error log.

2nd. check php.ini file and check extension directory defined?

and its correctly pointed?

maybe php unable to find to find ext directory .

I had problems time ago with php.ini and NGINX to.

Finally, I found a solution. Create a file with this name: .user.ini in the root of your domain. In this file you can add any php.ini sentence and works perfectly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM