Welcome to Geeklog Tuesday, August 04 2020 @ 02:01 am EDT

Geeklog Forums

Fatal Error passing variables in php5


Status: offline

Mu Satach

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

I added a php.ini file w/
PHP 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

PHP 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: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
This is line 2617 (in function COM_commentBar):
PHP Formatted Code
$page = array_pop( explode( '/', $HTTP_SERVER_VARS['PHP_SELF'] ));
 
It has to be separated into 2 lines now, like this:
PHP Formatted Code
$parts = explode( '/', $HTTP_SERVER_VARS['PHP_SELF'] );
$page = array_pop( $parts );
 

bye, Dirk
 Quote

Status: offline

Mu Satach

Forum User
Junior
Registered: 30/01/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):
PHP 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 EDT. The time is now 02:01 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