Jump to content


Member Since 01 Dec 2005
Offline Last Active Jan 07 2018 08:28 AM

Posts I've Made

In Topic: Running Php File From Cron Job

26 April 2017 - 07:32 AM

Here's an error reported from last night's attempt to run my PHP file in a cron job:


Failed loading /opt/cpanel/ea-php54/root/usr/lib64/php/modules/ioncube_loader_lin_5.4.so: /opt/cpanel/ea-php54/root/usr/lib64/php/modules/ioncube_loader_lin_5.4.so: undefined symbol: execute
Zend Guard Loader requires Zend Engine API version 220100525.
The Zend Engine API version 220131226 which is installed, is newer.
Contact Zend Technologies at http://www.zend.com/ for a later version of Zend Guard Loader.

Set-Cookie: PHPSESSID=p4nu293cl2kikl2tb7t7ooo4j6; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>: Class 'PasswordHash' not found in <b>/home/myaccount/include/do_email.php</b> on line <b>153</b><br />


Questions arising:

  1. Why am I getting the undefined symbol: execute error? This seems to be something to do with loading PHP, before it has ever tried to access my script.
  2. Why is the session cookie that it is sending set to Expires: Thu, 19 Nov 1981?
  3. Why has it failed to find PasswordHash?

This file runs correctly when called as part of my website, so I think the problems must be to do with diffferences between the environment when run as a web page and when run as a cron job.


Thanks - Rowan

In Topic: Why Can't I Paste Text

26 April 2017 - 06:16 AM

Well, it sort of helps. Thanks for providing this link. But I think my most straightforward answer is to remember to use Firefox or Chrome if I want to access the TCH forum. Of course I will usually forget this until I find that I can't paste :-(.


Thanks - Rowan

In Topic: Getting Mod_Rewrite To Work

24 April 2017 - 05:18 PM



Thanks for your reply.


Why is it that I can't do an internal rewrite to a location above public_html?


Here is an exerpt from http://httpd.apache....tml#rewriterule

The Substitution of a rewrite rule is the string that replaces the original URL-path that was matched by Pattern. The Substitution may be a:

file-system path Designates the location on the file-system of the resource to be delivered to the client. Substitutions are only treated 
as a file-system path when the rule is configured in server (virtualhost) context and the first component of the path in the substitution 
is exists in the file-system

So I guess this is saying that what I'm trying to do won't work in an .htaccess file. But is there a way that I can make it work in my Virtual Host config file?


Surely there cabn;t be any fundamental reason why I can;t redirect to a file system diretory above public_html? I can after all include any of these files, which is pretty close to the same thing?


Thanks - Rowan

In Topic: Getting Mod_Rewrite To Work

24 April 2017 - 11:57 AM

I have found many discussions on the web around this topic. Some say that a rewrite rule assumes that the redirect path is a file system path if the first element of the path (/home in this case) exists at the root of the file system (which it obviously does in this case). Otherwise it assumes that it is relative to the Document Root. Other people imply that redirect to a file system path is not permitted for .htaccess files for security reasons, but that you can use an Alias as a work around.


Is it in fact possible to write a RewriteRule that will work in an .htaccess file on a TCH server to redirect to a file system path? How exactly do I do this?


If not, is it possible to use an Alias (which would presumably point to a file system path from a web URL)? If so, how do I do this?


You may ask - why do I want to do this? The answer is that I prefer to keep all the files that I include or redirect to in non web accessible places, to minimise the chance that someone can deduce or guess the names of these files, and then download them, and see the inner workings of my web site, security system etc,. thus compromising my security.


I find it difficult to believe given all the things that mod_rewrite can do, that it can't do this...


Thanks - Rowan

In Topic: Running Php File From Cron Job

17 April 2017 - 11:16 AM

Thank you.


 I think you can close this ticket now. If I can't get the cron job to work properly after sorting out the INI file I will raise another one.


Thanks - Rowan