Thursday, September 22, 2011

Problems with Expose Gallery (for Joomla) under PHP 5.3

Note: A fixed version of the module is available here.

The main issue is that the gallery do not shows. If you try to open the gallery in Internet Explorer, you will see a JavaScript error notification. It is caused by added "PHP deprecated" warning in a string value, which breaks some of the application's logic. This could be easily corrected manually. The file is:


[joomla_root]/components/com_expose/expose/admin/config.expose.php

Problematic line (line number 158 or something, depends on your Expose version):

$langcode = split('-',$conf->getValue('config.language'));

Corrected line:

$langcode = preg_split('/-/',$conf->getValue('config.language'));


The issue cause is that split function is rated as deprecated in PHP 5.3.0+. Its replacement is preg_split, with slightly different syntax.

The problem exists in version Expose_4.6.3_Alpha3c bridge, which is from year 2009, and in the actual version for the moment of writing the article, September 2011.

Another problem in this release (also in PHP 5.3.0+) is in "System check" function. It shows an issue with JPEG/JPG support. The cause is described in PHP manual:

Previous to PHP 5.3.0, the JPEG Support attribute was named JPG Support.

The problem is only in "System check", all other functionality seems to work fine, so the indicated fatal error message could be ignored. But if you want to be clear, you could correct it in file:

[joomla_root]/components/com_expose/expose/manager/check_system.php

Problematic line (line number 385 or something, depends on your Expose version):

"test" => ($array['JPG Support'] == true),

Corrected line:

"test" => ($array['JPEG Support'] == true),


The false fatal error is:

JPG support disabled Fatal warning
⇒ Must be activated in php.ini for manipulating JPG type images. You probably need to ask your host to activate it.

The PHP warning is:

Notice: Undefined index: JPG Support in [joomla-root]/components/com_expose/expose/manager/check_system.php on line 385


Note: A fixed version of the module is available here.

3 comments:

  1. Hey it took a while to find this site! Great, some errors now fixed - but may you have a solution for my problem,

    Hi there

    After I setup a new Webserver, I moved my website on it. Everything works fine, but now I can't login the album gallery any more. Tried both way:
    1.) from the admin backend
    2.) trough the html site -> components/com_expose/expose/manager/manager.html

    ok, some system infos first:

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

    FYI: no errors on "system check tab" in comp.

    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
    root access: yes
    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
    System Check, I have a warning with GD, but this is not the Album manager Login Problem - I guess ;)

    So, now I am going to post what I did:
    1.) uninstalled the component and cleand the directories, installed again (4.6.3 alpha3c) with no success
    2.) had this time issue I read in forum
    date.timezone = Europe/Zurich
    and also made this changes in php.ini as I had on the old server
    post_max_size = 111M
    session.save_path = "/tmp"
    max_input_time = 90
    and more...
    without success
    3.) played around with rights (chmod)without success
    4.) played around with the .htaccess in amfphp without success

    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.gosswiler.com/components/com_expose/expose/manager/amfphp/amf-core/app/Gateway.php:127\nStack trace:\n#0
    /usr/local/www/www.gosswiler.com/components/com_expose/expose/manager/amfphp/amf-core/app/[b]Gateway.php(127): amfErrorHandler(2048, 'Non-static meth...', '/usr/local/www/...', 127, Array)\n#1
    /usr/local/www/www.gosswiler.com/components/com_expose/expose/manager/amfphp/gateway.php(176): Gateway->service()\n#2 {main}\n
    thrown in /usr/local/www/www.gosswiler.com/components/com_expose/expose/manager/amfphp/amf-core/app/[b]Gateway.php on line 127,
    referer: http://www.gosswiler.com/components/com_expose/expose/manager/manager.swf[/b][/code]

    I have both system online (just work with hosts file on my windows system to switch over)

    As I am the owner of the servers I can give access or manipulate everything...
    hope this help
    cheers BjoernG

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
    Replies
    1. Very stupid, dear. Typical Indian approach, extremely stupid! FO

      Delete