The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron Error Ioncube Whmcs

Discussion in 'General Discussion' started by germinator, Mar 28, 2012.

  1. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi all,

    I am getting an IonCubeLoader error when my cron is running, since i recompiled php to add some extensions. The weird thing though is that this error only occurs when the cron tries to run the php script, but when i run it manually everything works.

    I checked if IonCubeLoader is listed in phpinfo, and it is, well I mean it wouldn't work manually if it wasn't.

    I get this error via email:

    Code:
    Site error: the file <b>*path to cron*</b> requires the ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the site administrator.
    Any thoughts?

    Thanks in advance,

    Germinator
     
  2. JayFromEpic

    JayFromEpic Well-Known Member

    Joined:
    Apr 2, 2011
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Scottsdale, AZ
    cPanel Access Level:
    Root Administrator
    I would try updating the server and cpanel for starts. I believe ioncube is treated like a system upgrade in cPanel so it should be updated with basic updates. Hopefully that is the only issue.

    If that doesnt work, let me know and I can see what I can do to help.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please provide the cron being used and whether that cron is running as root user or some other user.
     
  4. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    how do i know if it runs as root or not? When I do it manually it works under root and the cpanel user also.

    @Intu still not working
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Where is the cron located? If it is in cPanel > Cron jobs, then it is running as the cPanel user rather than as root.

    Again, please also provide the full cron entry (preferably from /var/spool/cron/username file if the cron is in that file where username is the cPanel username). You can always cat that file and provide the output:

    Code:
    cat /var/spool/cron/username
    Thanks!
     
  6. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Code:
    root@login [~]# cat /var/spool/cron/*username*
    MAILTO="*my email*"
    0 * * * * php -q /home/*username*/public_html/clients/*dir*/cron.php
    0 9 * * * php -q /home/*username*/public_html/clients/modules/registrars/resellerclub/resellerclubsync.php
    does that help? i changed it to once an hour, for test reasons

    thanks,

    Germinator
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Can you try running the cron logged in as that user to SSH?

    Code:
    su - username
    As root user, you should be able to switch to that user in SSH provided the user has jailed shell. If the user does not have jailed shell, please try to temporarily enable it in WHM > Manage Shell Access area.

    One idea might be that you are trying to call a function as that user that isn't allowed by the php.ini file (either on the account or globally). The other might be memory restrictions or the path to the PHP binary isn't pulling the right one. Oftentimes, it is better to use the full path to the PHP binary rather than just php in the command part of the cron job.
     
  8. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    ok, so it does work when running it as the user however i am getting 2 warnings

    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/uploadprogress.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/uploadprogress.so: cannot open shared object file: No such file or directory in Unknown on line 0
    Do you think this can be ignored, because the email, that the cron has successfully been run has been send.

    Germinator
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The warnings indicate that you have extensions listed in the php.ini that is being loaded but those extensions don't actually exist. I wouldn't ignore the warnings because those should be fixed.

    Code:
    grep ^extension /usr/local/lib/php.ini
    ls -lah /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
    Please provide the output for the above commands.
     
  10. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Code:
    [email]*user*@*host*[/email] [/root]# grep ^extension /usr/local/lib/php.ini
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
    extension = "pdo.so"
    extension = "pdo_sqlite.so"
    extension = "sqlite.so"
    extension = "apc.so"
    extension = "uploadprogress.so"
    extension = "pdo_mysql.so"
    [email]*user*@*host*[/email] [/root]# ls -lah /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
    total 3.9M
    drwxr-xr-x 2 root root 4.0K Mar 18 13:51 ./
    drwxr-xr-x 4 root root 4.0K Feb 18 14:27 ../
    -rwxr-xr-x 1 root root 153K Mar 18 13:51 pdo_mysql.so*
    -rwxr-xr-x 1 root root 305K Mar 18 13:51 pdo.so*
    -rwxr-xr-x 1 root root 2.2M Mar 18 13:51 pdo_sqlite.so*
    -rwxr-xr-x 1 root root 1.3M Mar 18 13:51 sqlite.so*
    ok, so apc.so and uploadprogress.so are missing, actually those are the changes that have been made when i used easy apache .. so i just need to download and put apc.so and uploadprogress.so in /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ ?

    Thanks for the fast answers!

    Germinator
     
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Right, you would need to install apc and uploadprogress for those to be usable without errors in /usr/local/lib/php.ini file as extensions. Until they are installed and placed into that directory, you'll continue receiving those warnings.
     
  12. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    can whm install these? because somehow i remember there was a pecl installer in whm

    //edit

    nevermind i think we've found the problem, for some reason the pecl installer doesn't work, uploadprogress and apc were on the installed list, so i uninstalled them and then installed them again, because reinstalling wouldn't work

    then in the last line of building the error

    Code:
    The APC.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626
    occurs. Do you think i should try and build it myself?

    thanks,

    Germinator
     
    #12 germinator, Mar 29, 2012
    Last edited: Mar 29, 2012
  13. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    There is a Pecl installer in WHM > Software > Module Installers area. If you cannot get them installed in WHM, then you can simply run the same commands in SSH:

    Code:
    pecl install apc
    pecl install uploadprogress
     
  14. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    compiling still fails, but i think this is the problem

    Code:
    WARNING: channel "pecl.php.net" has updated its protocols, use "channel-update pecl.php.net" to update
    i tried "channel-update pecl.php.net" but it says the command does not exist

    //edit

    nevermind i found that it is "pear channel-update pecl.php.net"

    now it works to install them, however when i run the cron as the cpanel user now the apc module is loaded twice .. it is probably in the php.ini twice, but i will wait for the next hour to see if it works now
     
    #14 germinator, Mar 29, 2012
    Last edited: Mar 29, 2012
  15. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You may simply want to check if it is twice in /usr/local/lib/php.ini file. You can remove the second entry if it is. It will simply be that "extension = apc.so" entry or something along those lines in that file.
     
  16. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    ok i deleted the duplicate extension lines in the php.ini now no error occur, but i'll wait until the cron has run automatically to see if it really works
     
  17. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    ok so the error still occurs

    Code:
    Site error: the file <b>/home/*user*/public_html/clients/*dir*/cron.php</b> requires the ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the site administrator.
     
  18. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you happen to use suPHP and does that user have their own php.ini file?
     
  19. germinator

    germinator Member

    Joined:
    Dec 15, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    no its one global php.ini and as php handler cgi is set
     
  20. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please run the following and provide the output:

    Code:
    /usr/bin/php -v
    /usr/local/bin/php -v
    After that, try using the path to the /usr/local/bin/php binary first to see the results in the cron rather than just using php in that cron. When you issue a command in shell, it is using the cli binary, which is at /usr/local/bin location.
     
Loading...

Share This Page