I am missing something, and I've spent two days trying to find what it is through every google search I could conjure. I apologize if you think this would be better on a different forum, but here goes:
I am moving my company intranet to a new server, and within the intranet is a PHP bulletin board (phpBB3), which has worked great on the old server for 2 years. I have changed none of the code which still works on the old server. The Intranet is at "http://intranet/" and the bulletin board is at "http://intranet/phpbb3/". The bulletin board is working fine on both old and new server, except for ONE thing. On my homepage, "http://intranet/index.html", I pass control to a PHP program which should return the top 10 recent posts to the forum:
<?php
include($_SERVER['DOCUMENT_ROOT']. '/phpbb3/recentposts.php');
?>
The PHP is being called fine, but I receive an error when recentposts.php gets to this line:
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd");
The error is
Fatal error: Call to undefined function mysql_connect() in C:\Intranet\phpBB3\recentposts.php on line 17 Now, if I go directly to the page "http://intranet/phpbb3/recentposts.php", it retrieves my top 10 recent posts just fine. So it's somehow dying in the process of the connection to mysql from php from within html. I confess I am stumped.
I've checked every .ini file, the IIS setings, fastCGI...I am at a loss even where to look any more. Obviously I missed a setting somewhere, even though I can compare everything side by side to the old server. Anybody have any ideas what I might be missing?
By the way, I originally tried the newest versions of PHP and mysql, but gave up and am now trying a completely identical (and old) setup:
MS Server 2003 IIS6, PHP 5.2.9-2, fastCGI, mysql 5.0.51a
- Thank you