


WinXP + Apache +PHP5 + MySQL + phpMyAdmin installation guide_PHP tutorial
I finally got this to work, so I will post my findings here.
//PHP 5 : Windows build needs a MySQL DLL
//PHP 5.0 doesn't come with mysql support... You have to get the librariesyourself...
//I think u can get them from mysql.com
// PHP 5 Beta 2
//The file php_mysql.dll comes with these snapshots, as well as a new version of libmySQL.dll,
//so I suggest a full upgrade to Beta 2 instead of just extracting php_mysql.dll for use with Beta 1.
--------------------------------------------------------
到 www.jetdown.com 下载下面三种软件,做好安装准备
apache_2.0.47-win32-x86-no_ssl.msi
mysql-4.0.14-win.zip
phpMyAdmin-2.5.3-rc1-php.zip
----------------------------------------------------------------------------------------------
PHP 5 Beta 2 http://snaps.php.net/win32/php5-win32-latest.zip size:5.87 MB (6,162,835 bytes)
----------------------------------------------------------------------------------------------
安装配置PHP
1.解压缩PHP压缩包到C:php
2.复制C:php目录下的php4ts.dll及C:phpdlls目录下的所有文件到windows安装目录的系统文件夹里
(win9x/me是system目录,winNT,2k/winXP,2003是system32目录)
复制C:phpphp.ini-dist到windows安装目录下(如:c:windows),并将其改名为php.ini。用记事本打开,修改一下信息:
搜索extension_dir = ./ 这行,并将其路径指到你的PHP目录下的extensions目录,比如:
extension_dir = C:phpextensions
如若想支持更多模块,,搜索:
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
下面都用分号在前面注释掉了支持的扩展模块,如果你想PHP支持某个模块,请将前面的“;”去掉即可
修改完成后,保存php.ini,到此完成PHP的安装和配置。
我们在下面加入一行
extension=php_mysql.dll
//Note 1: The extension dir need not be ".", as Hermawan mentioned. It works fine for me with the extensions subdir where the other extensions are located.
//Note 2: The php.ini file need not be in the Apache root, as lars mentioned. It works fine for me in the Windows dir.
安装Apach2
1.备份 C:Program FilesApache GroupApache2confhttpd.conf 文件。
2. Use Notepad to open C:Program FilesApache GroupApache2confhttpd.conf
Find:
#NameVirtualHost *
Change to:
NameVirtualHost 127.0.0.1 //or localhost
Find:
Modify the following lines:
ServerAdmin (the administrator mailbox you just entered during installation)
DocumentRoot C:Program FilesApache GroupApache2htdocs
ServerName Apache2
ErrorLog C:Program FilesApache GroupApache2logserror_log
CustomLog C:Program FilesApache GroupApache2logsaccess_log common
Found:
AddType application/x-tar .tgz
Add the following two lines below:
AddType application/x-httpd-php .php
AddType image/x-icon .ico
Found:
#LoadModule ssl_module modules/mod_ssl.so
Add a line below:
LoadModule php5_module C:phpsapiphp4apache2.dll //php5_module is the key here. If php4_module apache cannot be started.
Add the default file:
Find the DirectoryIndex * line. You can modify it like this and add the default file name:
DirectoryIndex index.php default.php index.htm index.html default.htm default.html
Save the file and restart the apache server.
Finally, add the following two lines at the end of the file
ScriptAlias /php/ "c:/php/"
Action application/x-httpd-php "/php/php.exe"
At this point, the Apache PHP environment has been completely established.
Test:
Use Notepad to create a new file, write the following lines, and save it to the C:Program FilesApache GroupApache2htdocs directory. This directory is your site and directory, named phpinfo .php. Then enter http://localhost/phpinfo.php in the browser to see all the information about PHP.
phpinfo.php代码如下:
phpinfo();
?>
安装mysql
1.按默认安装在C:mysql
Copy the following files to the Apache modules directory:
phpphp4ts.dll
phpsapiphp4apache2.dll
phpdllsiconv.dll
If any of these files are missing in the modules directory, Apache will fail to start.
Be sure the extension can find the following files:
php_mysql.dll
iconv.dll
libmySQL.dll
If any of them can't be found, Apache will start but will issue a warning like this: "Unknown(): Unable to load dynamic library 'cphpextensionsphp_mysql.dll" - The specified module could not be found."
php_mysql.dll should be in the extensions directory.
iconv.dll should be in the Apache modules directory.
libmySQL.dll must be either in the Apache root directory or the Windows system directory. I prefer the former because it's cleaner, as other applications don't necessarily use this MySQL library version.
Note 3: Be sure to use the libmySQL.dll file bundled with PHP. In my case, trying to use the libmySQL.dll from the MySQL 4.1 alpha package resulted in this error message: "Unknown(): Unable to load dynamic library 'c:phpextensionsphp_mysql.dll" - The specified procedure could not be found."
Start Apache and everything should be fine.
2.运行C:mysqlbinwinmysqladmin.exe 设定user 和password
3.运行mysql,测试一下
mysql> show databases;
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
如果出现以上画面,表明mysql已经安装成功;
2.更改MySQL系統之管理者密碼(新密碼的地方,換成您要設定的密碼)
mysql> UPDATE user SET password=password('新密碼') where user='root';
3.编辑php5中的启动文件php.ini,将mysql和php5连接起来.
mysql.default_port=
mysql.default_host=
mysql.default_user=
mysql.default_password=
改为:
mysql.default_port=3306 说明的是mysql的缺省端口一般为3306
mysql.default_host=localhost 说明的是mysql的缺省主机名称
mysql.default_user=jinchao 说明的是mysql的缺省的用户名(root是最高级用户)
mysql.default_password=666666 设置管理员的口令
修改完后将apache重启,查看phpinfo页面.
安装phpmyadmin
修改 C:Program FilesApache GroupApache2htdocsphpMyAdminconfig.inc.php
查找以下这么一段:
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
在这段之后再继续查找:
找到 $cfg['Servers'][$i]['auth_type'] = 'cookie'; 將 『 config 』改為 『 cookie 』或 『 http 』
找到$cfg['Servers'][$i]['host'] = 'localhost'; 视情况做相应修改
找到$cfg['Servers'][$i]['user'] = 'root'; 视情况做相应修改
找到$cfg['Servers'][$i]['password'] = ''; 视情况做相应修改
找到$cfg['Servers'][$i]['port'] = '3306'; 视情况做相应修改

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.