Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 10 of 10

This is a discussion on mediawiki upgrade causes IonCube error in the Shared & Semi-Dedicated forum
I have a couple of mediawiki installations (different hosted domains, duplicate copies of the code, one shared hosting account) and I put off doing the ...

  1. #1
    twt
    twt is offline
    Loyal Client
    Join Date
    Oct 2002
    Location
    Conway, Arkansas USA
    Posts
    33

    mediawiki upgrade causes IonCube error

    I have a couple of mediawiki installations (different hosted domains, duplicate copies of the code, one shared hosting account) and I put off doing the upgrade to the latest mediawiki for several months. Today I started going through the steps and I thought I would get "smarter" by linking to a single copy of the code similar to what's described here in "method 2" http://www.steverumberg.com/wiki/ind...WikiHelp&w=myc
    (These instructions were linked from the mediawiki web site.)

    I created what looks to me like the right deal, but the upgrade code is not working. It's complaining about a missing "ionCube" module, and I don't even know why such a thing would be necessary

    I get the following error
    Code:
    -jailshell-3.00$ php update.php
    Failed loading /usr/local/IonCube/ioncube_loader_lin_5.2.so:  /usr/local/IonCube/ioncube_loader_lin_5.2.so: cannot open shared object file: No such file or directory
    A copy of your installation's LocalSettings.php
    must exist and be readable in the source directory.
    -jailshell-3.00$
    My directory structure looked like this:

    /home/acctname/public_html/mediawiki-1.12.0/ <--where I untarred

    /home/acctname/public_html/subdomain1/wiki/ <---most files here are linked to /home/acctname/public_html/mediawiki-1.12.0/*

    /home/acctname/public_html/subdomain1/wiki/maintenance


    JUST NOW I blew away all the symbolic links and made hard copies of everything in the subdomain directory and I get a similar error:
    Code:
    -jailshell-3.00$ php update.php
    Failed loading /usr/local/IonCube/ioncube_loader_lin_5.2.so:  /usr/local/IonCube/ioncube_loader_lin_5.2.so: cannot open shared object file: No such file or directory
    MediaWiki 1.12.0 Updater
    
    No superuser credentials could be found. Please provide the details
    of a user with appropriate permissions to update the database. See
    AdminSettings.sample for more details.
    
    -jailshell-3.00$
    any suggestions would be welcome!

  2. #2
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,307
    I don't know if IonCube error is causing your mediawiki's problem, but you should open a support ticket and ask them to move IonCube to a location accessible to jailshell.

    My scripts aren't bothered by the Ioncube error, but I couldn't stand getting the error all the time and support obliged me and moved it.
    Good luck

  3. #3
    twt
    twt is offline
    Loyal Client
    Join Date
    Oct 2002
    Location
    Conway, Arkansas USA
    Posts
    33
    Can you tell me what IonCube is and why it's throwing errors when I don't use it?

  4. #4
    twt
    twt is offline
    Loyal Client
    Join Date
    Oct 2002
    Location
    Conway, Arkansas USA
    Posts
    33
    also, if it's just a path issue, maybe all I need to do is add the actual location of it to an rc file somewhere... (like bashrc for the shell or whatever)

  5. #5
    twt
    twt is offline
    Loyal Client
    Join Date
    Oct 2002
    Location
    Conway, Arkansas USA
    Posts
    33
    OK I finally found where IonCube is being pointed to -- it's in the system-wide php.ini which you can see if you go to the PHP configuration page in your control panel, and download a copy of the file. Now I understand HOW it's getting called (via php.ini) even though it's not in any of the code _I_ am using.... !

  6. #6
    twt
    twt is offline
    Loyal Client
    Join Date
    Oct 2002
    Location
    Conway, Arkansas USA
    Posts
    33
    OK as it turns out I was too focused on the IonCube error and I missed the solution -- the second error said to look in AdminSettings.sample for more details. I just looked through that file and it told me how to create an AdminSettings.php file that would let the command-line script work. It did, DESPITE the IonCube error. Whew! :-)

  7. #7
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    IonCube is a (paid) tool to encode PHP scripts so you can close the source (Zend Encoder is another one). The IonCube loader is the part of the tool needed on the server to execute such encoded scripts.

    If you don't have any encoded scripts, you can probably either fix the call by pointing it to the right place (or have support install the loader if it isn't to be found at all), or just remove it from php.ini all together.

    P.S. I can't say that I like such tools, but if one must use one, Zend's is IMHO the better choice. Many more servers have the loader (Zend Optimizer) installed and in most cases it is also faster. Note that reflection beats either of these tools..
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  8. #8
    twt
    twt is offline
    Loyal Client
    Join Date
    Oct 2002
    Location
    Conway, Arkansas USA
    Posts
    33
    THANK you for the explanation.

    I just opened the system php.ini again (you look at it by downloading a copy from the php section in your control panel) and here are the lines:

    Code:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
    zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.2.so"
    zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_5.2_ts.so"
    I'm guessing jailshell blocks access to those directories by default. Surely the path isn't bad when apache calls them.... ?
    Last edited by twt; 06-16-2008 at 10:45 PM. Reason: clarified

  9. #9
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Here's a quick way to get around the problem:

    Comment out the two offending lines (the ones starting zend_extension and zend_extension_ts, the semicolon is the comment character for ini files) from the php.ini you grabbed from cPanel. Then upload the modified file to your account. Where you put it and what you call it aren't important. (For simplicy in this example, I'll put it in my home directory and call it php5-cli.ini so as not to confuse it with other php.ini files I have for my site.)

    Then just call php with the -c option and pass the path to that file:
    Code:
    php5 -c /home/USERNAME/php5-cli.ini myscript.php
    Works...but it is kind of bulky to type that in every time you need to run a script!
    Never fear, though...aliases to the rescue...

    Now open the .profile file in your home directory in your favorite text editor and add the following:

    Code:
    alias php5="/usr/local/bin/php5 -c /home/USERNAME/php5-cli.ini"
    When this alias goes into effect, any time you type php5 in an interactive shell it will actually call the real php5 binary passing it the path to your desired php.ini.

    Since the .profile file is only read when a new shell is started you will either have to log out and log back in for the change to take effect, or you can use the following command to reload your profile file:

    Code:
    source .profile
    Now run a php script and say good bye to the errors.

    Note: this approach won't work if you have any executable (chmod 7**) php scripts in your account with which you use a shebang line (#!/usr/local/bin/php5) at the top, though you should be able to pass the -c option as part of the shebang.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  10. #10
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,307
    ...or you could open a ticket to support and they will move the IonCube files to a directory that is accessible to Jailshell...
    Good luck

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •