forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 install => Topic started by: jmdoggett on April 13, 2013, 07:54:41 pm
-
I've searched for the solution to this problem, thus my post. During installation I reach step 8, many of the tables are created in the database and then the installation script crashes.
The error log showed this:
13-Apr-2013 16:04:36 UTC] PHP Notice: Undefined index: mysql_connected in D:\inetpub\wwwroot\coppermine\install.php on line 1592
[13-Apr-2013 16:04:36 UTC] PHP Notice: Undefined index: temp_data in D:\inetpub\wwwroot\coppermine\install.php on line 1779
[13-Apr-2013 16:05:06 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in D:\inetpub\wwwroot\coppermine\install.php on line 1787
So I fixed the timeout in php.ini and that went message away. Any help would be appreciated.
-
Problem solved. I had to fix the function by creating a $temp_data variable at the top of the function, replace all the references to $GLOBALS['temp_data'] inside the for loop where the web page output is assembled and finally just above the return statement I added $GLOBALS['temp_data'] .= $temp_data;
Here is the relevant section:
$temp_data .= '<tr><td>';
foreach($sql_query as $q)
{
$is_table = false;
//check if we are creating a table so we can add it to the output
if (preg_match('/(CREATE TABLE IF NOT EXISTS `?|CREATE TABLE `?)([\w]*)`?/i', $q, $table_match))
{
$table = $table_match[2];
$is_table = true;
}
if (! mysql_query($q, $GLOBALS['mysql_connection']))
{
$GLOBALS['error'] = $language['mysql_error'] . mysql_error($GLOBALS['mysql_connection'])
. ' ' . $language['on_q'] . " '$q'";
if ($is_table)
{
$temp_data .= "<br />" . sprintf($language['create_table'], $table)
. ' ' . $language['status'] . ':... ' . $language['nok'];
}
return false;
}
else
{
if ($is_table)
{
$temp_data .= "<br />" . sprintf($language['create_table'], $table)
. ' ' . $language['status'] . ':... ' . $language['ok'];
}
}
}
$GLOBALS['temp_data'] = $temp_data;
Cheers!
Jay