Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #1  
Old 03-04-2006, 08:42 AM
syuan
HostGator Guest
 
Posts: n/a
Default HostGator not support PHP.ini?

Hi everybody, I wanna to disable "Register globals" and "Persistent Connections", so I create "php.ini" and put on my web public_html directory:

register_globals = Off
mysql.allow_persistent = Off


But I found it's not useful....
I see my phpinfo.php, "register_globals" and "mysql.allow_persistent" is still On.
Reply With Quote
  #2  
Old 03-04-2006, 08:51 AM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by syuan
Hi everybody, I wanna to disable "Register globals" and "Persistent Connections", so I create "php.ini" and put on my web public_html directory:

register_globals = Off
mysql.allow_persistent = Off


But I found it's not useful....
I see my phpinfo.php, "register_globals" and "mysql.allow_persistent" is still On.
That is correct, you can not override php.ini settings using that method.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #3  
Old 03-04-2006, 08:53 AM
TeeJa's Avatar
TeeJa TeeJa is offline
Royal Croc
 
Join Date: Dec 2004
Location: Kerrville, Texas
Posts: 689
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by syuan
Hi everybody, I wanna to disable "Register globals" and "Persistent Connections", so I create "php.ini" and put on my web public_html directory:

register_globals = Off
mysql.allow_persistent = Off


But I found it's not useful....
I see my phpinfo.php, "register_globals" and "mysql.allow_persistent" is still On.
Unless your on a dedicated server, or any server, to put a php.ini anywhere but where it is suppose to be and only accessed by root.
To do what you want, do it in a .htaccess file. I think it should work that way?
This way it only affect your account, but the phpinfo will still show server wide configuration, not your account.
Reply With Quote
  #4  
Old 03-04-2006, 09:00 AM
syuan
HostGator Guest
 
Posts: n/a
Default Re: HostGator not support PHP.ini?

http://forums.hostgator.com/showthread.php?t=6023

Now I can't use php.ini, somebody can tell me how to disable persistent connections?
Reply With Quote
  #5  
Old 03-04-2006, 09:05 AM
quietFinn's Avatar
quietFinn quietFinn is offline
Emperor Croc
 
Join Date: Feb 2005
Posts: 2,764
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by Serra
That is correct, you can not override php.ini settings using that method.
Some settings you can change in the .htaccess file, for ex.:
php_flag register_globals off
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #6  
Old 03-04-2006, 09:45 AM
TeeJa's Avatar
TeeJa TeeJa is offline
Royal Croc
 
Join Date: Dec 2004
Location: Kerrville, Texas
Posts: 689
Default Re: HostGator not support PHP.ini?

Here are some things to put into your .htaccess file to control your account.

php_flag register_globals off
php_flag mysql.allow_persistent off
php_value max_execution_time 300
php_value memory_limit 8M
php_value post_max_size 20M
php_value upload_max_filesize 20M

Just add your own values, should work?
Reply With Quote
  #7  
Old 08-25-2006, 01:00 PM
escoles escoles is offline
Hatchling Croc
 
Join Date: Jul 2006
Posts: 6
Default Re: HostGator not support PHP.ini?

FWIW, as nearly as I can tell, you cannot change the upload_max_filesize
or post_max_size values from .htaccess on Hostgator. At least not from a subdomain.
Reply With Quote
  #8  
Old 08-25-2006, 07:39 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

It appears to be a setup problem that is common to all HG machines. I'm unable to override the PHP.INI files on my dedicated server. HG is currently looking into it as well as at least one other dedicated machine that is having the same problem.

Right now, we need to sit back and wait for them to find the solution. I suspect that everyone will be able to override PHP settings when they find the problem.

(I'm talking about only PHPSuExec machines, others may not have the problem)
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #9  
Old 08-25-2006, 07:40 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by TeeJa
Here are some things to put into your .htaccess file to control your account.

php_flag register_globals off
php_flag mysql.allow_persistent off
php_value max_execution_time 300
php_value memory_limit 8M
php_value post_max_size 20M
php_value upload_max_filesize 20M

Just add your own values, should work?
None of these will work in .htaccess in a PHPSuExec machine.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #10  
Old 08-25-2006, 07:55 PM
gtgeorge's Avatar
gtgeorge gtgeorge is offline
Emperor Croc
 
Join Date: Mar 2005
Posts: 2,258
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by Serra
Right now, we need to sit back and wait for them to find the solution. I suspect that everyone will be able to override PHP settings when they find the problem.
Good luck with the wait. I was told they were working on a fix back on the 17th. Sure hope it's not going to be like getting the nutsmail for resellers wait.
__________________
best regards,
George
Reply With Quote
  #11  
Old 08-26-2006, 10:09 AM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

Yea, I'm not going to let them forget.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #12  
Old 08-29-2006, 11:00 AM
cjnoyes cjnoyes is offline
Swamp Croc
 
Join Date: Jan 2006
Posts: 250
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by Serra
None of these will work in .htaccess in a PHPSuExec machine.

we are told with PHPSuExec that the php.ini will work
Reply With Quote
  #13  
Old 08-29-2006, 06:25 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

That is correct. Under PHPSuExec it should work. There is a problem and it doesn't work and will be fixed.

I responded to my open ticket on it just now, lets see if they can do something.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #14  
Old 08-30-2006, 06:40 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

Today HostGator told me that they can not support PHP.ini overrides with PHP5. They suggested that I should switch back to PHP4 instead.

So that ends that. I'm not sure what I should do. I really like HostGator, but they have basically admited that it is impossible for me to use a feature that EVERYONE else supports. Should I go to a new company to get the features that I expect or should I just sit back and suffer?
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #15  
Old 08-30-2006, 09:24 PM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,163
Default Re: HostGator not support PHP.ini?

Is there a technical reason for that I'm not familiar with?

-Matt
Reply With Quote
  #16  
Old 08-30-2006, 09:42 PM
kmaw's Avatar
kmaw kmaw is offline
Emperor Croc
 
Join Date: Mar 2005
Location: Ontario, Canada
Posts: 1,856
Default Re: HostGator not support PHP.ini?

Even with your dedicated???
Reply With Quote
  #17  
Old 08-31-2006, 08:13 AM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

Yes, on my dedicated box with PHP5. Here is what they offered:

Quote:
php.ini override doesn't seem to work in PHP5 with PHPSuEXEC, or any CGI redirect based install. I have not been able to find a way to do it as of yet. Here are the options for overrides.

PHP 4 /w PHPSuEXEC - You can use a php.ini file for override
PHP4 - You can use your .htaccess file for php_value/php_flag override flags.
PHP5 - You can use your .htaccess file for php_value/php_flag override flags.

Please tell us what you would like us to do.

Thank you.
This is the response from support after I contact Brent directly to find out what was up with this php.ini thing. Brent said that their best guy can't get it to work. One has to assume that their best guy is really good.

I wanted to make sure I wasn't just getting the brush off from support. It does appear that the HG setup for servers does not support php.ini overrides (for some unknown reason) when using PHP5 and PHPSuExec.

This is a major bummer becuase I need PHPSuExec and I would like to move away from PHP4.

Quote:
Is there a technical reason for that I'm not familiar with?
I was unable to find anyone else on any other host that was having this problem when I searched in Google.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #18  
Old 09-06-2006, 12:00 AM
roberekson roberekson is offline
Hatchling Croc
 
Join Date: Aug 2006
Posts: 1
Default Re: HostGator not support PHP.ini?

I will most likely be switching hosting companies because of this. Not being able to set ANY ini settings is pretty lame. I don't want to have several lines of ini_set() at the top of each php page (or my include files).

PHP 4 IS NOT an option for me as my scripts are heavily OOP-oriented and PHP5's OOP support is worlds better than PHP4.

While I'm glad they updated my server to PHP 5, I wish they would've gone to PHP 5.1 instead of PHP 5.0.5 as it offers more interfaces that makes working with classes very easy.

Oh well, I had high hopes for HostGator but looks like I'll be moving my account somewhere else.
Reply With Quote
  #19  
Old 09-06-2006, 08:25 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by roberekson View Post
Oh well, I had high hopes for HostGator but looks like I'll be moving my account somewhere else.
Good idea. I'm at a bit of a loss as to what I should do. It looks like I'm stuck going back to PHP4 until this is worked out. Its clear that people looking for PHP5 should be going to other hosting companies. Lunarpages had a good implementation of PHP5 and PHPSuExec on their systems.

The only reason I'm not dropping everything and jumping ship is that customer support here at HG has been good. Even at Lunarpages, I'm seeing 12-24 hour wait times for customer support requests (talking level 2 type requests). In fact, I just close an account over there last month for a customer who was unhappy with their support.

With dedicated support is even more of a problem because my questions can't be answered by just anyone at support. I already know the easy answers.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #20  
Old 09-07-2006, 05:21 AM
vtrain's Avatar
vtrain vtrain is offline
Royal Croc
 
Join Date: Jan 2004
Location: Limerick - Ireland
Posts: 699
Default Re: HostGator not support PHP.ini?

a bit off-topic but

Quote:
Originally Posted by Serra View Post
[snip]
With dedicated support is even more of a problem because my questions can't be answered by just anyone at support. I already know the easy answers.

Maybe you should try a reputable company full comitted to dedicated servers like ThePlanet or Defenderhosting and check how is their php5 implementation. I can tell you that the servers at both of them rock ;-)

Vtrain
__________________
Vtrain is Linux User #237333 on http://counter.li.org/
"Don't meddle in the affairs of sysadmins,
for they are subtle and quick to anger."
Reply With Quote
  #21  
Old 09-07-2006, 10:06 AM
cjnoyes cjnoyes is offline
Swamp Croc
 
Join Date: Jan 2006
Posts: 250
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by vtrain View Post
a bit off-topic but




Maybe you should try a reputable company full comitted to dedicated servers like ThePlanet or Defenderhosting and check how is their php5 implementation. I can tell you that the servers at both of them rock ;-)

Vtrain
ThePlanet is a cute one to mention, If they are doing it better and have a solution, then gator should be able to get the information from them since Gator is their client.

For those on dedicated systems, are there changes you would feel good about making on a global basis, those you could make in your global php.ini file.

The other thing is ask the question on the forums on Zend.com they might know what the issue is and any possible solutions.
Reply With Quote
  #22  
Old 09-07-2006, 07:01 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,067
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by cjnoyes View Post
ThePlanet is a cute one to mention, If they are doing it better and have a solution, then gator should be able to get the information from them since Gator is their client.

For those on dedicated systems, are there changes you would feel good about making on a global basis, those you could make in your global php.ini file.

The other thing is ask the question on the forums on Zend.com they might know what the issue is and any possible solutions.
My problem is fairly specific. I need a couple accounts to run global_variables on under PHP5. I wrote the code on these accounts, so I don't see any problems with superglobals. However, I don't want to run all of my other sites with gobals on because of the risk with involved PHP5. The problem is these same sites use PHPSuExec, so I can't disable that or these sites still will not work.

In the long run, I'll convert them all over to PHP5, I will not have a problem, but for the short term, it sucks.

I really need php.ini override for PHP5.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #23  
Old 09-08-2006, 01:33 PM
cjnoyes cjnoyes is offline
Swamp Croc
 
Join Date: Jan 2006
Posts: 250
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by Serra View Post
My problem is fairly specific. I need a couple accounts to run global_variables on under PHP5. I wrote the code on these accounts, so I don't see any problems with superglobals. However, I don't want to run all of my other sites with gobals on because of the risk with involved PHP5. The problem is these same sites use PHPSuExec, so I can't disable that or these sites still will not work.

In the long run, I'll convert them all over to PHP5, I will not have a problem, but for the short term, it sucks.

I really need php.ini override for PHP5.
I see the problem you have, I also would not want to run with with that turned on globally either.
Reply With Quote
  #24  
Old 09-14-2006, 08:52 AM
GatorRichard's Avatar
GatorRichard GatorRichard is offline
HostGator Staff
 
Join Date: Aug 2006
Posts: 7,331
Default Re: HostGator not support PHP.ini?

With all of our servers, you can use custom php.ini values. Some servers require it in .htaccess (non-phpSuExec) and others require it in a php.ini file (phpSuExec servers).

I believe all the people in this thread who sare stating it's our problem and we don't support PHP5 obviously have not put in a support ticket to even find out .
Reply With Quote
  #25  
Old 09-14-2006, 10:29 AM
quietFinn's Avatar
quietFinn quietFinn is offline
Emperor Croc
 
Join Date: Feb 2005
Posts: 2,764
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by hgrfoshee View Post
With all of our servers, you can use custom php.ini values. Some servers require it in .htaccess (non-phpSuExec) and others require it in a php.ini file (phpSuExec servers).

I believe all the people in this thread who sare stating it's our problem and we don't support PHP5 obviously have not put in a support ticket to even find out .
I think the problem is that IF there is the "dual" PHP in the server, AND you have selected PHP5, using .htaccess, you can NOT use php.ini to change any PHP values.
If you use PHP4, in the same server, you can change PHP values using php.ini.
At least that seems to be the case in my dedicated server, where I have the dual PHP system.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 01:07 AM.

 
Forum SEO by Zoints