MySQL Forums
Forum List  »  Newbie

Error in Step 5 of Installation
Posted by: Tom Martin
Date: January 20, 2008 12:59PM

I'm trying to add an application(Image Gallery) to my Web that requires a php install Program to run,check and populate a Database. It goes through a test prior to install and Says everything is A OK, and creates the Tables in the Database. After that it populates 1 table (role) just fine but when it trys to populate the second table (.SQL_ABM_TBL.) it fails(with No explaination).

The .SQL_ABM_TBL. is defined in a config.php file as the following shows:

define('SQL_SERVER', "localhost");
define('SQL_ABM_TBL', "albums");
define('SQL_IMG_TBL', "images");


I'm using MySQl 5.0.45 and php 5.x. I used the MySQL admin tools and had it check the tables and it says everything is fine. The code I'm including is from the Install.php file, where it fails is inserting data into SQL_ABM_TBL, Can someone pls have a look at this and see if they can tell me whats wrong here.

if ($page == 4) {

	show_header();
	show_menu(4);
	echo "<div class=\"step\">Starting insertion of data into database tables....</div><br /><br />\n";

	/* ------------------------ INSERT DATA ----------------------- */

	echo "<div class=\"step\">Inserting data into 'role' table ....</div>\n";
	$conn->query("DELETE FROM role");
	$conn->query("INSERT INTO role VALUES
				  ('1',1,'Guest'),
				  ('2',2,'Restricted User'),
				  ('3',4,'Full User'),
				  ('4',127,'Site Administrator')", 'none');
	if(!$conn->result) {
		echo "\t<div class=\"outcome_fatal\">Cannot insert data into 'role' table - unable to continue. Please go back and try again.</div>\n\n";
		die();
	}
	echo "\t<div class=\"outcome_good\">Data inserted into 'role' successfully - ok</div><br /><br />\n\n";

	echo "<div class=\"step\">Inserting data into '".SQL_ABM_TBL."' table ....</div>\n";
	$conn->query("DELETE FROM ".SQL_ABM_TBL);
	$conn->query("INSERT INTO ".SQL_ABM_TBL." VALUES
				  ('', 'upload_temp', 'Temporary album used by the system for image uploads. Images in this album are not visible to visitors.', '0', 'no')", 'none');
	if(!$conn->result) {
		echo "\t<div class=\"outcome_fatal\">Cannot insert data into ''".SQL_ABM_TBL."'' table - unable to continue. Please go back and try again.</div>\n\n";
		die();
	}
	echo "\t<div class=\"outcome_good\">Data inserted into ''".SQL_ABM_TBL."'' successfully - ok</div><br /><br />\n\n";

I'm lost and already spent 3 days on a stupid image gallery so any help here would be deeply appreciated.

Thank you,
Tom



Edited 1 time(s). Last edit at 01/20/2008 01:25PM by Tom Martin.

Options: ReplyQuote


Subject
Written By
Posted
Error in Step 5 of Installation
January 20, 2008 12:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.