The problem is, I have a script that works on Bluehost, and other hosts, but not on Hostgator, and will pay $50 to the person that solves this. I am unable to provide you access to the files. I will make changes accordingly. Hostgator support is clueless. PROBLEM: I have this script, which includes a Pear package called Flexy; and it also includes PEAR locally. The PEAR files are in public_html, and the Flexy files are within the PEAR folder. e.g. public_html/myscript/PEAR/HTML/Template/Flexy.php I have changed some configuration settings in Flexy, and it works okay on Bluehost (WORKING), however, it does not seem to work on Hostgator (BROKEN). In fact, if I remove the PEAR folder on BAD server, it still gives the same error from Flexy. If I remove the PEAR folder on WORKING server, then the script gets internal 500 error, which is what probably should happen. It's almost as if on the BROKEN host, its including PEAR/Flexy from somewhere else; However, when I echo'ed the includes locations using: echo get_include_path(), I dont see any problems: .:/usr/lib/php:/usr/local/lib/php:/home/coach/public_html/myscript/PEAR The script is identical on both hosts (zipped and copied over). I even setup on multiple bluehost and hostagor accounts with same results. I also setup a php.ini file on each, and copied it from Bluehost over to Hostgator, but still get the same error. P.S. The flexy errors has to do with the setting that allows you to include php from template files. I enabled it by changing it to "true" but still saying that this is not allowed. Nothing complicated, just a simple setting.
Absolute path looks a bit strange. Have you tried using just "/home/coach/public_html/myscript/PEAR" path? Also you might want to try using relative path (ex. "myscript/PEAR"). If i understand the situation correctly
Assuming /home/coach/public_html/myscript/PEAR is correct path add in php setting at the begining So that your php include path becomes .:home/coach/public_html/myscript/PEAR:/usr/lib/php:/usr/local/lib/php:/ Now if it works , you have to give me $50 .
I suggest you to use relative paths. Otherwise you have to change home directory in your script. AFAIK you cant use php.ini on hostgator. Try using ini_set() inside your script. In the script use require_once 'PEAR/HTML/Template/Flexy.php'; require_once 'PEAR/PEAR.php'; PHP:
Made some progress, but not sure still. I accidentally discovered that if I copy the script to a new directory, then it starts working. I even used cp -rp which ensured the permissions were the same. Ownership of files shoudnt change, I guess. For some reason, mv does not do this. Only cp solves the problem. I dont have a database with this script, and not sure why touching the files like this solves it. Maybe the script is caching something? Well, I used diff to see that the working and non-working files were identical. Of course, I deleted cookies, temporary internet files, and restarted browser, but this doesnt have an effect.
Its weird. There is a certain folder "somefolder1". Then I copy it to "somefolder21" Then I copy it back again from "somefolder2 to "somefolder1)" This fixes it, oddly enough, but I cant do this every time I need to install the script somewhere. So, I next tried running touch command on that folder, and all sub-folders and files, but this does not fix it. I do think this is a bug with Flexy. Flexy is unable to realize that a particular file or folder changed or something, but only when I transferred to another server, Hostgator. Extremely annoying and weird. I ended up touching the files and folders on the original server before moving it over, which appears to fix it.