Help with some php code
Speedie
Registered Users Posts: 173 Major grins
Another forum member Nimai very kindly shared some code here which picks a random image based on keyword. I was using it for a while and it worked fine until a few weeks ago when it started generating the following error:
Warning: fread() [function.fread]: Length parameter must be greater than 0. in
/home/mgpages/public_html/misc/smugmug-random-image.php on line 20
Warning: Cannot modify header information - headers already sent by (output
started at /home/mgpages/public_html/misc/smugmug-random-image.php:20) in
/home/mgpages/public_html/misc/smugmug-random-image.php on line 53
I'm not a php programmer and have no idea what would cause this. The odd thing is it still works fine for Nimai who's using it. Nimai hasn't yet had time to look in to this so I wondered if anyone else might have an idea? Many thanks.
Warning: fread() [function.fread]: Length parameter must be greater than 0. in
/home/mgpages/public_html/misc/smugmug-random-image.php on line 20
Warning: Cannot modify header information - headers already sent by (output
started at /home/mgpages/public_html/misc/smugmug-random-image.php:20) in
/home/mgpages/public_html/misc/smugmug-random-image.php on line 53
I'm not a php programmer and have no idea what would cause this. The odd thing is it still works fine for Nimai who's using it. Nimai hasn't yet had time to look in to this so I wondered if anyone else might have an idea? Many thanks.
0
Comments
I would change line 17 from: to: and see what happens...
If that solves it, it'll likely solve your second error too, since the second error is only complaining because of the first error's output.
I meant to reply yesterday but I didn't get a chance, the issue will be that the security changes have seen the addition of an ImageKey, Nimai will need to modify his script to work properly.
CHeers,
David
SmugMug API Developer
My Photos
it will still work for oldimages prior to the security changes.
SmugMug API Developer
My Photos