Jump to content

after php upgrade to 5.4.12 some errors


Recommended Posts

Hi "PHPFreaks"

 

First I have to say, that I am not a php or any other language programmer..

I'd like to ask someone who as a "plan" about php codeing. But here is my question:

 

After I setup a new Webserver, I moved my website on it. Everything works fine, just with one exception -  I can't login on my Gallery Backend/Frontend.

 

Here what I did:

old system
Server OS: FreeBSD 7.1-RELEASE FreeBSD 7.1
Apache Version: Apache/2.2.11
PHP Versoion: PHP 5.29
Expose: 4.6.3 alpha3c
SEF: on or off it is working anyway
Joomla Version: 1.5.26

NEW SYSTEM
Server OS: FreeBSD 9.1-RELEASE FreeBSD 9.1
Apache Version: Apache/2.2.23 (FreeBSD) PHP/5.4.12 mod_ssl/2.2.23 OpenSSL/0.9.8x DAV/2
PHP Versoion: PHP 5.4.12
Expose: 4.6.3 alpha3c
SEF: off, when it's on I also have some troubles with expose gallery, but this later...
Joomla Version: 1.5.26

I guess it has to do with this error

[Mon Mar 04 15:51:30 2013] [error] [client 10.114.52.60] PHP Fatal error:  

Uncaught exception 'VerboseException' with message 'Non-static method CharsetHandler::setMethod() should not be called statically,

 assuming $this from incompatible context' in /usr/local/www/www.myweb.com/components/com_expose/expose/manager/amfphp/amf-core/app/Gateway.php:127\nStack trace:\n#0

 /usr/local/www/www.myweb.com/components/com_expose/expose/manager/amfphp/amf-core/app/Gateway.php(127): amfErrorHandler(2048, 'Non-static meth...', '/usr/local/www/...', 127, Array)\n#1

 /usr/local/www/www.myweb.com/components/com_expose/expose/manager/amfphp/gateway.php(176): Gateway->service()\n#2 {main}\n  

 thrown in /usr/local/www/www.myweb.com/components/com_expose/expose/manager/amfphp/amf-core/app/Gateway.php on line 127,

 referer: http://www.myweb.com/components/com_expose/expose/manager/manager.swf


Attached the Gateway.php File and here you can download the whole gallery in a small zip (may you need more source files?...) here - Download
 
I have both system online (just work with hosts file on my windows system to switch over)

hope you guys have a better plan then I :geek:



cheers BjoernG

Gateway.php

Link to comment
Share on other sites

It seems you're using a static method when it's not defined as static.

 

So instead of having:

 

public static function functionName()

You have

 

function functionName()

 

If you are calling a method statically you'll need to call it as such:

method::call()

 

If you are using $this context, the function cannot be static.

If you are using a script made by a company or whatever, you may want to check for an update or double checking to make sure the program is compatible with PHP 5.4

Link to comment
Share on other sites

Thanx for this fast answer Matthew

 

You are right with

If you are using a script made by a company or whatever, you may want to check for an update or double checking to make sure the program is compatible with PHP 5.4

 

but as I read, this project is closed... I thougth it's  good Idea to update Server OS etc. but what do you think, may you can edit just this file that this one match PHP5.4?

Otherwise I am going back to my old system (running PHP 5.2.9 ...

 

Thanks anyway for your reply

 

Bjoern

Link to comment
Share on other sites

You can absolutely manually fix the code yourself.

 

However, the application looks a bit large and it may take a while to accomplish and just by making the function static may not fix your issue 100%.

 

Also, it won't just be your gateway.php file. If the application developers coding style is consistent than I believe none of the static functions are defined as static which means you'll have to manually find each static function and define it as so.

 

Since this is not your own project, it is just an application you use, I would just downgrade PHP back to 5.2.

Link to comment
Share on other sites

Even better: Find a newer project which is up-to-date, and switch to it instead.

Downgrading your PHP version just to use outdated and dead code is not a good idea, as there are bound to be lots of security issues left open because of it. Same as not upgrading from Windows 2000, just to be able to run a specific version of a word processor, is a really bad idea.

 

There are plenty of gallery scripts out there, so I'm certain that at least one of them will suit your purposes.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.