hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : MySQL and PHP!?!? On Windows
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

MySQL and PHP!?!? On Windows

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-03-2007, 03:26 PM
GPearce GPearce is offline
Web Hosting Guru
 
Join Date: Jul 2007
Location: Wales
Posts: 315

MySQL and PHP!?!? On Windows


I have installed the latest Apache on my Windows Server 2k3, just to play with, and PHP. Then mysql, which all went in fine.
Then i added phpmyadmin, @ http://64.22.126.226/phpmyadmin , and i get an error:
Quote:
Cannot load mysql extension. Please check your PHP configuration. - Documentation

I clicked the link on Mysql, and got the following info:
Quote:
MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended.


I have added my PHP directory to PATH , and rebooted, but i still have the problem. How do i enable php_mysql.dll in the php.ini file? I searched for it in the file, and it came up as not there.
I installed PHP5.2.2 , and Apache 2.2, plus the latest community MYSQL, but they don't talk to each other



How would i finish the config to make it work? The server is only a playground, and i trust Apache more than IIS xD



Thanks

__________________
George Pearce | Get Started Blogging
Twitter me - @pearce

Reply With Quote


Sponsored Links
  #2  
Old 10-03-2007, 09:06 PM
kuldeeps kuldeeps is offline
Junior Guru Wannabe
 
Join Date: Aug 2006
Location: India
Posts: 32
A much simpler way to install Apache, PHP, MySQL, PHPMyadmin under
Windows is to use XAMPP for Windows which you can download from http://www.apachefriends.org/en/xampp-windows.html
It includes all the latest components and works perfectly.

Reply With Quote
  #3  
Old 10-03-2007, 11:27 PM
Jatinder Jatinder is offline
Web Hosting Master
 
Join Date: Sep 2005
Location: India
Posts: 735
In your PHP directory, you will have a file named php.ini-recommended. Copy this file and paste it to Apache/bin directory. Rename php.ini-recommended file to php.ini and restart Apache.

Quote:
A much simpler way to install Apache, PHP, MySQL, PHPMyadmin under Windows is to use XAMPP for Windows which you can download from http://www.apachefriends.org/en/xampp-windows.html
It includes all the latest components and works perfectly.
If you learning PHP to make a career out of it, I wouldn't recommend Xampp or any other easy to install Apache/PHP combo.

__________________
Darsh Web Solutions : Web Design, PHP Development, E-Commerce Solutions

PHP Tutorials : Tutorials and scripts for beginners

Reply With Quote
Sponsored Links
  #4  
Old 10-04-2007, 12:39 AM
Shining Star Shining Star is offline
Junior Guru
 
Join Date: Jun 2007
Posts: 187
Quote:
Originally Posted by scorpioxuk View Post
I have installed the latest Apache on my Windows Server 2k3, just to play with, and PHP. Then mysql, which all went in fine.
Then i added phpmyadmin, @ http://64.22.126.226/phpmyadmin , and i get an error:



I clicked the link on Mysql, and got the following info:




I have added my PHP directory to PATH , and rebooted, but i still have the problem. How do i enable php_mysql.dll in the php.ini file? I searched for it in the file, and it came up as not there.
I installed PHP5.2.2 , and Apache 2.2, plus the latest community MYSQL, but they don't talk to each other



How would i finish the config to make it work? The server is only a playground, and i trust Apache more than IIS xD



Thanks
You can enable php_mysql.dll, In php.ini windows extension block search

;extension=php_mysql.dll

change to

extension=php_mysql.dll

restart apache

__________________
Sstarshining [at] Hotmail.com
Hyper-V / Websitepanel / Plesk / Helm 4/3 /Control Panel Setup, Installation, Configuration, Troubleshooting
.
Server Managment,Websitepanel,Helm Migrations, Security & Hardening.


Reply With Quote
  #5  
Old 10-05-2007, 03:38 PM
GPearce GPearce is offline
Web Hosting Guru
 
Join Date: Jul 2007
Location: Wales
Posts: 315
I'm confused! I can't find php.ini-reccommended , and i'm not sure what windows extension block is

Could someone explain in "dummies terms" ?
I'm going to use it as an adrotator, that's all

__________________
George Pearce | Get Started Blogging
Twitter me - @pearce

Reply With Quote
  #6  
Old 10-06-2007, 12:11 AM
Shining Star Shining Star is offline
Junior Guru
 
Join Date: Jun 2007
Posts: 187
In php.ini search for

;extension=php_mysql.dll

and change it to

extension=php_mysql.dll

restart apache

__________________
Sstarshining [at] Hotmail.com
Hyper-V / Websitepanel / Plesk / Helm 4/3 /Control Panel Setup, Installation, Configuration, Troubleshooting
.
Server Managment,Websitepanel,Helm Migrations, Security & Hardening.


Reply With Quote
  #7  
Old 10-06-2007, 01:02 AM
Jatinder Jatinder is offline
Web Hosting Master
 
Join Date: Sep 2005
Location: India
Posts: 735
Quote:
I'm confused! I can't find php.ini-reccommended
Check in you PHP folder. This would be folder where you extracted the contents of the archive which you downloaded from php.net site.

__________________
Darsh Web Solutions : Web Design, PHP Development, E-Commerce Solutions

PHP Tutorials : Tutorials and scripts for beginners

Reply With Quote
  #8  
Old 10-06-2007, 03:17 PM
GPearce GPearce is offline
Web Hosting Guru
 
Join Date: Jul 2007
Location: Wales
Posts: 315
I installed using a MSI installer, it's just the simplest way.
Quote:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.


; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
This? I took the ; off of the windows one, and restarted Apache, nothing changed.

There isn't anything else like it there xS

EDIT - Ill try cahnging it to php_mysql.dll Another EDIT - that failed too

__________________
George Pearce | Get Started Blogging
Twitter me - @pearce


Last edited by GPearce; 10-06-2007 at 03:22 PM.
Reply With Quote
  #9  
Old 10-06-2007, 03:30 PM
jt2377 jt2377 is offline
Web Hosting Master
 
Join Date: Jul 2002
Posts: 3,336
Why use Apache on Windows? It's a mismatched. You probably better off with IIS6 and PHP on Windows than Apache/PHP on Windows.

Reply With Quote
  #10  
Old 10-06-2007, 03:36 PM
GPearce GPearce is offline
Web Hosting Guru
 
Join Date: Jul 2007
Location: Wales
Posts: 315
I don't get how to install and run IIS on Windows, if anyone can help then i'd do that
The tutorials are vague...

__________________
George Pearce | Get Started Blogging
Twitter me - @pearce

Reply With Quote
  #11  
Old 10-06-2007, 08:02 PM
dkitchen dkitchen is offline
Managed Hosting Expert
 
Join Date: Jan 2004
Location: North Yorkshire, UK
Posts: 4,163
I would second the reccomendation to use IIS, the only reason I'd ever use Apache on Windows is to serve Java/JSP apps...

It's pretty simple to install, control panel, add / remove programs / windows components / IIS... there are plenty tutorials out there on management once you've got it installed.

Dan

__________________
█ Dan Kitchen | Technical Director | Razorblue
█ ddi: (+44) (0)1748 900 680 | e: dkitchen@razorblue.com
█ UK Intensive Managed Hosting, Clusters and Colocation.
█ HP Servers, Cisco/Juniper Powered BGP Network (AS15692).


Reply With Quote
  #12  
Old 10-06-2007, 09:58 PM
Shining Star Shining Star is offline
Junior Guru
 
Join Date: Jun 2007
Posts: 187
Quote:
Originally Posted by scorpioxuk View Post
I installed using a MSI installer, it's just the simplest way.
This? I took the ; off of the windows one, and restarted Apache, nothing changed.

There isn't anything else like it there xS

EDIT - Ill try cahnging it to php_mysql.dll Another EDIT - that failed too

;Windows Extensions
;Note that ODBC support is built in, so no dll is needed for it.
;

;extension=php_bz2.dll
;extension=php_cpdf.dll
extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
extension=php_mssql.dll
extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll

__________________
Sstarshining [at] Hotmail.com
Hyper-V / Websitepanel / Plesk / Helm 4/3 /Control Panel Setup, Installation, Configuration, Troubleshooting
.
Server Managment,Websitepanel,Helm Migrations, Security & Hardening.


Reply With Quote
  #13  
Old 10-07-2007, 04:35 AM
GPearce GPearce is offline
Web Hosting Guru
 
Join Date: Jul 2007
Location: Wales
Posts: 315
Right. on advice, i binned Apache, and now have IIS serving teh IP address from the site, i think.
I'm going to download and install PHP5 for it, what else do i then have to do, configuration wise?

__________________
George Pearce | Get Started Blogging
Twitter me - @pearce

Reply With Quote
  #14  
Old 10-07-2007, 04:56 AM
GPearce GPearce is offline
Web Hosting Guru
 
Join Date: Jul 2007
Location: Wales
Posts: 315
Ok, it should be installed and working, but now i have a problem.
I copy-pasted PHPMYADMIN in as a directory, all good, but to reach the dir http://64.22.126.226/phpmyadmin/ i have to enter user/password . I tried my root one, and it loaded, but then i get page not found on index.php and main.php , both of which ARE there.
What do i do now?
Im no good at this
I setup a site for the IP address, and it's ok and i think it's working

Edit - I don't put a password in anymore i dont think, but i can't load it still, its "Not Authorized To View This PAge"

Another Edit - i went back to using the default website on the IIS manager, which does the job for now, but it still says not found inside the folders. There is no longer a permission issue though, i guess

__________________
George Pearce | Get Started Blogging
Twitter me - @pearce


Last edited by GPearce; 10-07-2007 at 05:04 AM.
Reply With Quote
  #15  
Old 10-07-2007, 05:03 AM
jt2377 jt2377 is offline
Web Hosting Master
 
Join Date: Jul 2002
Posts: 3,336
Quote:
Originally Posted by scorpioxuk View Post
Ok, it should be installed and working, but now i have a problem.
I copy-pasted PHPMYADMIN in as a directory, all good, but to reach the dir http://64.22.126.226/phpmyadmin/ i have to enter user/password . I tried my root one, and it loaded, but then i get page not found on index.php and main.php , both of which ARE there.
What do i do now?
Im no good at this
I setup a site for the IP address, and it's ok and i think it's working

Edit - I don't put a password in anymore i dont think, but i can't load it still, its "Not Authorized To View This PAge"
what's the default user? it should be something like iusr_machine. you need to grant permission for that account.

Not to pimp my own site but check this tutorial on phpmyadmin that i have. it's old but it should apply to your problem.

http://www.endlesscomputer.com/tutor...phpmyadmin.htm

your phpmyadmin problem sounded like an permission issue.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Amazon Adds New Tools to Cloud for Windows Developers Web Hosting News 2012-05-09 14:28:09
Web Hosting Sales and Promos Roundup - April 13, 2012 Web Hosting News 2012-04-13 17:17:21
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Web Host SoftLayer Offers Microsoft WebMatrix to Windows Server Customers Web Hosting News 2011-09-09 14:17:10
Web Host HostGator Launches Unlimited Shared Windows Hosting Plans Web Hosting News 2011-05-20 15:53:05


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?