Apache/2.0.54 PHP/5.0.5 -- Error when entering the admin area

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
frquadrat

Apache/2.0.54 PHP/5.0.5 -- Error when entering the admin area

Post by frquadrat »

Hi,

after upgrading my server to PHP 5.0.5, the site itself works correctly, but I'm not able to enter the admin area anymore.
CMS Version is 0.10.1

The following error message is shown in the browser as soon as I enter the admin-url into the browser:

          Fatal error: Only variables can be passed by reference in /var/www/cms/lib/classes/class.admintheme.inc.php on line 143

Any hints? Any information I could give you to get a better clue of what's going on?
User avatar
sjg
Power Poster
Power Poster
Posts: 310
Joined: Thu Jan 27, 2005 5:11 pm

Re: Apache/2.0.54 PHP/5.0.5 -- Error when entering the admin area

Post by sjg »

The short answer: it's fixed in svn :)

The long answer: restrictions on the way references are used were enforced in PHP 4.4 and PHP 5.0.5. I guess I didn't really understand references as well as I thought I did when I wrote some of that code.
The quick fix for that problem is to change line 143 from

Code: Select all

            $this->script = array_pop(explode('/',$this->url));
to

Code: Select all

            $this->script = array_pop(@explode('/',$this->url));
Unfortunately, other places have similar errors. If you're using News, you'll also have to get the new News module from svn. Be aware that svn is undergoing a lot of changes right now with Wishy's overhaul. Sorry to be the bearer of bad news :(

___Samuel___
Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
wolke

Re: Apache/2.0.54 PHP/5.0.5 -- Error when entering the admin area

Post by wolke »

It runs !!!!!
Many Thanks !!!!!

Best Regards - Wolke.
Locked

Return to “CMSMS Core”