I. Apache cannot find the PHP Module
In httpd. conf, add:
Loadmodule php5_module E:/green/php-5.2.17-Win32-VC6-x86/php5apache2_2.dll # PHP installation path
Phpinidir E:/green/php-5.2.17-Win32-VC6-x86/PHP. ini # PHP configuration file path
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. htm
2. php cannot load and start MySQL Module
1. Problem Description
Today, MySQL in PHP is suddenly unavailable. The following error message is displayed:
Libmysql. dll not found, so this application failed to start Apache PHP
Startup: Unable to load dynamic library: C:/apachegroup/PhP5/EXT \ php_mysql.dll
Then, an error occurs when calling the MySQL function:
Fatal error: Call to undefined function: mysql_connect ()
Production read my system, PHP. INI has correctly configured extension_dir:
Extension_dir = "C:/apachegroup/PhP5/EXT"
Php_mysql.dll exists in extension_dir, but why cannot it be mounted.
2. cause of the problem
Google found that:
To load the DLL "php_mysql.dll", you must first load the base DLL "libmysql. dll,
Although the former is in the ext directory, it can be found.
Then the latter is not in the ext directory (even though he is still confused), and no system can find it.
3. There are two solutions:
1. Copy these DLL files to Windows.
2. Add the PHP root directory to the path.
Iii. coding problems
Encoding involves many aspects: (1) Client encoding. For example, you can right-click the browser and choose from the menu; (2) encoding used in the transfer process between the database client and the server; (3) encoding used for actual storage of the server database;
The most convenient way to deal with this process is to use utf8.
First, all server files, such as. html and. php, must be saved using utf8 encoding. Second, the database client sets utf8 before sending or receiving data, and the server uses utf8 encoding for database creation.
Life is so short that you don't need to focus on complicated code conversion unless you have to deal with the past and there are various coding systems. Let's embrace utf8!