coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: DefenceTalk.com on May 10, 2004, 03:45:52 AM

Title: [fixed] SSI.php error: Warning: mysql_fetch_array():
Post by: DefenceTalk.com on May 10, 2004, 03:45:52 AM
Hi,

I am using SSI.PHP script by gaugau on our home page: http://www.defencetalk.com < you can see the error too.

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/defence/public_html/pictures/ssi.php on line 115

I don't know what happened. I did not change any files, etc. IT was working just fine. :(

Please help, thanks.
Title: Re: SSI.php error: Warning: mysql_fetch_array():
Post by: Joachim Müller on May 10, 2004, 10:12:27 AM
check your settings: download ssi.php from your webspace and look into the code, maybe the file has become corrupted. Make sure your webhost hasn't changed settings. This is not a specific error in the code, it's a general error if the mySQL connection fails.

GauGau
Title: Re: SSI.php error: Warning: mysql_fetch_array():
Post by: DefenceTalk.com on May 10, 2004, 11:11:08 PM
Thanks Gaugau.

I contacted my host and its not them.

The single random pic option seems to be the only one giving the problem:

<? print cpg_random(); ?>

LINE 115 on SSI.php is this and hasn't be changed:

if ($cpg_thumbcols > $cpg_how_many) {$cpg_thumbcols=$cpg_how_many;}

while ($row = mysql_fetch_array($result)) {


While other options that are available in the SSI.php work just fine:

such as table containing thumbnails of most recent pictures

<?
$cpg_include_link=1; // thumbnails are links? 0=no, 1=yes
$cpg_link_singlepic=0; // link points to album or single pic? 0=album, 1=single pic
$cpg_how_many=8; // how many thumbs do you need?
$cgp_limit_album=""; // specify certain album, ""=all
$cpg_random=0; //get random pic 0=no, 1=yes
print cpg_thumb($cpg_include_link,$cpg_link_singlepic,$cpg_how_many,$cgp_limit_album,$cpg_random);
?>


or single most recent pic:

<? print cpg_single(); ?>

random from specific albums:

<? print cpg_thumb(1,0,4,12,0); ?>

Although, if i can display some these in herozontal alignment and without table that would fix the issue and would not have to use the single random pic option 4 times to output 4 pics in herzontal alignment. I tried changing the align option in the ssi.php but that doesnt do anything either.

how can i do that if this  line 115 problem doesnt make any sense?

Thanks for the help.
Title: Re: SSI.php error: Warning: mysql_fetch_array():
Post by: DefenceTalk.com on May 11, 2004, 05:08:40 PM
Problem fixed all by its self. Great.

Thanks!