Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 09:30 am EST

Geeklog Forums

Fatal Error passing variables in php5


Status: offline

Mu Satach

Forum User
Junior
Registered: 01/30/03
Posts: 16
My webhost recently upgraded to php5,

I added a php.ini file w/
Text Formatted Code

register_long_arrays = On
register_globals = On


 


and that took care of everything except when I click on the "Read More" link or anything with specifically the "story" variable (http:/website/article.php?story=00000000000000)
I get the following

Text Formatted Code
Fatal error: Only variables can be passed by reference in /blah-blah-blahl/public_html/lib-common.php on line 2617

 


Any ideas on what to do?

Am running 1.3.11sr1

Ni!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
This is line 2617 (in function COM_commentBar):
Text Formatted Code
$page = array_pop( explode( '/', $HTTP_SERVER_VARS['PHP_SELF'] ));
 
It has to be separated into 2 lines now, like this:
Text Formatted Code
$parts = explode( '/', $HTTP_SERVER_VARS['PHP_SELF'] );
$page = array_pop( $parts );
 

bye, Dirk
 Quote

Status: offline

Mu Satach

Forum User
Junior
Registered: 01/30/03
Posts: 16
cheerful
Thanks Dirk! Smile
Ni!
 Quote

wikki

Anonymous
thanks. that fixes the first problem. but right after submitting a comment, the following error occurs (appears as popup):
Text Formatted Code
Warning: array_pop() [function.array-pop]: The argument should be an array in /blabla/html/lib-common.php on line 2618
 
 Quote

wikki

Anonymous
sorry, my mistake. forgot to rename the first variable to $parts.
 Quote

All times are EST. The time is now 09:30 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