如何设置wordpress for Windows 7 64位来测试mysql安装? [英] How do i setup wordpress for windows 7 64 bit to test the mysql installation?
问题描述
我尝试安装Wordpress,因为我想验证MySQL是否已正确安装,以用作数据库模拟和演示的Web环境。我想验证我可以使用C ++进行网络脚本,所以我的想法是使用Web服务器的本地副本为WordPress获取标准设置(以便我知道可以从Web访问数据库) Apache。
我调整了配置文件和所有WordPress,但我仍然收到错误信息
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.
我的故障排除方法
1.我在使用MySQL设置数据库后尝试调整wpconfig文件 - 但没有解决问题。
2.我试过看在phpinfo上用一个简单的测试文件test.php:
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();
-好消息是phpinfo出现了。坏消息是我遇到两件事情有困难:1)当mySQL安装正确时,一个好的phpinfo文件是什么样的? 2)我没有正确看到mysql。是否存在,如果没有,可以采取哪些措施进一步解决这个问题?
我的php文件可以在这里看到:
http: //www.gonorthwork.com/view/2016-02-03T10:46:34+00:00-phpinfo%28%29.pdf [ 1 ]
3.我在php信息输出中没有看到模块加载的情况。所以我试着获得PHP代码,专门给我加载的模块列表:
-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
/*Code sample from http://php.net/manual/en/function.get-loaded-extensions.php to show the loaded modules*/
print_r(get_loaded_extensions());
/*Code example (edited) from: http://php.net/manual/en/mysqli.query.php
*/
/*Original mysqli connector example*/
/* $mysqli = new mysqli("localhost", "my_user", "my_password", "world");*/
$mysqli = new mysqli("localhost", "wordpressdb", "your_selected_password", "wordpressdb");
/* check connection */
if ($mysqli->connect_errno) {
printf("Connect failed: %s\n", $mysqli->connect_error);
exit();
}
$mysqli->close(); /*Close the database*/
?>
原来mysql mysqli模块没有加载。
所以我需要将其作为一个单独的问题提交。
我正在使用开放式办公室中的数据库工作正常(但只有插件驱动程序 - 我记得以前是一个问题,所以MySQL没有新问题),因此操作系统不会阻塞数据库。顺便说一下,我调整了Windows防火墙,这样它就不会阻塞数据库使用的端口。
问题
1.如何修复安装以便Wordpress出现?
2.如何通过网络演示C ++脚本?
3.如何演示访问数据库和网络的C ++插件?
分辨率
问题最终出现在Apache的配置文件中!更新Apache Web Server的httpd.conf文件的这一部分后,解决了它,现在WordPress安装工作正常。由于编写了一个可以连接数据库的PHP脚本,因此C ++脚本和C ++插件略有延迟。因此,如果需要,php脚本可以编写一个文件来连接到C ++程序,或者很可能数据库库也可以工作(仍然需要测试,但由于已经建立了一个变通路径,因此风险较低)。
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://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 \.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://www.quackit.com/html/online-html-editor/full/
2. c++ web scripting - -Google
3. C++ Web Programming
http://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm
4. download apache - Google
5. Download - The Apache HTTP Server Project
https://httpd.apache.org/download.cgi
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://www.hanselman.com/blog/InstallingUbuntu104LTSOnWindowsVirtualPCOnWindows7.aspx
8. virtualbox - Install Ubuntu 10.10 on Virtual Machine - Ask Ubuntu
http://askubuntu.com/questions/10671/install-ubuntu-10-10-on-virtual-machine
9. Ubuntu | VirtualBoxes - Free VirtualBox® Images
http://virtualboxes.org/images/ubuntu/
10. VirtualBoxes - Free VirtualBox(R) Images download | SourceForge.net
http://sourceforge.net/projects/virtualboximage/?source=typ_redirect
11. VirtualBoxes - Free VirtualBox(R) Images download | SourceForge.net
http://sourceforge.net/projects/virtualboximage/?source=typ_redirect
12. Ubuntu PC operating system | Ubuntu
http://www.ubuntu.com/desktop
15. Apache HTTP Server - Download
http://apache-http-server.en.softonic.com/
17. Manual install on Windows 7 with Apache and MySQL - MoodleDocs
https://docs.moodle.org/29/en/Manual_install_on_Windows_7_with_Apache_and_MySQL
18. phpinfo()
http://localhost/test.php
19. http://localhost/
http://localhost/
20. php - PHP7 : Missing VCRUNTIME140.dll - Stack Overflow
http://stackoverflow.com/questions/30811668/php7-missing-vcruntime140-dll
21. Download Visual C++ Redistributable for Visual Studio 2015 from Official Microsoft Download Center
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48145
22. PHP: Downloads
http://php.net/downloads.php
23. PHP For Windows: Binaries and sources Releases
http://windows.php.net/download#php-5.5
25. Apache VC14 binaries and modules download
http://www.apachelounge.com/download/
26. MySQL :: MySQL on Windows
http://dev.mysql.com/downloads/windows/
28. MySQL :: MySQL Connectors
http://dev.mysql.com/downloads/connector/
29. MySQL :: Download MySQL Workbench
http://dev.mysql.com/downloads/workbench/
33. Mini Bar Ideas for Home | DesignRulz
http://www.designrulz.com/design/2013/09/mini-bar-ideas-for-home/
34. לוח בקרה למשתמש • התחבר - www.4project.co.il
https://www.4project.co.il/forum/ucp.php?mode=login
35. mysql roles -Google
36. MySQL :: MySQL Workbench Manual :: 6.2 Users and Privileges
https://dev.mysql.com/doc/workbench/en/wb-mysql-connections-navigator-management-users-and-privileges.html
37. Assigning Roles to MySQL Users — DatabaseJournal.com
http://www.databasejournal.com/features/mysql/assigning-roles-to-mysql-users.html
39. Installing WordPress « WordPress Codex
https://codex.wordpress.org/Installing_WordPress
40. Installing WordPress « WordPress Codex
https://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install
41. WordPress › Download WordPress
https://wordpress.org/download/
42. http://localhost/wordpress/wp-admin/setup-config.php
http://localhost/wordpress/wp-admin/setup-config.php
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://wordpress.org/support/topic/your-php-installation-appears-to-be-missing-the-mysql-
我尝试解决问题并进一步研究,所以参考资料在这里更新:
参考文献第二部分 - 更新我试图解决问题的研究
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://www.codeproject.com/script/Answers/Post.aspx?aid=1076355
4. http://localhost/wordpress/
http://localhost/wordpress/
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://support.tigertech.net/wordpress-missing-mysql
7. Your PHP installation appears to be missing the MySQL extension which is required by WordPress | DigitalOcean
https://www.digitalocean.com/community/questions/your-php-installation-appears-to-be-missing-the-mysql-extension-which-is-required-by-wordpress
8. http://localhost/wordpress/
http://localhost/wordpress/
9. Index of file:///c:/Apache24/htdocs/
file:///c:/Apache24/htdocs/
10. php connect to database example - Google Search
https://www.google.co.il/search?q=php+connect+to+database+example&ie=utf-8&oe=utf-8&gws_rd=cr&ei=fk63VrSzKqjjywPB37PgDA
11. PHP Connect to MySQL
http://www.w3schools.com/php/php_mysql_connect.asp
12. set php config for mysqli - Google Search
13. PHP: Installation - Manual
http://php.net/manual/en/mysqli.installation.php
14. PHP: Runtime Configuration - Manual
http://php.net/manual/en/mysqli.configuration.php
15. http://localhost/testdatabase.php
http://localhost/testdatabase.php
16. Fatal error: Class 'mysqli' not found - Google Search
17. php - Fatal error: Class 'MySQLi' not found - Stack Overflow
http://stackoverflow.com/questions/666811/fatal-error-class-mysqli-not-found
18. PHP: Installation - Manual
http://php.net/manual/en/mysqli.installation.php
19. phpinfo()
http://localhost/test.php
20. mysqInd - Google Search
21. MySQL :: MySQL native driver for PHP - mysqlnd
https://dev.mysql.com/downloads/connector/php-mysqlnd/
22. mysqlnd example - Google Search
https://www.google.co.il/search?q=mysqlnd+example&ie=utf-8&oe=utf-8&gws_rd=cr&ei=z1S3Vo3lM8fCywPM-qXwDA
23. PHP: Quickstart and Examples - Manual
http://php.net/manual/en/mysqlnd-uh.quickstart.php
24. understanding phpinfo - Google Search
https://www.google.co.il/search?q=understanding+phpinfo&ie=utf-8&oe=utf-8&gws_rd=cr&ei=E1W3Vs37G4LYyAOyxpDYDQ
25. PHP: phpinfo - Manual
http://php.net/manual/en/function.phpinfo.php
26. PHP: get_loaded_extensions - Manual
http://php.net/manual/en/function.get-loaded-extensions.php
27. PHPmotion Wiki: What is a phpinfo() file
http://wiki.phpmotion.com/HelpPHPinfoFile
参考 - 完整的httpd.conf Apache Web服务器配置文件(在Windows 7旗舰版64位下)用于使WordPress工作
Reference - Full httpd.conf Apache Web Server configuration file (under Windows 7 Ultimate 64 bit) used to get WordPress to work
PHP模式的#Intallation:https://wordpress.org/support/topic/missing-the-mysql-extension-1
#This LoadModule不可用
#LoadModule php5_module modules / libphp5.so
LoadModule php5_moduleC:/PHP/php5apache2_4.dll
PHPIniDir C:/ PHP
#First选项 - 只有php文件
#< filesmatch>
#SetHandler application / x-httpd-php
#
#第二个选项 - php .php,.php2,.php3,.php4,.php5,.php6和.phtml文件将作为PHP执行
< filesmatch>
SetHandler应用程序/ x-httpd-php
#Third选项 - 并允许.phps文件作为PHP源文件执行,添加:
< filesmatch>
SetHandler application / x-httpd-php-source
#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
推荐答案
mysqli = new mysqli(localhost,my_user,my_password,world); * /
mysqli = new mysqli("localhost", "my_user", "my_password", "world");*/
mysqli = new mysqli ( localhost, wordpressdb, your_selected_password, wordpre SSDB跨度>);
/ * 检查连接* /
if (
mysqli = new mysqli("localhost", "wordpressdb", "your_selected_password", "wordpressdb"); /* check connection */ if (
mysqli-> connect_errno){
printf( 连接失败:%s \ n,
mysqli->connect_errno) { printf("Connect failed: %s\n",
这篇关于如何设置wordpress for Windows 7 64位来测试mysql安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!