MP4/Scripts/default.php apperars blank

For bug reports and fixes, installation issues, and new ideas for technical features.

Moderator: SEOW Developers

IV/JG7_4Shades
Posts: 2210
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Aaah. MySQL was once a default extension, but no longer, eh?

Good catch Zoltan. I can put a test in for that.

4Shades
IV/JG7_4Shades
SEOW Developer

Image
rnzoli
Posts: 25
Joined: Wed 13 Jun 2007 10:27 am

Post by rnzoli »

Yeah, quite "nasty" little change from PHP4 to 5. Had to troubleshoot from MP down to the level of adodb, why the mysql_connect function simply terminates PHP execution silently - no error, no log, no nothing! The worst of all fault types.

On the other hand, if you can reproduce the same, it is perfectly enough to place a warning on the Wiki besides PHP 5, that mySQL extension must be selected manually for the installation, and the activation should also take place manually. Very little effort needed to fix it, and it will be all fine for future installs:)
Fully automatic, dedicated COOP server controller.
Image
IV/JG7_4Shades
Posts: 2210
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Proposed change to Scripts/default.php:

Code: Select all

<?php

if ( !extension_loaded('mysql') ) {
	print "SEOW MP system error: MySQL is not loaded into your PHP environment!<br>Please enable the mysql extension in your php.ini file and restart your web server.";
	die;
}

// asp2php (vbscript) converted
include 'MP-Configuration.php';

switch (strtoupper($MPSkin)) {
	case "ROLLOVER":
		include 'default-rollover.php';
		break;
	case "CLASSIC":
		include 'default-classic.php';
		break;
	case "GREEN":
		include 'default-green.php';
		break;
	case "IRON":
		include 'default-iron.php';
		break;
	default:
		include 'default-green.php';
		break;
}
?>
The only real problem I can see with this is that it forces people to load the mysql extension even if they only want to use MSAccess...

Cheers,
4Shades
IV/JG7_4Shades
SEOW Developer

Image
Post Reply