With the apparent increase of interest in individuals desiring to install PHP and MySQL on computers running Windows operating systems, I thought it would be beneficial to provide a set of instructions to help make this process as easy as possible. In this article, I'll be providing some basics of IIS installation and then move to the installation of PHP and MySQL.

Some essentials you will need to get started:

  • IIS (latest version is 10.0)
  • The PHP Windows installer file
  • The PHP binaries file
  • The MySQL Windows installation file

Optional:

  • phpMyAdmin
  • MySQL Workbench

Install the IIS Web Server Application

Let's get started. Since you are installing these on a Windows computer, you will most likely be using IIS for a web server, however, it is not required. You must have some webserver running, however, and you are quite welcome to use Apache or another web server of your choice, however, since that falls outside the scope of this tutorial we will leave that discussion for another day.

IIS 10 is included with Windows 10 but is not installed by default. If you haven't already done so begin by installing IIS:

  1. Right-click on the Start Menu
  2. Click on Apps & Features
  3. Click on Programs and Features under Related settings
  4. Click Turn Windows features on or off on left sidebar
  5. Check the option for Internet Information Services (IIS)
  6. Click plus sign to expand options and select any additional features you want installed.
  7. Confirm everything and then click OK to begin the installation.

Toggle IIS on Windows Features Modal

This will install IIS and start the webserver service automatically. You should not need to reboot. To test your installation open your web browser and type in http://localhost/. This should bring up the default IIS page. If it does, your installation was a success and you can immediately get started on installing PHP.

Install PHP

It really shouldn't matter whether you install PHP first or MySQL first. I've simply gotten into the habit of beginning with PHP, so that will be my next step. To get the files you will need, go to the download page at php.net. At the time of this writing, the current version of PHP is 8.18. According to the PECL documentation, if you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) version of PHP. You will want to download the PHP 8.1.8 zip package. Unzip the files to C:\PHP. *Note it is not recommended to install PHP in a directory that contains spaces such as c:\Program Files\PHP as it can cause some web servers to crash.

I recommend adding PHP to the Windows PATH environment variable:

  1. Right-click on the Start Menu
  2. Click on System
  3. Click on Advanced system settings
  4. Under the advanced tab click on **Environmental Variables
  5. Click on Path (I usually change under system which affects all accounts, but up to you)
  6. Click edit button
  7. Add path to PHP: C:\PHP
  8. Keep hitting OK until everything closes

To test your PHP installation copy the following into a file and save it as info.php in c:\Inetpub\wwwroot\. (wwwroot is Windows IIS default website folder. Any of your web files will always go in there)

<?php phpinfo(); ?>

Then go to your web browser and type: http://localhost/info.php. If your installation was successful, this should display your PHP configuration information.

Install MySQL

Now we can proceed to install MySQL. Go to MySQL. As of this writing, the most current release is v8.0.29. Download the Windows(x86) file (the larger file, currently 439.6M). This is the full package and includes the installer. Unzip it to a temporary location and run the installer. For the most part, especially for someone doing this the first time, it's easiest to use the standard installation. This will essentially configure all the basic things you need to have MySQL work.

During the configuration, you will be asked which port to use. The default port 3306 is usually fine, however, if you know something else is already using that port, you can select another one. Your super user that will be created during the install is user root. Root is the chief administrative username and can do anything in MySQL. You can add other users later after you're up and running, but root is going to be your main admin access. Remember the root password you use. If you lose or forget it, there is no way to access it, and you could find yourself unable to use MySQL. Complete the wizard. Now let's test it to make sure it's working. Go to Programs, then MySQL, then MySQL Server 8, then MySQL Command Line Client. This is a utility similar to DOS for managing MySQL. At the password prompt type in the password you created and hit enter. If your server is working properly you should get something that looks like this:

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.16-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

MySQL>

If you see that, your installation was successful. You can type quit or exit to close the Client.

MySQL Workbench

Now there are some purists out there that probably swear by that command-line client and use it exclusively for managing their server. However, for us spoiled Windows dummies that are used to "easy-to-use" GUI's there is an alternative good tool for your server management: MySQL Workbench. Download the installer, and you will find the installation is very straightforward. After it's installed simply run it. For your logon the host would be localhost, the port would be the port you used when installing MySQL (default 3306) and the user would be root with the password you gave on installation. Since administering your MySQL server is beyond the scope of this article, we'll leave that for another day, however, you'll see very quickly the ease with which you can add users and create and manage your databases.

MySQL Workbench User Interface

Install phpMyAdmin

The last tool that I listed as optional, I actually couldn't live without it, and that is phpMyAdmin which can be downloaded HERE. Simply unzip the contents to a temporary directory. Create a folder called phpMyAdmin in c:\Inetpub\wwwroot\ and copy your extracted phpMyAdmin download files in there. Then open config.default.php in an editor and edit the following as needed.

Make sure the port number here $cfg['Servers'][$i]['port'] = '3306'; matches the port you used when installing MySQL. If you are going to only be using this as a development machine and it will not be connected to the internet or accessible from the internet use the following configuration for these three lines:

$cfg['Servers'][$i]['auth_type'] 	= 'config';  // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] 		= 'root'; 	// MySQL user
$cfg['Servers'][$i]['password'] 	= 'yourpassword'; 		// MySQL password (only needed with 'config' auth_type)

If this will be accessible from the web, you'll most likely want to use HTTP authentication, in which case change config to http and leave user and password empty. Save the file as config.inc.php in your phpMyAdmin folder.

For some reason on a Windows machine, phpMyAdmin seems to want access to php_mbstring.dll. To solve this open c:\Windows\php.ini (or WINNT if Win2K) and find the following:

; Directory in which the loadable extensions (modules) reside.
extension_dir = "./'
Change that to
; Directory in which the loadable extensions (modules) reside.
extension_dir = "./extensions/"

Then scroll down to this line and uncomment it (remove the leading semi-colon)
extension=php_mbstring.dll

Now, in theory, you should be able to go to http://localhost/phpMyAdmin/index.php and you should be working. "In Theory". However, I've done four Windows installations, and this is where I always run into a snag. For some reason, there seems to be a bit of a problem with the MySQL authentication protocol that it doesn't like. Since one of our members recently had this problem and rather than retyping everything, simply read the post here for the workaround to this. Once it is working it will look something like this:

phpMyAdmin User Interface

Conclusion

Well, that was a bit lengthy, but if all went well, now you should be happily ready to start serving up PHP pages on your Windows computer. My tutorial may not include every specific detail, nor will it answer every problem you might encounter. But it should get you to where you have a good installation.

If anyone has additional information, feel welcome to add it. Good luck with your installation!

This page was published on It was last revised on

Contributing Authors

1

120 Comments

  • Votes
  • Oldest
  • Latest
AX
55 1
Commented
Updated

Good info for getting a lil personal web server up for local testing, or development! 🙂

  • 0
    Thanks. I've been through four installs of this in the last couple months and none of them were flawless the first run through, so I figured I'd give a little rundown on the most effective way to do it without having all the issues I had to look up. — Mark Bowker
0
Commented
Updated

Hello:

I followed the instructions on installing PHP and MySQL written in this post.

I have run into a problem installing phpMyAdmin.

When I go to my browser and type: http://localhost/phpMyAdmin/index.php, I receive the following error message:

Cannot load MySQL extension. Please check your PHP configuration. - Documentation

I read this material and I still am not quite sure what to do to fix the problem.

  • 0
    After installing PHP, add the package it is asking for (PHP-MySQL), then edit the PHP.ini file. Scroll down to the Dynamic Extensions section and remove the semicolon beside the line: extension=MySQL.so. After that restart the httpd service and then try to install PHPMyAdmin again. Also from the documentation, this is what it says about that error: To connect to a MYSQL server PHP needs a set of Mysql functions called the Mysql extension. This extension may be a part of the PHP distribution otherwise it needs to be loaded dynamically. Its name is probably MySQL.so or php_mysql.dll. Usually, the problem is solved by installing a software package called PHP-MYSQL or something similar. — Mark Bowker
  • 0
    I finally got it to work. Apparently, I needed to create a config.inc.php file in my main phpMyAdmin directory. Copy the contents of config.default.php into this file. Then, make changes in the config.inc.php file to host, user, password, authentication mode, and pmaAbsoluteUri. I then needed to go to my PHP.ini file and make the following changes: remove the semicolon in front of extension=php_mysql.dll and set the path for the extension directory which in my case is: extension_dir="C:/php/ext". I was then able to start the phpMyAdmin file (index.php) and there it was. To solve this problem, I had to grab bits and pieces of solutions from various places. Phew, it was a lot of digging. Thanks for the help. — fullfocus
  • 0
    Thanks for providing the solution. The thought that you hadn't done the config.inc yet never occurred to me, but that would certainly gum up the works. Glad you got it! — Mark Bowker
  • 0
    The solution actually came from the documentation that came with phpMyAdmin. I tried the setup.php as suggested but all I got was the file being opened in Dreamweaver. So, I disregarded that idea. Thanks again for the help. — fullfocus
0
Commented
Updated

I was getting this error after applying your instruction:

phpMyAdmin Error showing cannot load mysql extension

However, I just changed everything back to the original state and I get no errors. However, a window pops up asking me where I want to save index.php. Is that supposed to happen?

0
Commented
Updated

I never had a message regarding index.php. I guess one of the changes you made to fix the original problem caused this one. I would do the installation again.

Is the index.php in the main phpMyAdmin directory under wwwroot? Also, make sure that you have a config.inc.php in the same directory as index.php.

Also, check your PHP.ini file and set these two lines:

extension_dir = "C:/PHP/ext"
extension=php_mysql.dll

Make sure to remove the semi colon for this statement

0
Commented
Updated

Ok, part of that worked only I got an error at the bottom of the page about couldn't load php_mysql.dll so I put the ; back in there and the error went away. Also, this is what I get at the top of the setup page:

phpMyAdmin setup configure.php

How do I correct this I replaced the $cfg['Servers'][$i]['auth_type'] = 'config'; with http and vice versa, still the same warning 😕

0
Commented
Updated

The "ext" directory was created during the PHP install. At least it did with my install. Don't forget you need to download 2 files to install PHP.

PHP 5.1.1 zip package
PHP 5.1.1 installer

Here's the download URL: https://www.php.net/downloads.php
The files are sitting under "Windows Binaries". It is the first and third file you need to download.

Try reinstalling PHP. See if you have any luck.

0
Commented
Updated

Does the php-5.1.2-Win32 get extracted into the PHP folder?

0
Commented
Updated

When you run the installer, which is the second file you download, it will prompt you for a directory. The default is C:\PHP - leave it at that. All the files should be placed in their appropriate spots.

0
Commented
Updated

Im not talking about that, I did the installer thing. The php-5.1.2-Win32 I downloaded has files and folders inside, do they belong in the PHP folder? if so it asks me if I want to replace certain files, all off the files match as far as name and size except one the php-win. Dont mind me I am just a bit frustrated ive been at this for quite awile...

0
Commented
Updated

Yes, in C:\PHP, create the following directory: ext. Copy all those files into C:\PHP\ext.

These are the extensions that are needed.

Here is what your PHP.ini file should have:

extension_dir = "C:/PHP/ext"
extension=php_mysql.dll

Remember no semi colon after those entries

0
Commented
Updated

this is what my line in the ini looks like:

extension_dir = "C:/PHP/ext"./'
is that correct or do you mean it should look like this:
extension_dir = "C:/PHP/ext"

Also I have to leave this line like this or I get an error at the bottom of the page:

;extension=php_mysql.dll

this is the error I get when I change it:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:/PHP/ext./?\php_mysql.dll' - The specified module could not be found. in Unknown on line 0

Also could this be part of the problem? Im used to using an older version of MySQL and the default intall local is C:/MySQL but I am trying the newest version and its install directory is C:\Program Files\MySQL

0
Commented
Updated

The line for the ext directory was copied exactly from my PHP.ini file. So, the line should read like that.

At this point and I know your frustration, I did this install three times before I got it to work. I deleted and uninstalled everything and started from scratch.

One thing that should be done and I don't know if it was, go to Control Program, Add or Remove Programs, Add/Remove System Components. In the components box, make sure that you have a check mark next to Internet Information Services (IIS). You probably do it just a double check.

Sometimes starting over, now knowing for what to look, may go smoother.

0
Commented
Updated

hi:
i did what u guys was saying but i got an error , i have provided the link location.

could u plese help me on this.[/url]

0
Commented
Updated

The error tells you exactly what to do.

"Probably reason of this is that you did not create configuration file."

You need to create the config.inc per the installation instructions or use the setup link that is provided in the error message to generate one.

0
Commented
Updated

ok after i download the config file then where i need to save it, will this be last step.

0
Commented
Updated

Your config.inc file needs to be in the root of the phpMyAdmin directory.

Side note. I would strongly advise creating a different user than root for your database and don't use "no password" unless this will only be on your local machine and not accessible from the internet. root is the master user name for mySQL and if you're using that with no password for your database you're asking for security problems. Particularly since you've given us a link to the error and it's obvious now to the world you're using root no password for the DB access.

0
Commented
Updated

Hi there, i'm new to this forum and hopefully will get answers for my probs....i'm windows user, using IIS server, last nite install MySQL, went through all the wizards stuff but when the execute button prompt, clicked it but the when configurating it tries to access the internet which current dont have and the process wont continue unless i have access of the net....is it crucial to have internet to install mySql database?

Someone help me!

Malakite

0
Commented
Updated

Your question isn't entirely clear. The only part that I know of in the install that would require internet access is where you are prompted to register with MySQL.org That is an optional part of the install. You can skip that.

0
Commented
Updated

yeah i got that and skipped it!
basically after hitting execute button,
It has frozen up during the final step (MySQL Server Instance
Configuration).

I'm installing it on Windows XP, and I used all the
default settings, except that I changed "Detailed Configuration" to
"Standard Configuration".

At the "Start Service" item in the checklist,
I got a 1045 error message saying to allow TCP port 3306.

also after re-running it, it puts a red 'x' in the "Start service" checklist and says "The service could not be started. Error: 0"

i dont know what is wrong

0
Commented
Updated

It's because the service was most likely already running. I remember running into that a couple times myself. If I recall correctly, just reboot the computer and you should be fine.

0
Commented
Updated

As part of the install:
Make sure you update the MySQL client for PHP.

After installing MySQL copy libmySQL.dll from the MySQL installation to the c:\php directory, overwriting the previous.

0
Commented
Updated

Thanks a lot everyone! i got it working by using DOS commandline, thanks again.

0
Commented
Updated

Umm, I need the username and password? What would it be?

0
Commented
Updated

username is: root. Unless you set a password during install there is no default password. Just leave it blank.

0
Commented
Updated

Cant get it to work... And I didnt set a PW

0
Commented
Updated

its great to see a PHP how to guide. I just went through instaling a PHP database and it was a pain the but to do on my own with only basic knowledge. I found this just a day too late 🙂

0
Commented
Updated

Hi
I'm very frustrated 😟
I've followed the instructions for installing all the bits.
MySQL works
PHP works
My IIS works
MySQL Admin Tool works
phpMyAdmin doesnt work 😟

I'm continously getting the

Cannot load MySQL extension. Please check your PHP configuration. - Documentation

error - my PHP.ini file looks like this (at the moment, but has looked several different ways)

; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:/PHP/ext"
extension=php_mbstring.dll

My config.inc.php file looks like this:

/ Authentication type /
$cfg['Servers'][$i]['auth_type'] = 'config';
/ Server parameters /
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/ Select MySQLi if your server has it /
$cfg['Servers'][$i]['extension'] = 'MySQL';
/ User for advanced features /
$cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';

should i add in the other bits from the instructions to the config.inc.php file?
ie. these bits:

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?

$cfg['Servers'][$i]['user'] = 'root'; // MySQL user

$cfg['Servers'][$i]['password'] = 'yourpassword'; // MySQL password (only needed

// with 'config' auth_type)

cos my config.default didnt have them so i didnt add them, could this be the problem?
I've tried moving the php_mbstring.dll file to different places within the PHP folder but no luck ... I'm completely baffled as to why this isnt working.
Thanks for any help
Sue

0
Commented
Updated

Under Windows extensions in PHP.ini uncomment

extension=php_mysql.dll

Make sure php_mysql.dll exists in the extensions folder.

0
Commented
Updated

hi
Thanks for that, it worked.
I now have a new problem - I know I should try to find the answer myself but I'm hoping you'll know quickly and save me a few hours searching and experimenting 🙂
Anyway, now I've got the error

MySQL said
#2003 - The server is not responding

I know the server is working (IIS)

where do i need to go to fix this?

Thanks
Sue

0
Commented
Updated

Nice tutorial, realy helped me in configuration. I was stuck from many days to do setup. thanks again

0
Commented
Updated

i follow the steps but when i type link of some PHP file, it give option to download instead to run the script. any clue, why is that.

0
Commented
Updated

brillaint ill try this later cheers

0
Commented
Updated

i follow the steps but when i type link of some PHP file, it give option to download instead to run the script. any clue, why is that.

You have to register the PHP extension in IIS.

0
Commented
Updated

i get

phpMyAdmin - Error
Cannot load MySQL extension. Please check your PHP configuration. - Documentation

MySQL.dll exists in the ext dir and i have uncommented it in PHP.ini, everything else is working i think but thats not :S

0
Commented
Updated

Reboot your computer or restart the MySql service.

0
Commented
Updated

Nice guide, everything else works but i get

phpMyAdmin - Error
Cannot load MySQL extension. Please check your PHP configuration. - Documentation

0
Commented
Updated

What version of MySql and PHP are you installing?

0
Commented
Updated

I uninstalled it all now am going to start from fresh. I don't really need that to work just trying to get java to work. I have 5 java files that were sent to me and I can't get them to work on tomcat. also when I go to http://x.x.x.x:8080 i get the router admin login when I'm on the local network so it is really annoying to rest. if I do localhost:8080 or 192.168.0.2:8080 it will work:s it always used to work just doing my external ip, but dosnt now on my new pc.

I am installing the latest of both whichever versions that is.

0
Commented
Updated

For PHP 5 the following should be uncommented in the extensions list

extension=php_mysql.dll
extension=php_mbstring.dll

(note there is a difference between MySQL.dll and php_mysql.dll

Make sure the path to the extensions directory is correct and make sure php_mysql.dll and php_mbstring.dll exist in the extensions directory.

0
Commented
Updated

cheers will try later because one of my websites hasnt got hosint at the moment

where is the extensions folder? i couldnt find it last time so just left it

0
Commented
Updated

You need to download the PHP 5.2.1 Windows Binaries from the download page and unzip it to the PHP folder. (it contains the extensions folder and the extensions. The Windows install file does not include them - they need to be added separately)

https://www.php.net/downloads.php

0
Commented
Updated

is there any tutorial on how to install PHP and MySQL on the new IIS 7.0 on Windows Vista?

thanks

0
Commented
Updated

Not here at OZZU, no. And unfortunately I don't have IIS 7.0 or Vista yet to mess around with it.

0
Commented
Updated

I'm not well versed in any of this.. I'm trying to install and learn PHP but i'm using Windows Server 2003. I followed the instructions on installing PHP but for some reason when I create the test file and place it in the wwwroot folder, it doesn't work.

Any ideas?

0
Commented
Updated

i get

phpMyAdmin - Error
Cannot load MySQL extension. Please check your PHP configuration. - Documentation

MySQL.dll exists in the ext dir and i have uncommented it in PHP.ini, everything else is working i think but thats not :S

I get the same thing, php_mysql.dll is unquoted, everything was done, i get the test to work, the setup.php to show, but index.php show that message. I check my extension folder, it was set corrected for C:/php/ext so I don't know what else I'm doing wrong. Please help

Nevermind, solved it by moving PHP.ini to windows directory. Argghhhhhh...wasted alot of my time.

0
Commented
Updated

I used your tutorial (Thanks for your work on that btw.) but I am having a problem connecting to any database. All of the following are on my local machine: PHP 5.2.2, IIS Server 5.1,MySql 5.0.41-cimmunity-nt and MS Server 2005 Developer. When I couldn't connect to Server 2005, I loaded MySql. I get similar errors while attempting to connect to either server. Mostly, no errors reported and no connection, the script just stops dead (I have tried a variety of connection strings but this is the latest).

$link_id = mysql_connect();
if($link_id) echo "Connected to the MySQL server successfully<br>";
else die ("Connection to the MySQL server was unsuccessful");

As mentioned, I am getting the similar results while trying to connect to MS Server 2005 using $link_id = mssql_connect(); .

Btw, I am having no trouble connecting to Server 2005 using ASP. But we have projects coming up that will require PHP.

PHP scripts that do not require a connection to the database are working fine. I have no trouble logging into MySql at the command prompt. It could be a separate issue, but when I try to log into Server 2005 thru an ODBC connection, I get a 18456, state 11 error.

I appreciate whatever help you folks can give on this. Thanks!

0
Commented
Updated

Check the comments in the post about using "old_password". Seems like most PHP programs I've tried on Windows do not like the default password encryption. Not sure why, but switching to old_password and creating new user accounts with old password encryption seemed to work. You can change existing users to old_password from a command line but I've run into glitches with that especially when trying to change root.

0
Commented
Updated

I changed the script to:

$link_id =  mysql_connect("localhost", $dbuser, $dbpass);
mysql_select_db($dbname);

if($link_id)
	echo"Connected! <br>";
else	
	die("Connection failed");

Still getting the error "Connection failed".

  • 0
    I got it! I misspelled my password. Strange as it may sound, that seems to affect the attempted connection rather adversly I see. — RickSavoy
0
ES
0 0
Commented
Updated

Hi,

I'm new to this forum and I'm seeking help in getting MySQL install working. The install went without any problems (XP2) but when I try to start the service I get these results:

Using the Command Line:
As soon as I hit "Enter" after typing the password, the black window disappears immediately.

Using the Config wizard: Error message that the service could not be started.

I checked the services page in "Admin. Tools" but MySQL is not listed there. I did a complete uninstall and a re-install but no change, the service just doesn't start. What can I do?

PS. I also have the Apache (2.2.4) server installed and it seems to work fine.

0
Commented
Updated

I have followed the instructions on this forum for installing PHP and MySQL on Windows XP IIS and all has gone well (amazing tutorial by ATNO).
But when installing phpMyAdmin the wheels come off.

I have been through everything posted on this forum and can't get it to run smoothly.
I have actually gotten to the http://localhost/phpMyAdmin/index.php page on a couple of occasions and its working but then I close the browser and try to access it again and I get this:
phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly

it will work/not work spiratically without me changing any setting at all. I am freaking out over here because I am trying to get all this set up so I can develop a database for the website I am working on which is due in less than a week. Admittedly my PHP/MySQL skills are rudamentary at best but I am usually pretty good at following directions and guidlines which gets me through. However, in this situation, I am completely stumped and would greatly appreciate any form of advice or help that anyone can offer me.

thank you

--edit--

On one of the times I was successfully able to log in to phpMyAdmin, I attempted to make a test database with a test table. The database is created, but when I attempt to create tables I get this error:

No tables found in database.
PHP Warning: session_write_close() [function.session-write-close]: open(C:\DOCUME~1\YEMI\LOCALS~1\Temp\php\session\sess_apbmimv71ugga9lji84saqshi3, O_RDWR) failed: Permission denied (13) in C:\Inetpub\wwwroot\phpMyAdmin\navigation.php on line 82 PHP Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\DOCUME~1\YEMI\LOCALS~1\Temp\php\session) in C:\Inetpub\wwwroot\phpMyAdmin\navigation.php on line 82
0
Commented
Updated

I have installed IIS (through Control Panel), and when I go to http://localhost/, it says I need a password 😢

I've put in every password that I could think of, on every user account on my computer (damn parents) lol.

Any help = me being grateful!

0
Commented
Updated

Your Windows Login username and Password will work. However, that's the damnedest thing. I've been using IIS for years and http://localhost/ has NEVER required a password, but damned if I didn't open localhost on my laptop just now and it asked for a password too. Has never done that. My Windows / Domain Admin username and password worked, but have no clue why it's asking for username and pass.

Going to have to look into that. It may just be because you haven't set up a website yet and the default is the iisstart page. Might be that they changed it to prompt for administrative password

0
Commented
Updated

Well, on my computer there is no admin password (by Windows default of corse)

Still cant figure it out. Ive been messing with it for awhile now >.>.

You think that if I called a computer place (for instance dell, because my workstation is from dell), that they would be able to help?

0
Commented
Updated

have you tried your user name and leaving the password blank? Or just try Administrator and leave the pass blank.

0
Commented
Updated

Any more tutorials? like ASP,net and such..

0
Commented
Updated

have you tried your user name and leaving the password blank? Or just try Administrator and leave the pass blank.

I got this to work.. Sorry I didn't post earlier.

0
Commented
Updated

Just wondering if I can, hopefully, get some help with this. I followed the steps here to get PHP and MySQL setup on my system, using IIS, so that I can run Helpdesk Reloaded for work. It's a Windows 2000 Server system, ISS 5.1 (if memory serves me correctly, I'm pretty 2K comes with IIS 5.1, not 5.0), PHP 5.2.4, and MySQL 6.0.2, also I have installed MySQL Tools 5.0 and phpMyAdmin 2.11.1. The install of Helpdesk Reloaded worked fine, database has all the information imported into it from local version I was running using EasyPHP. The login page wasn't coming up at first, but that was just because a config.php file didn't have the DB password in it, that comes up fine now. But now, whenever I go to log in it comes up that the page can not be displayed and the error code is "HTTP 405 - Resource not allowed." So, obviously, this is a problem with IIS, and I'm guessing it's not agreeing with some verbs. I currently have .php set to All Verbs, instead of Limit to, because I figured that should fix the problem, but alas, no go. So, any help would be greatly appreciated.

0
Commented
Updated

did you reboot the computer after reseting PHP to All Verbs? I've found after making a change to the config that's sometimes all it takes.

0
Commented
Updated

did you reboot the computer after reseting PHP to All Verbs? I've found after making a change to the config that's sometimes all it takes.

Rebooted it after each change I made, hoping that'd work, since it usually works for most things. Any other ideas?

0
Commented
Updated

Now, correct me if I'm wrong in this, but basically, what I'd do is replace where it says to choose ASP.dll with php5isapi.dll, since I'm using PHP, not ASP for the page, and I'd set up php5isapi.dll for .php extension, not the .html extension, yes? (Though, I tried for .html and .htm as well, just to see what would happen, and no go.)

Also, I discovered that if when I type in the URL, instead of going to http://www.domain.com, I go to http://www.domain.com/index.php it will let me log in, but certain PHP scripts, when I go to certain pages, won't run, and part of the page will be blank.

I found one site that said that the cause of that is if you have FrontPage setup in IIS, so I removed it, but it still happens.

0
Commented
Updated

For the mapping I used .php ext c:\PHP\php-cgi.exe verbs "all". Have never had a problem with any PHP file.

I got that from here when I set mine up.

https://www.visualwin.com/PHP/

0
Commented
Updated

Sorry for taking so long to respond. Well, I set up the server earlier to use PHP-CGI.exe, and once I finished configuring it because of the redirect, it still has the same exact problem. Anything else you can think of? (At this point, I'm thinking it might be easier to wipe it, install Fedora, then just yum install Apache, PHP, and MySQL.)

0
Commented
Updated

I seem to recall trying a couple programs once where I've got that error. Oddly I have about a dozen PHP apps running just fine on IIS with MySQL including phpMyAdmin, phpBB, and Coppermine as well as ones I wrote. I basically summed it up as something in the way the programs were written that IIS didn't like, couldn't figure out what, and just chucked the programs and found another solution.

0
Commented
Updated

hi anto,
quick question, im following thesesteps to install the php/mysql onto my existing iis 5 server running on a windows 2000 sbs server i have here.
im wanting to add a moodle website to my server, in addition to my existing websites already on the server.

in order to run the moodle site ineed PHP and MySQL.
my question is this, im installing PHP, and its asking what 'webserver setup'... what web server setup? 'do not setup a web server' since i already have my iis up and runnin fine?
thanks
marc
im very new to PHP, i had the wamp package running on a dedicated pc, but not an iis server previously!
thanks'
m

0
Commented
Updated

You know it's been nearly two years since I've set it up and I can't recall that part of the install. Perhaps someone with a more recent install experience could answer that for you.

0
Commented
Updated

Thank you for your great tutorial.

I am having some issues with the PHP. I can run the test page and it works but no other .php pages will load?

Any suggestions?

0
Commented
Updated

Hello there

First of all thanks for your tutorial. After four frustrating hours am more frustrated now(but every programmer goes through it), I've been trying to run PHP on windows xp machine which is used for development purpose. Am not sure where am going wrong. I have carefully followed the instructions in this tutorial but still am getting HTTP 500 error, Should I use php5isapi.dll for mapping purposes or PHP.exe? Sorry am totally confused and a newbie for PHP, so any help would be much appreciated.

Tons of thanks in advance

0
Commented
Updated

I have followed your instructions to the 'T' and I am getting an error when I goto my browser:

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

I can not find any errors or a log file for that matter.

My PHP.ini you said to edit is not where you said it would be it is in the c:\PHP directory. Although I did modify it according to your instaructions.

Also I am running the defaulr web server on port a non standard port.

Any insite would be great

Thank you

0
Commented
Updated

If you didn't do the standard Windows Install, then you need to copy and paste the PHP.ini to C:\Windows
That should fix the errors once PHP.ini is in the correct place.

0
Commented
Updated

I would first like to say awesome tutorial.

When I tried to follow it, I got to the part of installing PHP and got this error when trying to install it:

PHP Setup Window

Here is the error:

PHP Setup Unexpected error installing the package

It says "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2878."

I have tried re-downloading the installer 3 times already, and I've disabled the Bitdefender and registry mechanic programs that I have installed. I have also tried to restart the pc and none of those things helped.

0
Commented
Updated

This was apparently a problem with 5.2.5 and was reported on November 9th. This issue was addressed and closed by jmertic. Apparently, it's now fixed in the CVS but might take a few days for the installer. I'd suggest giving it a day or two and downloading it again, or if you want download the current CVS from the link provided in that post. If you aren't comfortable installing from a CVS, I'd suggest waiting until the installer is fixed.

0
Commented
Updated

thxs for the quick responce. i dont mind waiting so ill just wait for the installer.

0
Commented
Updated

nice tutorial.

I have an interesting problem and since you seem to have been really great in answering these fine people's questions, i thought I might pose it to you.

windows 2k3 standard server running iis = works fine
PHP is installed and working great.
MySQL is installed on another server in the same domain and it is working great

i want to link the PHP install on the PHP machine to the MySQL install ont he MySQL machine.

i have the MySQL.default_host = 192.168.1.141 (the server's ip on the network, i have also tried it's hostname) but when i open my test.php file to see what's installed and working in PHP, it does not list MySQL at all.

ultimately i want to use phpmyadmin to manage the MySQL install, but since my server running PHP can't see MySQL, that isn't going to work yet.

so besides installing PHP on the MySQL server, is there a way to get this setup to work?

0
Commented
Updated

Never done that but just a hunch, you probably need to include the port msySQL is using, example 192.168.1.141:3306

0
Commented
Updated

tried that, no dice. hmmm... i might try installing PHP on the MySQL server just to ensure that that local installation can find the MySQL using localhost.

I am having a hard time finding any documentation on how to troubleshoot a remote MySQL connection like this though online.

0
Commented
Updated

thanks for the info, I tried what that guy said, but there's no change.

I am wondering if what I am trying to accomplish is even worth it...

I have a database server i wanted to use for all of my SQL and MySQL dbs and an IIS server that would run websites with various languages like ASP, PHP, etc. I was hoping that the PHP would link to MySQL on the other server to keep things uniform like that so I wouldn't have to put the MySQL dbs on the IIS server.

does this sound like a waste of time to you?

I kind of find it odd that I can't just define that MySQL is at that specific location and PHP wouldn't jsut communicate with it, but then again, i am not an expert so...

0
Commented
Updated

update: interesting twist to the issue. on a hunch i tried to telnet from the IIS server to the database server on port 3306. it doesn't allow it. so there may be hope yet and it may lie in permissions. I'll keep digging and let you know.

0
Commented
Updated

Check to make sure Window's firewall is NOT on. It will block it. I was reading a post yesterday with the same issue and all it was was the firewall. Once that was disabled everything worked peachy. (Sorry, had to leave quickly and didn't get to post or bookmark the page). If you use a 3rd party Firewall, make sure your Web Server is permitted.

Also if you use MySQL Administrator, log into it as root or an admin account and on the Startup section, General tab make sure "Disable Networking" is not checked. If it is, uncheck it and restart MySQL.

0
Commented
Updated

both servers are win2k3 standard, neither using any firewall. local router with firewlal on it allows all lan to lan traffic. i think i originally configed this instance of MySQL with remote connection disabled. i am attempting to remove it and readd it with remote connection enabled.

0
Commented
Updated

did that. now telnet works. it didn't automatically show up in my PHP file, but i'll try some things and see what i can come up with. i really think this is supposed to be able to work.

0
Commented
Updated

Yes it should work. I've just never done it so I'm guessing here.

In your php.config.ini how does this line read?

$cfg['Servers'][$i]['host'] = 'localhost';
0
Commented
Updated

$cfg['Servers'][$i]['host'] = '192.168.1.141';

that's the ip of the database server

to tell you the truth though i am not even looking at phpmyadmin because PHP doesn't list MySQL or when you do a

<?php
phpinfo();
?>

i am assuming that this issue needs to be fixed first and then phpmyadmin will fall into line after that.

i just don't get what i am missing.

I have extension=php_mbstring.dll and extension=php_mysql.dll unquoted in PHP.ini

extension_dir = ".\ext"

MySQL.default_host = 192.168.1.141

the path to the PHP directory is set in windows... I'm not sure what else can be edited.

I also went to MySQL and ran a
GRANT ALL PRIVILEGES ON . TO USERNAME@IP IDENTIFIED BY "PASSWORD"; supplying my root username and password to it.

thoughts?

0
Commented
Updated

probably won't make a difference, but try adding the default port 3306 here around line 690

; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
MySQL.default_port =

remember after making any changes to PHP.ini you should reboot. I've driven myself nuts over issues that I fixed but didn't realize I had until after I rebooted.

0
Commented
Updated

Also from:

https://www.php.net/manual/en/ref.mysql.php

Try this I found in one of the comments:

<? php
Following PHP Script is useful to test PHP connection with MySQL.
*/

//$connect = mysql_connect("Your Host Name", "MySQL root directory", 'MySQL password, if any');
//$connect = mysql_connect("Host Name or Address - 127.0.0.1", "root", 'password');
$connect = mysql_connect("localhost", "root", 'password');
if ($connect){
echo "Congratulations!\n<br>";
echo "Successfully connected to MySQL database server.\n<br>";
}else{
$error = mysql_error();
echo "Could not connect to the database. Error = $error.\n<br>";
exit();
}

// Closing connection
$close = mysql_close($connect);
if ($close){
echo "\n<br>";
echo "Now closing the connection...\n<br>";
echo "MySQL connection closed successfully as well.\n<br>";
}else{
echo "There's a problem in closing MySQL connection.\n<br>";
}
exit();
?>
0
Commented
Updated

probably won't make a difference, but try adding the default port 3306 here around line 690

; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
MySQL.default_port =

remember after making any changes to PHP.ini you should reboot. I've driven myself nuts over issues that I fixed but didn't realize I had until after I rebooted.

tried both, no change.

tried the PHP connect script but for some reason it is erroring out with unexpected T_VARIABLE

0
Commented
Updated

wow...

i found the fix...

Add the following registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5\IniFilePath -> c:\php5

that is... really... out there...

i'll see if i can get phpmyadmin working next.

0
Commented
Updated

phpmyadmin works great now.

awesome!

thanks alot for your help. I'll check out the rest of the forum and see whatelse is cooking around here 🙂

0
Commented
Updated

Interesting solution. Where is your PHP.ini located? I just assumed it was in C:\Windows. Regardless Glad you got it.

0
Commented
Updated

D:\PHP5

i added that to the system variables path in windows... i thought that would be enough.. aparently the reg key is needed in my case.

0
Commented
Updated

good to know. I'm sure down the road someone else will be playing with the same thing and benefit from the solution. (probably me *lol). Thanks for letting us know how you did it. For the record for those reading in the future, if you use the Windows Installer, PHP.ini will be installed in C:\WINDOWS and the environment variable path set correctly for PHP. However a manual install won't do that, and you should copy PHP.ini and place it in the Windows directory.

0
Commented
Updated

Hey ATNO/TW, thanks for the superb tutorial on installed PHP and MySQL on Windows Server 2003 with IIS. I'm new here and truly new to IIS. My situation is, I have PHP installed, it is running, I have MySQL installed (MySQL Admin reports that is it also running. My issue, I am not having any success at getting the two scripts to talk to each other.

I am installing Joomla 1.0.13 (Stable) on that particular server and this is the confirmation screen data:

PHP version >= 4.1.0 Yes

  • zlib compression support Available
  • XML support Available
  • MySQL support Unavailable
    configuration.php Writeable
    Session save path Unwriteable
    Not set

MySQL Support - unavailable, why? What is going on? I've checked, double check and did everything form the PHP.ini file to dragging the libmysql.dll to the C:\Windows\system32 directory. PHP is running fine, MySQL is 'supposedly' running fine. Can someone please help me figure this problem out before I lose my insanity.

(*Note: Session save path is not important, Joomla does that on my working linux server sometimes and works properly.)

On the good note, everything works perfectly with usbwebserver from http://www.usbwebserver.com

Any help would be appreciated. Thanks in advance and Happy Holidays!

0
Commented
Updated

Thanks for the compliments on the tute. It's a little old and needs some updating. Hope to get to that soon.

Unfortunately, I've haven't installed Joomla on Windows yet, so not sure what kind of glitches might happen. I do have a friend that solely uses Joomla on IIS, though. If I catch him online I'll have him look at your post and see if he has any thoughts.

Might help to know which version of MySQL you installed.

0
X1
0 0
Commented
Updated

Hi, I've been searching online for the last few hours trying to find the best (and most recently active) thread on the topic of Windows + PHP + MySql + phpMyAdmin installation. And, I'm pleased to report that this is by far the best resource that I could google.

I'm hoping that you can help me understand the problem that I'm currently experiencing with my installation.

I am using:

  1. MySql 5.1.22-rc-win32
  2. PHP 5.2.5-win32-installer
  3. phpMyAdmin 2.11.4-rc1-english
  4. Windows 2003 Server
  5. IIS 6.0

I've tested a phpinfo.php file containing

<?php phpinfo() ?>

and a test.php containing

<?php 
// Connecting, selecting database 
$link = mysql_connect('localhost', 'root', '<password redacted>') 
or die('Could not connect: ' . mysql_error()); 
echo 'Connected successfully'; 
mysql_select_db('mysql') or die('Could not select database'); 

// Performing SQL query 
$query = 'SELECT * FROM user'; 
$result = mysql_query($query) or die('Query failed: ' . mysql_error()); 

// Printing results in HTML 
echo "<table>\n"; 
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { 
	echo "\t<tr>\n"; 
	foreach ($line as $col_value) { 
		echo "\t\t<td>$col_value</td>\n"; 
	} 
	echo "\t</tr>\n"; 
} 
echo "</table>\n"; 

// Free resultset 
mysql_free_result($result); 

// Closing connection 
mysql_close($link); 

if ( !is_dir( session_save_path() ) ) {
	echo "'session.save_path' directory not set! Please set your session.save_path in your php.ini file.";
} else {
	echo "'session.save_path' is set. ";
	echo session_save_path();
}

?> 

The results are a succesful phpinfo output containing the following (most likely relevant) entries:

header (not titled)
Loaded Configuration File C:\PHP\php.ini

configuration
extension_dir C:\PHP\ext

MySQL
Client API version 5.0.45

session
Session Support enabled
Registered save handlers files user
Registered serializer handlers PHP php_binary wddx

session.save_path C:\PHP\sessions

The output of the test.php looks like this (modified to remove password output)

Connected successfully
localhost root *<password redacted> Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0
'session.save_path' is set. C:\PHP\sessions

Yet when I visit my myphpadmin page, I get

phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

I have reviewed the suggestions in this thread and granted both the IUSR_<machinename> and NETWORK_SERVICE users full control of the C:\PHP\sessions directory.

I would greatly appreciate your assistance. Please help me figure out what I'm doing wrong.

Thank you

Edit: Before you ask, I have tried to turn on log files and have been unsuccessful. I'm entirely willing to try to turn log files on but I will need instructions.

0
X1
0 0
Commented
Updated

LOL 🤣

Well, I hate to remove my post as it might contain useful information for others who have similar problems... but after closing the web-browser and restarting it, I now get:

Welcome to phpMyAdmin 2.11.4-rc1

Probably reason of this is that you did not create configuration file. You might want to use setup script to create one.

Error
MySQL said:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

phpMyAdmin was unable to read your configuration file!
This might happen if PHP finds a parse error in it or PHP cannot find the file.
Please call the configuration file directly using the link below and read the PHP error message(s) that you receive. In most cases a quote or a semicolon is missing somewhere.
If you receive a blank page, everything is fine.

./config.inc.php

I should be able to solve the remaining problems from here. I will report results briefly (I'm sure you'd like to know how it ends.)

0
X1
0 0
Commented
Updated

Ok, ran the ./phpmyadmin/scripts/setup.php script and generated my config, then opened a new browser window (lesson learned) and voila... since I chose HTTP auth_type, I get prompted for a username & password using the Microsoft CHAP window.

Enter the appropriate username/pass and I have a working phpmyadmin installation.

Hopefully this information is helpful to someone, and thank you for putting together a well documented installation process, it was very helpful

Regards. 😎

0
Commented
Updated

Thanks for updating. I just saw your PM. Sorry I couldn't get to it sooner. And thanks for the compliment on the tute.

0
Commented
Updated

Hello All:

Here's my scenario:

I have PHP, MYSQL running on Windows XP SP2, IIS V5.1.

Whenever I attempted to connect to MySQL via PHP, I was getting a nasty fatal error referencing and undefined mysql_connect...

I managed to clear that up by creating an environmental variable PHPRC.

Now, whenever I test a connection to MySQL, I get a blank browser page. Whenever, I attempt to insert data I get the HTML confirmation, but no entry has taken place.

I am at a lost. Has anyone experienced this before.

Thanks.

0
Commented
Updated

Update:

phpMyAdmin works fine. However, I cannot connect to MySQL via PHP. I still get a blank page.

0
Commented
Updated

There is probably something wrong with your connection string then. phpMyAdmin works on PHP and uses MySQL so it sounds like you are set up fine.

What's your connection string you're trying to use?

0
Commented
Updated

There is probably something wrong with your connection string then. phpMyAdmin works on PHP and uses MySQL so it sounds like you are set up fine.

What's your connection string you're trying to use?

I snagged this off the net:

<?
error_reporting(E_ALL);
$connection = mysql_connect("localhost:3306", "root") or die ("Cannot make the connection");
$db = mysql_select_db("word", $connection) or die ("Cannot make the connection");
$mynums = array(3,5,10,20);
if(in_array($_POST['select'],$mynums)) {
$SQL = "SELECT * FROM Random ORDER BY RAND() LIMIT {$_POST['select']}";
}
$result=mysql_query($SQL);
echo ($result);
?>

0
Commented
Updated

This test script actually worked:

<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

So, it must be the connection string.

0
Commented
Updated

I went through all of your steps..my set up is:

My setup:

WinXP Pro
IIS 5.1
PHP Version 5.2.5
MySQL Server 5.0
PHPMyAdmin 2.11.3

PHP works, and I can log onto MYSQL. When I try to run phpmyadmin i get:

"phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly."

Where are these logs under IIS?

Any pointers on how to troubleshoot this? I had all of this running well about 2 years ago but that must have been with older versions of everything......

0
Commented
Updated

Hey CrumpyBumpy,

I experienced the same error with PHP. The error message is vague. So, a solution for one may not be a solution for the other. Nevertheless, I'll tell you what I did.

In the PHP.ini file, I enabled the extension=php_mbstring.dll under the dynamic extensions section.

The IIS log files are located at: C:\WINDOWS\system32\Logfiles\W3SVC1

0
Commented
Updated

I spoke too soon.

Yes, the last test script I posted tells me that the user connected successfully. However, when I view MySQL Administrator, I see no connect.

Troubleshooting continues...

0
Commented
Updated

Finally, I found my error.

<?php is needed as opposed to <? when opening a PHP script.

0
Commented
Updated

Thank you ATNO/TW for the great tutorial. MySQL Administrator is a great tool (the first time I've seen it).

Thank you too for taking the time to help all of us noobs with this setup.

Now for my issue. I'm trying to set up PHPBB for our gaming group and just can't get it to work. It seems that PHP is installed correctly (I get the info.php screen). It seems that MySQL is installed correctly (I get the part where I enter the password in MySQL monitor and log in successfully). However, when I go to the setup for PHPBB it doesn't show MySQL as being installed. In MySQL Administrator, it shows 3 databases: information_schema, MySQL, and test.

I've totally removed everything (PHP, MySQL, PHPBB) and reinstalled it without luck. I did get stuck on one thing during your tutorial, the part about editing the PHP.ini file. I don't have one in my C:\Windows directory so I edited the one in my C:\PHP directory. C:\PHP is in my path so that should work.

I'm a newbie with PHP, PHPBB, and MySQL so I may have missed an easy thing but I'm just at a loss right now. Thank you for any help you can give me.

P.S. I did try the PHPBB forums and was unable to get any help.

0
Commented
Updated

Use MySQL administrator to create a new database. By default phpbb2 used forumdata as a database name (however you can name it anything you want). Then create a user in MySQL Admin and grant that user rights to the new database. phpbb does not create the database for you. You have to do that first. Then in the install enter the username and password of the user you assigned rights to the database. Then the phpbb install will create the tables and populate the database for you.

Then try the phpbb install. Make sure your config.php file is writeable by all.

btw, thanks for the compliments. Much appreciated.

0
Commented
Updated

You especially deserve the compliments. I realize how much time it takes to do your life, work and still moderate a forum like this.

Sorry it took me so long to try this out. That whole life thing keeps getting in the way. 😉 This is what I have so far.

I had an existing database from a previous install on an Apache server called PHP so I moved the folder to the "C:\MySQL\MySQL Server 5.0\data" folder. Restarted MySQL service and I can see it fine in MySQL Administrator. I then created a user called phpbb and assigned all privelages to that user. (see my screen shots)

I then checked the permissions on the config.php in the forum directory and they are set so everyone can write, read and execute and modify.

Launching the install for phpbb still shows MYSQL as unavailable.

I would be happy to try a totally new database but I don't know where to create one in MySQL Administrator.

Thanks again for your help and if you need information I'm not including please ask me because I'm not sure what else you may need.

Screen shots:

0
Commented
Updated

That is an advertising web search page. Why go there n_oandasan?

0
Commented
Updated

Open config.php in an editor. By default it is blank. If anything is in it, remove it and replace it with this:

<?php

// phpBB 2.x auto-generated config file
// Do not change anything in this file!

$dbms = 'mysql';

$dbhost = 'localhost';
$dbname = 'php';
$dbuser = 'phpbb';
$dbpasswd = '******';  //password for phpbb user.

$table_prefix = 'phpbb_';

define('PHPBB_INSTALLED', true);

?>

Save it, then remove the install and contrib folders and try to access it in a browser:

http://localhost/phpbb/index.php (or the correct path to your forum)

If you get errors, post the exact error message.

0
Commented
Updated

I made the change to the config.php file, removed the install directory and I did not have a contrib folder.

The error I get is:

The website cannot display the page        HTTP 500  
Most likely causes:
The website is under maintenance. 
The website has a programming error. 

What you can try: 
Refresh the page. 

Go back to the previous page. 

More information

This PHP file (I copied from a website and put in the same directory with the index.php) pulls the date and seems to work fine.

I put this because it seems PHP is working. The code I used for the date is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title>Today's Date</title> 
<meta http-equiv="content-type"
   content="text/html; charset=iso-8859-1" /> 
</head> 
<body> 
<p>Today's Date at Quester's Guild is <?php

 echo date('l, F dS Y.'); 

?></p> 
<p> </p>
<p> </p>
<p> </p>
<p> <h1>Check for our new forums coming soon.</h1> </p>

</body> 
</html>
0
Commented
Updated

Sorry about the double post but I just removed everything in the forum directory and put all the files from the PHPBB3.0 zip download file (except the nice config.php file you just had me make) and I got the same results.

One other thing: in the config.php file where "$dbpasswd = '**'; //password for phpbb user. " is should I substitute the password for **? Sorry if that is a dumb question but I hate assuming then being wrong. (I tried it both ways and neither worked.)

0
Commented
Updated

yes, that was the idea.

Did you try the info.php file as suggested in the tutorial? If so, does it recognize and give information about MySQL? If it does, then the problem is a connection issue.

0
Commented
Updated

Yes, I did and it works great. I don't see anything about MySQL in the info.php.

By connection issue what do you mean and would a MySQL reinstall help or what's my next step?

I was thinking through some stuff and maybe this has something to do with what is going on here (or I could just be throwing in some unnecessary information 😕 ). I use host headers because I host several websites and as a result, the http://localhost addresses will not work for the PHPBB stuff. Do I need to change something during the MySQL setup to point to the actual address for the forums rather than localhost?

0
Commented
Updated

I'd be very certain that would be your trouble spot. Unfortunately I've never set up a system like you appear to have it, so don't know what to suggest. But I would certainly focus the troubleshooting on that.

0
Commented
Updated

I'm not making much progress with MySQL. Would you have any advice for using MSSQL Server 2000+ via ODBC since that says available?

  • 0
    You can use PHP with MSSQL Server, but I've never done it, so really have no advice. You might want to start a new separate thread if you'd like to try that approach. — Mark Bowker
0
Commented
Updated

Hello.

I followed the tute. But I am unable to pull up the info.php.

I have done everything in the posts. Tried reinstalling PHP and MySQL and still it is not pulling a page, not from localhost, nor from xxx.xxx.xxx.xxx/info.php

Any ideas why this could be?

Also. I have uninstalled PHP and MySQL 20 times. Have uninstalled the IIS service 3 times. Still I can not view the PHP page. I can't even view the localhost default page. I have went into properties and assigned it, its Static IP address, still I can not view it LAN or Public. I was able to get prompt for the un/pw, nothing worked for that either. Now it gives me a error 400 Bad Request.
I am sure I have muckeled something up, but I am unsure as to what. Lol

The PHP version I am installing is 5.25
The mySQl version I am installing is 5.0.51
I am installing it on Server 2003.

Thanks
Lesh

0