john2583

Joined: 2003-07-04
Posts: 6
Posted: Fri, 2003-07-04 02:34

I have a similar error when clicking thumbnails. I get this error:

Fatal error: Call to undefined function: array_search() in /var/www/html/gallery/view_photo.php on line 537

Also if there were comments for the image, those are not shown. I have tried removing the entire gallery directory and then reinstalling. I'm not sure what's causing this, but it only started when I upgraded from v1.3.3 to 1.3.4. I have PHP/4.0.4pl1 which seems to be the earliest version gallery will work with. Should I upgrade to a newer version of PHP? My gallery can be seen here: http://john.brier.name/gallery/

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Fri, 2003-07-04 02:47

Eek, that function is only available in PHP >= 4.0.5. I guess that is now the earliest version Gallery works with. In the mean time, I'll talk with some of the developers about it....

 
john2583

Joined: 2003-07-04
Posts: 6
Posted: Fri, 2003-07-04 04:30

I upgraded to PHP 4.3.2 and now it all works fine. Although when I first loaded up my gallery there was a php error on the main albums.php index, but when I reloaded it was gone? not sure what it was. Everything works now though so I'm happy. Thanks. Y'all might want to change the requirements for gallery.

 
john2583

Joined: 2003-07-04
Posts: 6
Posted: Fri, 2003-07-04 05:31

That php error came back. here it is: Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
so, it cuts off at the end. oh do I need to disable it by adding that line to my php.ini file?

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Fri, 2003-07-04 08:15
john2583 wrote:
That php error came back. here it is: Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. [...]
so, it cuts off at the end. oh do I need to disable it by adding that line to my php.ini file?

FAQ C.18

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Fri, 2003-07-04 08:33
john2583 wrote:
I have a similar error when clicking thumbnails. I get this error:

Fatal error: Call to undefined function: array_search() in /var/www/html/gallery/view_photo.php on line 537

Thanks for the heads up, John. This is now fixed in CVS, and I've made it FAQ C.20.

 
john2583

Joined: 2003-07-04
Posts: 6
Posted: Fri, 2003-07-04 16:25
joan wrote:
john2583 wrote:
I have a similar error when clicking thumbnails. I get this error:

Fatal error: Call to undefined function: array_search() in /var/www/html/gallery/view_photo.php on line 537

Thanks for the heads up, John. This is now fixed in CVS, and I've made it FAQ C.20.

wow. Thats a fast response time. This is why I love opensource software. You get to talk directly with the developers. Keep up the good work.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Fri, 2003-07-04 21:57
john2583 wrote:
wow. Thats a fast response time. This is why I love opensource software. You get to talk directly with the developers. Keep up the good work.

Development by embarrrassment. Should have read the array_search web page before checking in.

Just trying to cover my tracks 8)

 
john2583

Joined: 2003-07-04
Posts: 6
Posted: Mon, 2003-07-07 04:01

I thought I had it fixed, but the same error is still showing up on the bottom part of my gallery. I added this line to my php.ini file:session.bug_compat_warn = off I restarted apache too. BTW, when I start apache, in the error_log I see this:[Sun Jul 6 04:02:04 2003] [notice] Apache/1.3.19 (Unix) (Red-Hat/Linux) DAV/1.0.2 PHP/4.3.2 mod_perl/1.24_01 configured -- resuming normal operations Notice the line that says PHP/4.3.2 it doesn't say module. From talking to someone about PHP I was under the impression that restarting Apache would only re-read the php.ini file IF PHP was running as a module. That could be my problem, or I am totally confused. Also, the error message only comes up some of the time. Maybe I am running it as a module? How do you know?

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Mon, 2003-07-07 12:56

If you have PHP/4.3.2 in your ServerSignature, PHP is running as a module. As a CGI, it wouldn't show up at all in there.

Try setting session.bug_compat_warn to 0, instead of off

Also, you may want to view the setup/phpinfo.php page after restarting to make sure PHP is obeying the new setting (i.e. you are editing the correct php.ini)

 
john2583

Joined: 2003-07-04
Posts: 6
Posted: Wed, 2003-07-09 00:44

While taking a look at the phpinfo.php file i realized it was set to check a diff. directory for the config file. I moved my php.ini file into the right directory and it seems to have fixed the problem. Thanks for the help. Gallery continues to rock.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Wed, 2003-07-09 00:52

Heh, no problem :)