HTTP 500 Internal Server Error - Installation

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
ITGuy
Posts: 2
Joined: Thu Jun 04, 2009 1:46 pm

HTTP 500 Internal Server Error - Installation

Post by ITGuy »

I get all the way to step three and I enter all my database information and then I click next and get the "page cannot be displayed" error.

I am missing a step somewhere, maybe in the database setup? Maybe I screwed up the PHP setup? I've already changed all the permissions on the folders and everything.

Any help is appreciated!
Maz
Posts: 12
Joined: Fri Jun 05, 2009 1:11 pm

Post by Maz »

Also got the same problem, I'm running on;

MySql 5.1
PHP5
IIS7
ITGuy
Posts: 2
Joined: Thu Jun 04, 2009 1:46 pm

Post by ITGuy »

[quote="Maz"]Also got the same problem, I'm running on;

MySql 5.1
PHP5
IIS7[/quote]

I'm not alone in the world! My specs are the exact same btw.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You both do have MySQL enabled in PHP, right (it's not with the default PHP 5.x installation)?

Try creating a new file in Notepad, name it "dbtest.php", and paste this inside:

Code: Select all

<?php

$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
    die('Not connected : ' . mysql_error());
}

$db_selected = mysql_select_db('foo', $link);
if (!$db_selected) {
    die ('Can\'t use foo : ' . mysql_error());
}

echo "All working!";
?>
Replace mysql_user with your mysql username, mysql_password with your password and my_dbname with your database name.

Upload to your server, open in browser and see what messages/errors you get.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Maz
Posts: 12
Joined: Fri Jun 05, 2009 1:11 pm

Post by Maz »

Thanks for the reply.

Will try it on Monday when I'm back in work and let you know how it goes.
Maz
Posts: 12
Joined: Fri Jun 05, 2009 1:11 pm

Post by Maz »

Fatal error: Call to undefined function mysql_connect() in C:\inetpub\wwwroot\MySQL.php on line 3


Looks like MySQL needs enabling in php.ini.

You got an example php.ini that I could use?

Might be worth mentioning it in an FAQ aswell.
Maz
Posts: 12
Joined: Fri Jun 05, 2009 1:11 pm

Post by Maz »

Sorry for the Triple Post;

Search your server for libmysql.dll. Delete any instance of libmysql.dll that is not in the C:\PHP directory. This limits the possibility of older MySQL client API's being used with PHP.


Search your server for php_mysql.dll. Delete any instance of php_mysql.dll that is not in the C:\PHP directory. This limits the possibility of older MySQL client API's being used with PHP.


Open your C:\%WIN%\php.ini file in a text editor (Notepad will work).


Search for the line that looks like...

;extension=php_mysql.dll

Change this line to...

extension=php_mysql.dll


Save the modified php.ini file.


Copy C:\PHP\libmysql.dll and C:\PHP\ext\php_mysql.dll to the C:\%WIN%\system32 folder.


Restart IIS and test it out.

Try that, got mine working.
Post Reply