Jump to content

Can't get email piping to work because of IonCube


kristofferR

Recommended Posts

When I run "php -q /var/www/site.com/public/kunde/pipe/pop.php" via cron, I only get a bunch of error messages:

 

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/ssh2.so' - /usr/lib/php5/20090626+lfs/ssh2.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/lib/php5/20090626+lfs/suhosin.so' - /usr/lib/php5/20090626+lfs/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
Site error: the file <b>/var/www/site.com/public/kunde/pipe/pop.php</b> requires the ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the site administrator.

 

 

It's not looking the right places. IonCube and all the other libraries are properly installed (they show up with "phptest();") and WHMCS is otherwise running smoothly.

 

How can I run the cron properly to ensure that IonCube and the other PHP-libraries are loaded as they should?

Link to comment
Share on other sites

the command line php probably isnt picking up the correct php.ini file. To get around this, make a phpinfo page and copy down the location of the php.ini (commonly /usr/local/lib/php.ini) and then add it to your cronjob like so:

 

php -c /usr/local/lib/php.ini -q /var/www/site.com/public/kunde/pipe/pop.php

Link to comment
Share on other sites

You're probably using the wrong version of PHP. Depending on the control panel, you probably have several versions of PHP installed. If you look at the phpinfo again as I previously mentioned, It should give you the full path to PHP (/usr/local/bin/php or whatever), If you specify this one on the command like rather than just "php", it should fix the problem.

Link to comment
Share on other sites

Thats not always true for a cron job. the PATH for cron is (sometimes) different from that of your login shell. The order and included directories will be relavent to what is returned by "which php".

Ya, I forgot to mention that it should be ran from the same account that runs the cron. You're right though, there are several binaries available on most systems. I've never gone wrong with doing that yet though.

Link to comment
Share on other sites

Ya, I forgot to mention that it should be ran from the same account that runs the cron.

 

Still wouldn't matter. crond does not execute a login shell when running processes, thus, it will not pickup whatever PATH you have setup for that user. You can define the PATH within the crontab to match that of a login shell if you prefer, but its typically best not to assume a PATH is going to be correct and use the full path location for executables (like php for example).

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated