TUTORIAL: How to install PHP and MySQL on IIS

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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 (preferably IIS 5 or IIS 6)
The PHP windows installer file
The PHP binaries file
The MySQL Windows installation file
(links will be provided for the downloads shortly).

Optional:
phpMyAdmin
MySQL Administrator

Let’s get started. Since you are installing on a Windows computer, you will most likely be using IIS for a web server, however, it is not required. You must have some web server 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.

Some things to know about IIS. IIS v5.1 is included with Windows 2000 Professional, and Windows XP Professional, but is not installed by default. (*note – IIS 5.1 is not included with XP Home edition and is not available as a stand alone download from Microsoft. If you are an XP Home user, you will need to look for an alternative web server solution.) Windows 2000 server includes IIS 5.1, and Windows 2003 server includes IIS 6.

If you haven’t already done so begin by installing IIS. To do this go to Control Panel | Add/Remove Programs | Add/Remove Windows Components. In the dialogue box that comes up, check the option for Internet Information Services(IIS) and click the “Details” button. Select any additional features that would like to have installed and click OK. Click OK again to begin the installation. This will install IIS and start the web server 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.

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 . The most current release available for download at the time of this writing is 5.1.1. This release has worked just fine for me, so it’s the one I use. You will want to download both the PHP 5.1.1 zip package AND the PHP 5.1.1 installer. Unzip both files to a temporary location and run the setup installer. This will install PHP automatically. The default installation directory is C:\PHP and I would suggest to leave it at that, unless there is a specific reason you need to install it elsewhere. *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. Answer the questions as they are presented by the wizard. I recommend choosing the option to add PHP to the Windows PATH environment variable when that option is presented. If not you can manually add it later, but you really should include it. For a good article on Windows environment variables go here . When the installer completes you will have a basic installation of PHP. This works just fine, but it is recommended to add the additional libraries found in the PHP 5.1.1 zip package. Simply copy those files into the C:\PHP directory. The following files in this package are already installed with your PHP and there is no need to copy them install.txt, license.txt, php.exe and php4ts.dll.

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)
Code: [ Select ]
<?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.

Now we can proceed to installing MySQL. Go to the MySQL download page here. . As of this writing the most current release is v5.0.16. Download the Windows(x86) file (the 33.6MB file). 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 | MySQL | MySQL Server 5 | MySQL Command Line Client. This is a utility similar to DOS for managing MySQL. At the password prompt type in the password you entered and hit enter. If your server is working properly you should get something that looks like this:
Quote:
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.

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 Administrator which can be downloaded from HERE . 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.

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:
Code: [ Select ]
$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)
  1. $cfg['Servers'][$i]['auth_type']     = 'config'; // Authentication method (config, http or cookie based)?
  2. $cfg['Servers'][$i]['user']         = 'root';     // MySQL user
  3. $cfg['Servers'][$i]['password']     = 'yourpassword';         // MySQL password (only needed
  4.                                                     // 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 on Win2K, XP and Windows 2003 Server machines, 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:
programming-forum/setting-phpbb-board-using-apache-server-resolved-t55568.html

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 turorial 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 install!
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5735
  • Loc: Sub-level 28

Post 3+ Months Ago

Good info for getting a lil personal web server up for local testing, or development! :)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1259
  • Loc: ./

Post 3+ Months Ago

You should sticky this before it gets lost in the other threads
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Good suggestion. I went ahead and did just that.
  • Vincent
  • Expert
  • Expert
  • User avatar
  • Posts: 721
  • Loc: Brisbane, Australia

Post 3+ Months Ago

Have you though of upgrading this sometime to have different tutorials of different programs, eg. apache?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1259
  • Loc: ./

Post 3+ Months Ago

Vincent wrote:
Have you though of upgrading this sometime to have different tutorials of different programs, eg. apache?

I've been handing this link around which deals with Apache, Perl, PHP, MySQL, and PostgreSQL on a Windows system:
hxxp://www.semitekie.com/viewtopic.php?t=8

*edit*
I've since removed phpBB from this site, so this is gone now. Sorry
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

Hello:

I followed theinstructions 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 <a href="http://php.net/mysql" target="Documentation">mysql</a> extension. Please check your PHP configuration. - <a href="./Documentation.html#faqmysql" target="documentation">Documentation</a>

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

Can you please help me out?
Thank you in advance.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Check the accepted answer here (scroll down to see replies)
http://www.experts-exchange.com/Databas ... 23797.html

Although that problem is with Linux, the solution is most likely the same on Windows.
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

Hi,

Thank you for the reply. I clicked on the link you gave me and scrolled down the screen and there weren't any replies. All I get is a button to View Solution and in order to view the solution I have to subscribe.

Is there any other way I can check out the solution?

Thanks.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Strange. It was there when I just opened it in one window and now it's not. Anyway, the accepted answer was

Quote:
After installing PHP on Redhat, add the package it is asking for (PHP-MySQL), then edit the php.ini file (you will find it in /etc/php.ini). Scroll down to the "Dynamic Extensions" section and remove the semicolon beside the line: extension=mysql.so

After that restart the httpd service (service httpd restart) then try to install PHPMyAdmin again. This should make the installation complete without problems.



Also from the documentation this is what it says about that error


Quote:
"To connect to a MYSQL server PHP needs a set of Mysql fucntions called the "Mysql extension".This extension may be a part of the PHP distribution otherwise it needs to be laoded dynamically .Its name is probably mysql.so or php_mysql.dll .PhpMyadmin tried to load the extension but failed.

Usually the problem is solved by installing a sofware package called "PHP-MYSQL'" or something sililar
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

Hello:

Thank you for the reply. I thought it was strange as well.

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 (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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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 *lol Glad you got it.
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

Hi,

The solution actually came for 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.
  • nooniensingh
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5

Post 3+ Months Ago

I am getting this error after applying your instruction:
Image

------------------------------EDIT---------------------------------------------------------
Ok I changed everything back to the orignal state and I get no errors however
a window pops up asking me where do I want to save index.php. I s supposed to happen?
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

Hi,

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 (remove the semi colon for this statement)
  • nooniensingh
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5

Post 3+ Months Ago

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

Image

How do I correct this I replaced the $cfg['Servers'][$i]['auth_type'] = 'config'; with http and vice versa, still the same warning :?
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

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: http://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.
  • nooniensingh
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5

Post 3+ Months Ago

Does the php-5.1.2-Win32 get extracted into the PHP folder?
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

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.
  • nooniensingh
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5

Post 3+ Months Ago

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...
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

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 (no semi colon)
  • nooniensingh
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5

Post 3+ Months Ago

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
  • fullfocus
  • Newbie
  • Newbie
  • fullfocus
  • Posts: 9

Post 3+ Months Ago

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.

Here's a link that you might find useful for the install:
http://www.davidcatalano.com/articles/tech/mt-php-mysql/php_installation.php
It has the install procedures for PHP, MySQL, and phpMyAdmin. This is truly a step-by-step process. The process is similar as the one at the beginning of this post.

Sometimes starting over, now knowing for what to look, may go smoother.
  • compaqras
  • Newbie
  • Newbie
  • compaqras
  • Posts: 8

Post 3+ Months Ago

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]
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • compaqras
  • Newbie
  • Newbie
  • compaqras
  • Posts: 8

Post 3+ Months Ago

ok after i download the config file then where i need to save it, will this be last step.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • compaqras
  • Newbie
  • Newbie
  • compaqras
  • Posts: 8

Post 3+ Months Ago

i have created a web forum, when i send comments to my email i recieved a error, i have attached the error picture.... if i am not worng i need to configure my smtp. but i did. still same prob. i am useing the smtp service provided by windows xp pro.. but if u know any good one plese let me know. http://www.3dbuzz.com/vbforum/attachmen ... ntid=48701
  • malakite
  • Born
  • Born
  • malakite
  • Posts: 3

Post 3+ Months Ago

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
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • malakite
  • Born
  • Born
  • malakite
  • Posts: 3

Post 3+ Months Ago

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
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

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.
  • malakite
  • Born
  • Born
  • malakite
  • Posts: 3

Post 3+ Months Ago

Thanks a lot everyone! i got it working by using DOS commandline, thanks again.
  • Jepps98
  • Graduate
  • Graduate
  • User avatar
  • Posts: 149
  • Loc: Umm, not exactly sure...

Post 3+ Months Ago

Umm, I need the username and password? What would it be?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

username is: root. Unless you set a password during install there is no default password. Just leave it blank.
  • Jepps98
  • Graduate
  • Graduate
  • User avatar
  • Posts: 149
  • Loc: Umm, not exactly sure...

Post 3+ Months Ago

Cant get it to work... And I didnt set a PW
  • Evenhost
  • Graduate
  • Graduate
  • User avatar
  • Posts: 184
  • Loc: Florida

Post 3+ Months Ago

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 :)
  • joeshmoe2469
  • Born
  • Born
  • joeshmoe2469
  • Posts: 1
  • Loc: washington

Post 3+ Months Ago

can any one tell me about overclocking my com
  • suzannehami
  • Born
  • Born
  • suzannehami
  • Posts: 2

Post 3+ Months Ago

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
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Under Windows extensions in php.ini uncomment

extension=php_mysql.dll

Make sure php_mysql.dll exists in the extensions folder.
  • suzannehami
  • Born
  • Born
  • suzannehami
  • Posts: 2

Post 3+ Months Ago

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
  • imranahmed
  • Newbie
  • Newbie
  • imranahmed
  • Posts: 8
  • Loc: UK

Post 3+ Months Ago

Nice tutorial, realy helped me in configuration. I was stuck from many days to do setup. thanks again
  • zengqiang
  • Born
  • Born
  • zengqiang
  • Posts: 1

Post 3+ Months Ago

thank you for your tutorial.
  • compaqras
  • Newbie
  • Newbie
  • compaqras
  • Posts: 8

Post 3+ Months Ago

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.
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

brillaint ill try this later cheers
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

compaqras wrote:
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. Instructions are provided in this link
http://www.microsoft.com/technet/archiv ... x?mfr=true
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

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
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Reboot your computer or restart the MySql service.
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

Nice guide, everything else works but i get

phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

What version of MySql and PHP are you installing?
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

Iv uninstalled it all now am going to start from fresh. i dont really need that to work just trying to get java to work. i have 5 java files that were sent to me and i cant get them to work on tomcat. also when i go to http://x.x.x.x:8080 i get the router admin login when im on the local network so it is really annoying to rest. if ido 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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • Zackeriney
  • Graduate
  • Graduate
  • Zackeriney
  • Posts: 128

Post 3+ Months Ago

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
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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)

http://www.php.net/downloads.php
  • xxkmanxx
  • Born
  • Born
  • xxkmanxx
  • Posts: 1

Post 3+ Months Ago

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

thanks
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Not here at OZZU, no. And unfortunately I don't have IIS 7.0 or Vista yet to mess around with it.
  • brentv911
  • Born
  • Born
  • brentv911
  • Posts: 1
  • Loc: Clinton, IA

Post 3+ Months Ago

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?
  • iceberg11
  • Born
  • Born
  • iceberg11
  • Posts: 1

Post 3+ Months Ago

Zackeriney wrote:
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.
  • RickSavoy
  • Born
  • Born
  • RickSavoy
  • Posts: 3

Post 3+ Months Ago

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!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • RickSavoy
  • Born
  • Born
  • RickSavoy
  • Posts: 3

Post 3+ Months Ago

I followed the steps in http://dev.mysql.com/doc/refman/5.0/en/old-client.html and I am still getting the same results.
Btw 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”.
  • RickSavoy
  • Born
  • Born
  • RickSavoy
  • Posts: 3

Post 3+ Months Ago

I got it! I misspelled my password. Strange as it may sound, that seems to affect the attempted connection rather adversly I see.
  • esm
  • Newbie
  • Newbie
  • esm
  • Posts: 6

Post 3+ Months Ago

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.
  • bearhd
  • Born
  • Born
  • bearhd
  • Posts: 1

Post 3+ Months Ago

Some body please HELP!
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 cant get it to run smoothly.
I have actually gotten to the http://localhost/phpMyAdmin/index.php page on a couple of occassions and its worked 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 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 for 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
  • Jepps98
  • Graduate
  • Graduate
  • User avatar
  • Posts: 149
  • Loc: Umm, not exactly sure...

Post 3+ Months Ago

Okay, here is my question >.>

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

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

Anyways, here is a screenshot.

Image

Any help = me being greatful!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Your Windows Login username and Password will work. However, that's the damndest 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
  • Jepps98
  • Graduate
  • Graduate
  • User avatar
  • Posts: 149
  • Loc: Umm, not exactly sure...

Post 3+ Months Ago

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?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

have you tried your user name and leaving the password blank? Or just try Administrator and leave the pass blank.
  • raananschwartz
  • Born
  • Born
  • raananschwartz
  • Posts: 4

Post 3+ Months Ago

Any more tutorials? like asp,net and such..
  • Jepps98
  • Graduate
  • Graduate
  • User avatar
  • Posts: 149
  • Loc: Umm, not exactly sure...

Post 3+ Months Ago

ATNO/TW wrote:
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.
  • mmaderich
  • Born
  • Born
  • mmaderich
  • Posts: 4

Post 3+ Months Ago

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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • mmaderich
  • Born
  • Born
  • mmaderich
  • Posts: 4

Post 3+ Months Ago

ATNO/TW wrote:
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?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Have you seen this?
http://www.somacon.com/p126.php

It describes your error in IIS and provides resolutions.
  • mmaderich
  • Born
  • Born
  • mmaderich
  • Posts: 4

Post 3+ Months Ago

ATNO/TW wrote:
Have you seen this?
http://www.somacon.com/p126.php

It describes your error in IIS and provides resolutions.


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 setup 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 login, 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 Front Page setup in IIS, so I removed it, but it still happens.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
http://www.visualwin.com/PHP/
  • mmaderich
  • Born
  • Born
  • mmaderich
  • Posts: 4

Post 3+ Months Ago

ATNO/TW wrote:
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.
http://www.visualwin.com/PHP/


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.)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • magicmarc
  • Born
  • Born
  • magicmarc
  • Posts: 1

Post 3+ Months Ago

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
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • AR|Groundzero
  • Born
  • Born
  • AR|Groundzero
  • Posts: 1

Post 3+ Months Ago

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?
  • phplunatic
  • Born
  • Born
  • phplunatic
  • Posts: 1

Post 3+ Months Ago

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
  • chris2699
  • Born
  • Born
  • chris2699
  • Posts: 1

Post 3+ Months Ago

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
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • bettytech
  • Born
  • Born
  • bettytech
  • Posts: 4

Post 3+ Months Ago

//please do not repost copyrighted articles from blogs and other places. Link to them instead. Original blog post
http://www.bizpassion.com/?p=79
  • Shadxow
  • Born
  • Born
  • Shadxow
  • Posts: 2

Post 3+ Months Ago

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:

Image

Image

the error is in the second pic. 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 ive 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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

This was apparently a problem with 5.2.5 and was reported November 9th here:
http://aspn.activestate.com/ASPN/Mail/M ... ev/3579705


This issue was addressed and closed by jmertic. Check this post posted yesterday from jmertic
http://aspn.activestate.com/ASPN/Mail/M ... ev/3579990

Apparently it's now fixed in the CVS but might take a few days for the installer. I'd suggest give it a day or two and download 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.
  • Shadxow
  • Born
  • Born
  • Shadxow
  • Posts: 2

Post 3+ Months Ago

thxs for the quick responce. i dont mind waiting so ill just wait for the installer.
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Never done that but just a hunch, you probably need to include the port msySQL is using, example 192.168.1.141:3306
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Looks like this is how.
http://www.cyberciti.biz/tips/how-do-i- ... erver.html

Although the instructions assume a linux install, it looks like it should be relatively similar for Windows. I'll see if I can find a Windows version.


This guy got it to work in Windows:

http://forums.techguy.org/development/6 ... ccess.html
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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...
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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.
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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';
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

$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?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Also from http://php.ftp.cvut.cz/manual/en/ref.mysql.php Try this I found in one of the comments:

PHP Code: [ Select ]
<? 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();
 
?>
  1. <? php
  2.  
  3. Following PHP Script is useful to test PHP connection with MySQL.
  4.  
  5. */
  6.  
  7.  
  8.  
  9. //$connect = mysql_connect("Your Host Name", "MySQL root directory", 'MySQL password, if any');
  10.  
  11. //$connect = mysql_connect("Host Name or Address - 127.0.0.1", "root", 'password');
  12.  
  13. $connect = mysql_connect("localhost", "root", 'password');
  14.  
  15. if ($connect){
  16.  
  17. echo "Congratulations!\n<br>";
  18.  
  19. echo "Successfully connected to MySQL database server.\n<br>";
  20.  
  21. }else{
  22.  
  23. $error = mysql_error();
  24.  
  25. echo "Could not connect to the database. Error = $error.\n<br>";
  26.  
  27. exit();
  28.  
  29. }
  30.  
  31.  
  32.  
  33. // Closing connection
  34.  
  35. $close = mysql_close($connect);
  36.  
  37. if ($close){
  38.  
  39. echo "\n<br>";
  40.  
  41. echo "Now closing the connection...\n<br>";
  42.  
  43. echo "MySQL connection closed successfully as well.\n<br>";
  44.  
  45. }else{
  46.  
  47. echo "There's a problem in closing MySQL connection.\n<br>";
  48.  
  49. }
  50.  
  51. exit();
  52.  
  53. ?>
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

ATNO/TW wrote:
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
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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.
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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 :)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Interesting solution. Where is your php.ini located? I just assumed it was in C:\Windows. Regardless Glad you got it.
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • communications_warren
  • Born
  • Born
  • communications_warren
  • Posts: 1

Post 3+ Months Ago

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!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • x11
  • Born
  • Born
  • x11
  • Posts: 3

Post 3+ Months Ago

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 Code: [ Select ]
<?php phpinfo() ?>

and a test.php containing
PHP Code: [ Select ]
<?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();
 
}
 
 
 
?>
  1. <?php
  2.  
  3. // Connecting, selecting database
  4.  
  5. $link = mysql_connect('localhost', 'root', '<password redacted>')
  6.  
  7. or die('Could not connect: ' . mysql_error());
  8.  
  9. echo 'Connected successfully';
  10.  
  11. mysql_select_db('mysql') or die('Could not select database');
  12.  
  13.  
  14.  
  15. // Performing SQL query
  16.  
  17. $query = 'SELECT * FROM user';
  18.  
  19. $result = mysql_query($query) or die('Query failed: ' . mysql_error());
  20.  
  21.  
  22.  
  23. // Printing results in HTML
  24.  
  25. echo "<table>\n";
  26.  
  27. while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
  28.  
  29.    echo "\t<tr>\n";
  30.  
  31.    foreach ($line as $col_value) {
  32.  
  33.       echo "\t\t<td>$col_value</td>\n";
  34.  
  35.    }
  36.  
  37.    echo "\t</tr>\n";
  38.  
  39. }
  40.  
  41. echo "</table>\n";
  42.  
  43.  
  44.  
  45. // Free resultset
  46.  
  47. mysql_free_result($result);
  48.  
  49.  
  50.  
  51. // Closing connection
  52.  
  53. mysql_close($link);
  54.  
  55.  
  56.  
  57.  
  58.  
  59. if ( !is_dir( session_save_path() ) ) {
  60.  
  61.    echo "'session.save_path' directory not set! Please set your session.save_path in your php.ini file.";
  62.  
  63. } else {
  64.  
  65.    echo "'session.save_path' is set. ";
  66.  
  67.    echo session_save_path();
  68.  
  69. }
  70.  
  71.  
  72.  
  73. ?>


The results are a succesful phpinfo output containing the following (most likely relevant) entries:
Quote:
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)
Quote:
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

Quote:
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.
  • x11
  • Born
  • Born
  • x11
  • Posts: 3

Post 3+ Months Ago

LOL :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:

Quote:
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.)
  • x11
  • Born
  • Born
  • x11
  • Posts: 3

Post 3+ Months Ago

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. 8)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Thanks for updating. I just saw your PM. Sorry I couldn't get to it sooner. And thanks for the compliment on the tute.
  • rayeniguard
  • Newbie
  • Newbie
  • rayeniguard
  • Posts: 7

Post 3+ Months Ago

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.
  • rayeniguard
  • Newbie
  • Newbie
  • rayeniguard
  • Posts: 7

Post 3+ Months Ago

Update:

phpMyAdmin works fine. However, I cannot connect to mysql via php. I still get a blank page.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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?
  • rayeniguard
  • Newbie
  • Newbie
  • rayeniguard
  • Posts: 7

Post 3+ Months Ago

ATNO/TW wrote:
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);
?>
  • rayeniguard
  • Newbie
  • Newbie
  • rayeniguard
  • Posts: 7

Post 3+ Months Ago

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.
  • Crumpybumpy
  • Born
  • Born
  • Crumpybumpy
  • Posts: 1

Post 3+ Months Ago

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......
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

turn on php error reporting to see what the exact error is. Here's a couple ways to do it

http://www.blizzard-media.com/hosting/q ... /id/6.html
http://www.wallpaperama.com/forums/how- ... -t453.html

The easiest way is to just edit your php.ini file
display_errors = On
  • rayeniguard
  • Newbie
  • Newbie
  • rayeniguard
  • Posts: 7

Post 3+ Months Ago

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
  • rayeniguard
  • Newbie
  • Newbie
  • rayeniguard
  • Posts: 7

Post 3+ Months Ago

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...
  • rayeniguard
  • Newbie
  • Newbie
  • rayeniguard
  • Posts: 7

Post 3+ Months Ago

Finally, I found my error.

<?php is needed as opposed to <? when opening a php script.
  • Rich_Bailey77
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8

Post 3+ Months Ago

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

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

Now for my issue. I'm trying to setup 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 ok see: http://forum.questersguild.com/info.php). It seems that MySQL is installed correctly (I get the part where I enter 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 (http://forum.questersguild.com/install/ ... anguage=en). In MySQL Administrator it shows 3 databases: information_schema, mysql and test.

I've totally removed everything (PHP, MySQL, PHPBB) and reinstalled 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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • Rich_Bailey77
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8

Post 3+ Months Ago

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. :wink: 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:
ImageImage
  • Rich_Bailey77
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8

Post 3+ Months Ago

That is an advertising web search page. Why go there n_oandasan?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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

PHP Code: [ Select ]
<?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);
 
 
 
?>
  1. <?php
  2.  
  3.  
  4.  
  5.  
  6.  
  7. // phpBB 2.x auto-generated config file
  8.  
  9. // Do not change anything in this file!
  10.  
  11.  
  12.  
  13. $dbms = 'mysql';
  14.  
  15.  
  16.  
  17. $dbhost = 'localhost';
  18.  
  19. $dbname = 'php';
  20.  
  21. $dbuser = 'phpbb';
  22.  
  23. $dbpasswd = '******';  //password for phpbb user.
  24.  
  25.  
  26.  
  27. $table_prefix = 'phpbb_';
  28.  
  29.  
  30.  
  31. define('PHPBB_INSTALLED', true);
  32.  
  33.  
  34.  
  35. ?>


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.
  • Rich_Bailey77
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8

Post 3+ Months Ago

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 when I try http://forum.questersguild.com/index.php is:

Code: [ Select ]
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
  1. The website cannot display the page    HTTP 500 
  2. Most likely causes:
  3. The website is under maintenance.
  4. The website has a programming error.
  5. What you can try:
  6. Refresh the page.
  7. Go back to the previous page.
  8. 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: http://forum.questersguild.com/date.php

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

Code: [ Select ]
<!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>
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>Today's Date</title>
  6. <meta http-equiv="content-type"
  7.   content="text/html; charset=iso-8859-1" />
  8. </head>
  9. <body>
  10. <p>Today's Date at Quester's Guild is <?php
  11. echo date('l, F dS Y.');
  12. ?></p>
  13. <p> </p>
  14. <p> </p>
  15. <p> </p>
  16. <p> <h1>Check for our new forums coming soon.</h1> </p>
  17. </body>
  18. </html>
  • Rich_Bailey77
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8

Post 3+ Months Ago

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.)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • Rich_Bailey77
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8

Post 3+ Months Ago

Yes, I did and it works great. I don't see anything about MySQL in the info.php. If the info can help you take a look at http://forum.questersguild.com/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 a 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?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Rich_Bailey77 wrote:
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 a 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?


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.
  • Rich_Bailey77
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8

Post 3+ Months Ago

I'm not making much progress with MySQL. Would you have any advice for using MSSQL Server 2000+ via ODBC since that says available?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • Leshincorp
  • Born
  • Born
  • Leshincorp
  • Posts: 1

Post 3+ Months Ago

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
  • yomi
  • Graduate
  • Graduate
  • User avatar
  • Posts: 116
  • Loc: Nigeria

Post 3+ Months Ago

hi

have a new challenge today! mysql db is connecting fine but i have this error.

ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '' at line

i had to enter the cmd env to test my query cos my php pages were just working like links. i know my php is ok cos i call pages with functions. i can select from my db tables but cant update or insert.

what can i do?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

Yomi, please repost this in your other post and just use that one so we can keep everything in the same place.

programming-forum/mysql-connect-error-t86937.html

Just use that one to add updates to your problem.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23473
  • Loc: Woodbridge VA

Post 3+ Months Ago

I'm locking this thread as read only, primarily because the tutorial is a bit outdated. I'll be revising it soon and adding the updated version to the Tutorial section.

If you've followed the tutorial and still have problems that you need to ask about, please create a new Post in this Programming section and we'll help you there.

Post Information

  • Total Posts in this topic: 141 posts
  • Users browsing this forum: No registered users and 53 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2016. Ozzu® is a registered trademark of Unmelted, LLC.