[fixed] SSI.php error: Warning: mysql_fetch_array(): [fixed] SSI.php error: Warning: mysql_fetch_array():
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[fixed] SSI.php error: Warning: mysql_fetch_array():

Started by DefenceTalk.com, May 10, 2004, 03:45:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DefenceTalk.com

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.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

Joachim Müller

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

DefenceTalk.com

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.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

DefenceTalk.com

Problem fixed all by its self. Great.

Thanks!
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)