PHP + Windows – Call to undefined function mysql_connect()

Install WordPress and hits the following error message : Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\nginx-1.12.1\www\wordpress\wp-includes\wp-db.php… Tested PHP 7.1.10 WordPress 4.8.3 Nginx 1.12.1 MySQL 5.7.17 Windows 10 Solution To install WordPress, PHP needs Mysql extension, to fix this, loads php_mysqli.dll in php.ini file. php.ini ; Directory in which the loadable extensions …

Read more

Nginx + PHP on Windows

This article shows you how to install and integrate Nginx and PHP on Windows. Tested Nginx 1.12.1 PHP 7.1.10 Windows 10 1. Install Nginx + PHP Basically, just download zip file and extracts it, no installation. To install Nginx Visit http://nginx.org/en/download.html Download nginx/Windows-1.12.2 Extract to C:\nginx-1.12.1 To Install PHP Visit http://windows.php.net/download/ Download PHP7.1 download VC14 …

Read more

php-cgi.exe – The application was unable to start correctly

Run php-cgi.exe and hits a pop up dialog showing the following error message : Application Error : The application was unable to start correctly (0xc000007b) Terminal c:\php7.1>php-cgi.exe -b 127.0.0.1:9123 Tested with PHP 7.1.10 on Windows 10 Solution To run PHP on Windows, you need to install Redistributable for Visual Studio, refer to the official PHP …

Read more

Nginx + PHP – No input file specified

A common Nginx + PHP error message “No input file specified.” nginx.conf http { include mime.types; default_type application/octet-stream; server { listen 80; server_name localhost; location / { root www; index index.html index.htm; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9999; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } } Tested with Nginx 1.12.1 + PHP …

Read more

PhP file display as downloading instead of interpreted by Apache

Problem While accessing the PHP file, it display as “application/x-httpd-php” downloading instead of interpreted properly by Apache. See figure below : Solution The PHP downloading issue is caused by the Apache didn’t load the PHP module properly. 1. Find and edit Apache configuration file, which should be able to find at $APACHE_PATH/conf/httpd.conf. 2. Make sure …

Read more