Jump to content
xisto Community
Sign in to follow this  

Install Php 5 To Work With Mysql

Recommended Posts

hi, all


php 5 is new to all people a long time( actually, I forget how long...). it introduced a more object-oriented design to developer. like, access type(public, private, protected), abstract type(classes that can't create objects), interface support, and more.


althrought it is widerly available, someone still can't get it running with mysql. every time the php is starting up. a message prompted stated that some xtensions can not be found, and therefore, not loaded. so, I have written this to help other and newbie get it start quickly.


note: this is php setup is based-on windows, coz linux based actually complier with source code, so should be no this problem occur


1.) go php web site download it package(a .zip file) and place in a folder on your harddrive


2.) go to the folder in step[1], create a folder on your harddrive, in this case, "c:\php" extract all the files contained in .zip files into the folder you just create(c:\php)


3.) now, if you look at the folder c:\php, you will see there have two files a) php.ini-dist and B) php.ini-recommended. this is php config file. rename the php.ini-recommended to php.ini and copy / move it to you window directory

      win98 / winme / winxp ==> windows

      winnt / win2000      ==> winnt


4.) use any text editor(e.g. notepad) to open the file renamed above. try find a text string "extension_dir" and set the value of this parameter to the ext folder of your php installation path ( c:\php, c:\php\ext ),

extension_dir = "c:\php\ext\"


5.) try again found some text ";extension=". you have a list of extensions you can use, but some of which might required addition library to function. always check php mannal for more information. please look at three items, a) php_mysql.dll, B) php_mysqli.dll, c) php_gd2.dll( for create graphics ). delete the left most colon(:), save it and close you editor.


6.) on your keyboard, press "winkey+Pause/Break" key, the system properties dialog open. click on advanced tab, look for envionment variables, in system variables or user variables set an addition path to your php installation path and ext ( c:\php, c:\php\ext ), so click on either one(choose new or edit, depending on whether path variable exists), then

if path variable exits, use this form



if path variable no found, use this form



click ok and ok to close all dialog.

cheers, that it, the configuration of php is complete.

of course, you have to config you web server too, about the setting, you can refer to php manuual click here to view online or here to download a copy of it.


after php and web server are completed , try this code to test it work or not

<?php	phpinfo();?>
if you see a lot of items, then you successfull.

otherwise, pm me or send me a mail. :)





- hope this help

- Eric

Edited by magiccode9 (see edit history)

Share this post

Link to post
Share on other sites
EasyPHP MySQL errors on Windows Vista Home Premium PlatformInstall Php 5 To Work With MysqlHelp!I am trying to build a simple e-commerce shopping cart, so I installed EasyPHP, Apache, MySQL, IIS in one fell swoop. Apache appears to be working fine with green light go. However MySQL is red lighted and stopped.When I test it by using my web brower at http://localhost, I get the following errors:Warning: mysql_connect() [function.Mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:EasyPHPwwwincludesdatabasemysql.Php on line 13Warning: mysql_connect() [function.Mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. In C:EasyPHPwwwincludesdatabasemysql.Php on line 13Warning: mysql_get_server_info() expects parameter 1 to be resource, boolean given in C:EasyPHPwwwincludesdatabasemysql.Php on line 14Fatal error: Maximum execution time of 60 seconds exceeded in C:EasyPHPwwwincludesdatabasemysql.Php on line 14Can you assist me in getting the proper settings correct. I believe that's all that's needed.Thanks a bunch.Sincerely,(Poor) Deandra (smile)-reply by Deandra

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.