Originally posted by TheDefender
Like the error says, the result being supplied to the mysql_fetch_array is invalid... So, given that your results is $q - mysql_fetch_array($q)), then we'd need to see the applicable code where the $q result is defined... Also, where the DB connection is being established. Also, have you sought assistance from the script's author on this problem yet? If so, what did he say. If not, why not?
I have contacted the script's author but I don't believe he is available for support. Also, the script works fine until I add the phpbb header info.
As for suggestions, like I said I'm a total noob, so I'm not sure where to begin looking. Any suggestions?
A search of main.php yielding this:
$q = mysql_query("INSERT INTO {$this->prefix}comic (id,user_id,storyline,
comic_title,image_type,date,date_added,news_title,news_post,characters,
keywords,live,nl2br) VALUES
($comicID,'$userID',$storyline,'$comicTitle','$fileExt','$date',$time,
'$newsTitle','$post','$characters','$keywords','$live','$nl2br')");
and this:
$q = mysql_query("UPDATE {$this->prefix}comic SET storyline='$storyline',
comic_title='$comicTitle',date='$date',news_title='$newsTitle',
news_post='$post',characters='$characters',keywords='$keywords',nl2br='$nl2br',
live='$live' WHERE id=$comicID");
and this:
$q = mysql_query("DELETE FROM {$this->prefix}comic WHERE id=$comicID");
if ($q == FALSE)
return $this->error($this->lang['Delete_Failed']." - ".mysql_error());
else {
$fileDelete = unlink($file);
if ($fileDelete == FALSE)
print "<br/>".$this->error("($file)".$this->lang['Delete_File_Failed'])."<p/>";
return $this->confirmation($this->lang['Delete_Succeeded']);
and:
$q = '';
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$caching' WHERE name='caching'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$comicDir'
WHERE name='comic_dir'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$waitingDir'
WHERE name='waiting_dir'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$installDir'
WHERE name='install_dir'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$language'
WHERE name='language'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$archiveURL'
WHERE name='archive_url'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$arcComicURL'
WHERE name='archive_comic_url'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$skin' WHERE name='skin'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$updatePass'
WHERE name='update_pass'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$BfirstA'
WHERE name='but_first_active'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$BfirstD'
WHERE name='but_first_disabled'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$BprevA'
WHERE name='but_prev_active'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$BprevD'
WHERE name='but_prev_disabled'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$Barchive'
WHERE name='but_archive'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$BnextA'
WHERE name='but_next_active'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$BnextD'
WHERE name='but_next_disabled'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$BlatestA'
WHERE name='but_latest_active'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$BlatestD'
WHERE name='but_latest_disabled'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$comicDirURL'
WHERE name='comic_dir_url'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$comicNameType'
WHERE name='comic_name_type'");
$q .= mysql_query("UPDATE {$this->prefix}config SET value='$dateFormat'
WHERE name='date_format'");
if ($q != '111111111111111111111')
return $this->error($this->lang['Update_Failed']." - ".mysql_error());
else {
$this->getConfig();
return $this->confirmation($this->lang['Update_Succeeded']);
}
}
Basically it apears to be used throughout the main.php file. I'm not sure what I'm looking for specifically.
What code do I need to look for to find where the database connection is established.
Thanks in advance,
Sammy