1024programmer PHP Brother, I have my own PHP environment installation and configuration.

Brother, I have my own PHP environment installation and configuration.

My own PHP environment installation configuration
You may use PHP recently. The first step is of course to install the development environment.
There are many one-click installations on the Internet. Because mysql is already installed on my machine, I don’t want to install another mysql again.
I decided to use a separate configuration installation. At first, I looked for a lot of tutorials on the Internet. Encountered a lot of problems.
Record my installation process and keep it as a memo.
Step 1:
Download Apache HTTP Server (httpd) 2.2.21
Win32 Binary without crypto (no mod_ssl) (MSI Installer): httpd-2.2.21-win32-x86-no_ssl .msi
Download PHP 5.2 (5.2.17) Download the zip version of VC6 x86 Thread Safe
The difference between VC6 and VC9:
The VC6 version is compiled using the Visual Studio 6 compiler. If you PHP is built using Apache, then you should choose the VC6 version.
The VC9 version is compiled using the Visual Studio 2008 compiler. If your PHP is set up using IIS, then you should choose the VC9 version.
Thread Safe and Non Thread Safe Because I initially used Non Thread Safe, an error was reported when starting Apache. The error message was due to this non-thread safety reason. So use the Thread Safe version
Second release:
Install Apache HTTP Server all the way to the default installation. Change the installation path to E:\PHP_Work\Apache2.2
Extract the contents of the php zip package to E:\PHP_Work\php5
Step 3:
Configure the environment and open apache’s httpd Edit the .conf file as follows:
1. Some online tutorials say to add LoadModule at the bottom of the file. I added it below a large list of LoadModules and added: LoadModule php5_module “E:/PHP_Work/php5/php5apache2_2 .dll”
2. Find DocumentRoot and change: DocumentRoot “E:/PHP_Work/Root”
3. Find and change:
4. I think this step is where I have been configuring incorrectly. The online tutorial also adds this sentence to the lowest end of the file, but I added it between and : Add AddType application /x-httpd-php .php .phtml
phpinidir “E:/PHP_Work/php5/”
Rename php.ini-dist in the php5 directory to php.ini.
Open Edit php.ini as follows:
1. Find extension_dir and change it to: extension_dir = “E:\PHP_Work\php5\ext”
2. Put extension=php_gd2.dll extension=php_mbstring.dll extension=php_mysql .dll extension=php_mysqli.dll extension=php_pdo.dll extension=php_pdo_mysql.dll extension=php_xmlrpc.dllRemove the semicolon (;) in front of
3. Find default_charset, remove the semicolon in front, and change it to default_charset = ” utf-8″
4. Find register_globals and change register_globals = On

Finally, copy libmysql.dll in the php5 directory to c:/windows
Restart the apache service and test whether succeed.
Create new test_mysql.php and write:
<?php
$link=mysql_connect( ‘localhost’, ‘root’, ”);
if(!$link) echo “Failure! “;
else echo “Success! “;
mysql_close();
?>

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/brother-i-have-my-own-php-environment-installation-and-configuration/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索