0

I have tested out the shell script by using putty to connect to my site, but I had to:

cd /home/username/bin //which is where my cake console is located

Then I could run the command, which was:

cake email second_user

I could not get this to work using the way described in the documentation where you just cd into the root folder and run the command bin/cake email second_user.

If I try it that way I get this error:

Failed loading /usr/php/56/usr/lib64/php/modules/ZendGuardLoader.so:  /usr/php/56/usr/lib64/php/modules/ZendGuardLoader.so: undefined symbol: zend_new_interned_string
Failed loading /usr/php/56/usr/lib64/php/modules/opcache.so:  /usr/php/56/usr/lib64/php/modules/opcache.so: undefined symbol: zend_new_interned_string
Status: 500 Internal Server Error
Content-type: text/html

This is also the same error I get when I try to setup the cron job with bluehost.

Cakephp 3 documentation says to use:

cd /full/path/to/root && bin/cake myshell myparam

I have tried using that type of command to no avail.

I then tried doing a work around version as well with the cron job where I just use the actual bin location to run cake like so:

php-cgi -c /home/username/public_html/php.ini /home/username/bin/cake email second_user > /home/username/logs/cron_logs.txt 2>&1

But I am getting this in my log file (which also has the same error as above):

Failed loading /usr/php/56/usr/lib64/php/modules/ZendGuardLoader.so:  /usr/php/56/usr/lib64/php/modules/ZendGuardLoader.so: undefined symbol: zend_new_interned_string
Failed loading /usr/php/56/usr/lib64/php/modules/opcache.so:  /usr/php/56/usr/lib64/php/modules/opcache.so: undefined symbol: zend_new_interned_string
################################################################################
#
# Cake is a shell script for invoking CakePHP shell commands
#
# CakePHP(tm) :  Rapid Development Framework (http://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed under The MIT License
# For full copyright and license information, please see the LICENSE.txt
# Redistributions of files must retain the above copyright notice.
#
# @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
# @link          http://cakephp.org CakePHP(tm) Project
# @since         1.2.0
# @license       http://www.opensource.org/licenses/mit-license.php MIT License
#
################################################################################

# Canonicalize by following every symlink of the given name recursively
canonicalize() {
    NAME="$1"
    if [ -f "$NAME" ]
    then
        DIR=$(dirname -- "$NAME")
        NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME")
    fi
    while [ -h "$NAME" ]; do
        DIR=$(dirname -- "$NAME")
        SYM=$(readlink "$NAME")
        NAME=$(cd "$DIR" > /dev/null && cd $(dirname -- "$SYM") > /dev/null && pwd)/$(basename -- "$SYM")
    done
    echo "$NAME"
}

CONSOLE=$(dirname -- "$(canonicalize "$0")")
APP=$(dirname "$CONSOLE")

exec php "$CONSOLE"/cake.php "$@"
exit

If I use cake.php (or any other command for that matter) instead of just cake, I just get the failed loading errors.

Also register_argc_argv is turned On.

Can someone please help?

Battousai
  • 503
  • 7
  • 17

1 Answers1

0

I am not sure if this can be done. Since php 5.6 on bluehost is more of a beta testing, I can't get it to work. I had to switch to php 5.4 and I was then able to get cron jobs to work.

Battousai
  • 503
  • 7
  • 17