I tried to install Wordpress because I wanted to verify that MySQL was installed properly to use as a web-environment for data-base simulation and presentation. I wanted to verify that I could web-script using C++, so my thought flow was to get the standard setup in place for WordPress (so that I know that the database is accessible from the web) using a local copy of the web-server Apache.
I adjusted the configuration file and all for Wordpress, but I still get the error message
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
My Troubleshooting Approach
1. I tried adjusting the wpconfig file after setting up the database with MySQL - that did not resolve the issue.
2. I tried looking at phpinfo with a simple test file test.php:
<?php phpinfo();
-The good news is that phpinfo comes up. The bad news is I am having trouble with two things: 1) What does a good phpinfo file look like when mySQL is installed properly? and 2) I do not see mysql there properly. Is it there, and if not, what can be done to troubleshoot this issue further?
My php file can be seen here:
http://www.gonorthwork.com/view/2016-02-03T10:46:34+00:00-phpinfo%28%29.pdf[
1]
3. I did not see so clearly in the php information output that the modules were getting loaded. So I tried to get php code that would specifically give me the list of modules loaded:
<?php
print_r(get_loaded_extensions());
$mysqli = new mysqli("localhost", "wordpressdb", "your_selected_password", "wordpressdb");
if ($mysqli->connect_errno) {
printf("Connect failed: %s\n", $mysqli->connect_error);
exit();
}
$mysqli->close();
?>
It turned out that the mysql mysqli modules were not being loaded.
So I need to file that as a separate question.
I am working around it by using the database in open office which worked fine (but only with the plugin driver - which I remember being an issue from before, so there is no new issue with MySQL), so the operating system is not blocking the database. As an aside, I adjusted the windows firewall so that it should not be blocking the port used by the database.
Questions
1. How can I get the installation fixed so Wordpress comes up?
2. How can I demonstrate C++ scripting via the web?
3. How can I demonstrate a C++ plugin that accesses the database and the web?
Resolution
The issue ended up being with the configuration file for Apache! Updating this part of Apache Web Server's httpd.conf file a follows resolved it, and now the WordPress installation works fine. The C++ scripting and C++ plugin is getting deferred slightly, since a php script was written that works to connect to the database. So if needed, a php script can write a file to connect to the C++ program, or most likely the database library would also work (still needs testing, but lower risk since there is a workaround path that has been established).
#Intallation of the php mode per: https:
#This LoadModule is not available
#LoadModule php5_module modules/libphp5.so
LoadModule php5_module "C:/PHP/php5apache2_4.dll"
PHPIniDir C:/PHP
#First option - only php files
#<FilesMatch \.php$>
#SetHandler application/x-httpd-php
#</FilesMatch>
#Second option - php .php, .php2, .php3, .php4, .php5, .php6, and .phtml files to be executed as PHP
<FilesMatch "\.ph(p[2-6]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
#Third option - And to allow .phps files to be executed as PHP source files, add this:
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
References Part I- Research That I tried to Resolve the Issue
Web Scripting C++ and CGI
From Send Tab URLs (44 links)
1. Web Scripting C++ and CGI
http:
2. c++ web scripting - -Google
3. C++ Web Programming
http:
4. download apache - Google
5. Download - The Apache HTTP Server Project
https:
6. running ubuntu 10.10 under a virtual machine -Google
7. Installing Ubuntu 10.4 LTS on Windows Virtual PC on Windows 7 - Scott Hanselman
http:
8. virtualbox - Install Ubuntu 10.10 on Virtual Machine - Ask Ubuntu
http:
9. Ubuntu | VirtualBoxes - Free VirtualBox® Images
http:
10. VirtualBoxes - Free VirtualBox(R) Images download | SourceForge.net
http:
11. VirtualBoxes - Free VirtualBox(R) Images download | SourceForge.net
http:
12. Ubuntu PC operating system | Ubuntu
http:
15. Apache HTTP Server - Download
http:
17. Manual install on Windows 7 with Apache and MySQL - MoodleDocs
https:
18. phpinfo()
http:
19. http:
http:
20. php - PHP7 : Missing VCRUNTIME140.dll - Stack Overflow
http:
21. Download Visual C++ Redistributable for Visual Studio 2015 from Official Microsoft Download Center
https:
22. PHP: Downloads
http:
23. PHP For Windows: Binaries and sources Releases
http:
25. Apache VC14 binaries and modules download
http:
26. MySQL :: MySQL on Windows
http:
28. MySQL :: MySQL Connectors
http:
29. MySQL :: Download MySQL Workbench
http:
33. Mini Bar Ideas for Home | DesignRulz
http:
34. לוח בקרה למשתמש • התחבר - www.4project.co.il
https:
35. mysql roles -Google
36. MySQL :: MySQL Workbench Manual :: 6.2 Users and Privileges
https:
37. Assigning Roles to MySQL Users — DatabaseJournal.com
http:
39. Installing WordPress « WordPress Codex
https:
40. Installing WordPress « WordPress Codex
https:
41. WordPress › Download WordPress
https:
42. http:
http:
43. Your PHP installation appears to be missing the MySQL extension which is required by WordPress. -Google
44. WordPress › Support » Your PHP installation appears to be missing the MySQL ...
https:
I tried resolving the issue and researched it further, so the references are updated here:
References Part II- Updated Research That I tried to Resolve the Issue
3. Editing a Question - CodeProject
http:
4. http:
http:
5. Your PHP installation appears to be missing the MySQL extension which is required by WordPress. - Google Search
6. "Missing MySQL Extension" Errors with WordPress | Tiger Technologies Support
https:
7. Your PHP installation appears to be missing the MySQL extension which is required by WordPress | DigitalOcean
https:
8. http:
http:
9. Index of file:file:
10. php connect to database example - Google Search
https:
11. PHP Connect to MySQL
http:
12. set php config for mysqli - Google Search
13. PHP: Installation - Manual
http:
14. PHP: Runtime Configuration - Manual
http:
15. http:
http:
16. Fatal error: Class 'mysqli' not found - Google Search
17. php - Fatal error: Class 'MySQLi' not found - Stack Overflow
http:
18. PHP: Installation - Manual
http:
19. phpinfo()
http:
20. mysqInd - Google Search
21. MySQL :: MySQL native driver for PHP - mysqlnd
https:
22. mysqlnd example - Google Search
https:
23. PHP: Quickstart and Examples - Manual
http:
24. understanding phpinfo - Google Search
https:
25. PHP: phpinfo - Manual
http:
26. PHP: get_loaded_extensions - Manual
http:
27. PHPmotion Wiki: What is a phpinfo() file
http:
Reference - Full httpd.conf Apache Web Server configuration file (under Windows 7 Ultimate 64 bit) used to get WordPress to work
Quote:
#Intallation of the php mode per: https://wordpress.org/support/topic/missing-the-mysql-extension-1
#This LoadModule is not available
#LoadModule php5_module modules/libphp5.so
LoadModule php5_module "C:/PHP/php5apache2_4.dll"
PHPIniDir C:/PHP
#First option - only php files
#<filesmatch>
#SetHandler application/x-httpd-php
#
#Second option - php .php, .php2, .php3, .php4, .php5, .php6, and .phtml files to be executed as PHP
<filesmatch>
SetHandler application/x-httpd-php
#Third option - And to allow .phps files to be executed as PHP source files, add this:
<filesmatch>
SetHandler application/x-httpd-php-source