PDA

View Full Version : php.ini issues with Hostgator


Netman262
11-20-2009, 08:44 PM
I had a weird thing happen yesterday with the portal script.

Hostgator took the server down that I host my sites on so they could do some work on Apache.

When they brought the server back up, it caused the portal script to crash with a SourceGuardian error.

Here is the dialog that I had with Hostgator:

Affected URL : cheyenneportal.com

Description of Issue : They did a reboot on server and it came back up with the error on customers domain.

Displaying message when URL typed in browser:
Warning: dl() has been disabled for security reasons in /home/cheyenne/public_html/index.php on line 2
PHP script /home/cheyenne/public_html/index.php is protected by SourceGuardian and requires the SourceGuardian loader ixed.5.2.lin. The SourceGuardian loader has not been installed, or is not installed correctly. Please visit the SourceGuardian php encoder site to download required loader.

Hostgator support response:

Hello,
This was corrected for your account. This was not a server issue. YOur php.ini was not properly setting the loader for source guardian. I corrected this. Please let us know if you have any questions or issues.


After checking my site, a found that the Admin section was still having the same issue. I emailed them back and this is what they replied:

Hello,

The admin has been corrected. The proper php.ini is in the home directory and should not be modified. There was a php.ini in the admin directory. I renamed this to php.ini.bak and it properly loads now.


I'm not sure why the php.ini file was in both directories or if it is necessary or why it all of a sudden stopped working when they rebooted the server.

The portal script is working fine now and is pulling from the php.ini file in the main directory only.

I can provide a copy of my php.ini file if any of you techies want to analyze it and see what changes they made to make it work.

Just thought I would let you know in case you run in to the same problem.

nordal
11-20-2009, 10:31 PM
Thanks for your report here. The php.ini can in fact cause some issues once in a while. The problem is that different servers requires php "serverd" in a different way. On some servers for example, the settings are such that the php.ini content is only loaded from a central place and do not allow for "personal" settings. Others need a php.ini in both admin and main directory.

Generally the problem that occurred was probably do to hostgator making some settings changes related to php.ini and the loaders they have. My guess is there was a general php.ini loader set before for the whole server, and after the change the SourceGuardian now has to be loaded from your account. I.e. before the local php.ini was irrelevant due to the SG being loaded globally, but after it took effect and needed correct setting.

Hopefully you can follow what I'm saying here. Otherwise, no problem, it's working again :)

Netman262
11-20-2009, 10:46 PM
:mad:I just found that I am getting a SourceGuardian error on the external header when I click on a news story. The error reads:


Warning: dl() has been disabled for security reasons in /home/cheyenne/public_html/includes/external.header.php.inc on line 2
PHP script /home/cheyenne/public_html/includes/external.header.php.inc is protected by SourceGuardian and requires the SourceGuardian loader ixed.5.2.lin. The SourceGuardian loader has not been installed, or is not installed correctly. Please visit the SourceGuardian php encoder site to download required loader.

I will keep you posted on what is discovered.

If you guys have any ideas, let me know.:eek:

nordal
11-20-2009, 11:12 PM
Ok, that's a new one to me.. Maybe it's a special case since it's loading "externally". Anyway, I have attached the un-encoded external.php file, that should fix the problem.

Netman262
11-20-2009, 11:35 PM
After painstakingly comparing the original php.ini file line-by-line with the fixed php.ini file, I found the difference between the two.

After looking through over 1100 lines of code :eek: here is the only difference:

Original php.ini file

line 1139 read - ;extension="ixed.5.2.lin"

Corrected php.ini file

line 1139 reads - extension="ixed.5.2.lin"

the only difference was the ";" at the beginning. Removing it changed it from a comment to a command.

All working fine now.:D

nordal
11-21-2009, 01:51 AM
Hehehe.. yes, that's the "former" php.ini file. It has a LOT of extra stuff in it that is actually not necessary, so now it has been reduced to 14 lines... sorry you got the long one :)