Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 02:43 am EST
Geeklog Forums
New - Gallery Random Photo Block
Page navigation
ken
Anonymous
Status: offline
squatty
Forum User
Full Member
Registered: 01/21/02
Posts: 269
Still getting the same warning message both on the browser and in the Apache error.log:
Warning: Invalid argument supplied for foreach() in /usr/products/apache/htdocs/public_html/block-random.php on line 98
I have my php.ini error reporting set to error_reporting = E_ALL
I also made the update to the block-random.php file:
//$choose = rand(1, $count);
$choose = rand(1, intval($count));
The block displays "No photo chosen." Any other ideas?
In a world without walls and fences, who needs Windows and Gates?
In a world without walls and fences, who needs Windows and Gates?
41
29
Quote
ken
Anonymous
Check the path to your albums... my guess is that the $count variable is null, so it can't do the foreach. That would also explain why your cache file is empty.
30
17
Quote
Status: offline
47ronin
Forum User
Newbie
Registered: 07/25/02
Posts: 6
I'm on Mac OS X Jaguar, using mySQL 3.23.51 and PHP 4.2.3 ... Geeklog version 1.3.5, Apache 1.3.26.. Everything worked fine with PHP 4.1.2, but with the upgrade to 4.2.3 the index.php page is broken with...
Warning: extract() expects first argument to be an array in /Volumes/Taki/Projects_Web/gallery/init.php on line 60
Warning: extract() expects first argument to be an array in /Volumes/Taki/Projects_Web/gallery/init.php on line 61
Warning: extract() expects first argument to be an array in /Volumes/Taki/Projects_Web/gallery/init.php on line 62
Warning: Invalid argument supplied for foreach() in /Volumes/Taki/Projects_Web/gallery/init.php on line 64
Warning: rand() expects parameter 2 to be long, string given in /Volumes/Taki/Projects_Web/geeklog/public_html/block-random.php on line 70
ERROR: requested index [] out of bounds [12]
Fatal error: Call to a member function on a non-object in /Volumes/Taki/Projects_Web/gallery/classes/Album.php on line 570
I'm not sure how to fix this for now except to manually disable the block. Any ideas? Fix for new PHP?
30
24
Quote
Page navigation
All times are EST. The time is now 02:43 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content