Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #26  
Old 09-14-2006, 05:51 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
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 .
May I quote support?

Quote:
Originally Posted by Support
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 directly from support. It clearly says that YOU DON'T SUPPORT PHP.INI OVERRIDES WITH PHP5 AND PHPSUEXEC INSTALLED.

IF YOU KNOW SOMETHING THAT I DON'T, PLEASE FEEL FREE TO LOG INTO MY SERVER AND FIX THE PROBLEM I'M CURRENTLY HAVING WITH MY SERVER AS IT WILL NOT ALLOW ME TO RUN PHP5 WITH PHPSUEXEC WHILE USING PHP.INI OVERRIDES.

I HAVE SPENT MANY HOURS GOING BACK AND FORTH WITH SUPPORT ON THIS ISSUE AND I VERY SURE THAT I KNOW WHAT I'M TALKING ABOUT WHEN I SAY THAT I CAN'T GET SUPPORT TO FIX MY PROBLEM. PLEASE REVIEW THIS TICKET, [#FFE-546044]: PHP.INI override., BEFORE YOU RESPOND BECAUSE I'M QUOTING RIGHT FROM THAT TICKET WHEN I SAY THAT HELL WILL FREEZE OVER BEFORE I GET PHP.INI SUPPORT IN PHP5 WITH PHPSUEXEC INSTALLED.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included

Last edited by Serra; 09-14-2006 at 08:57 PM.
Reply With Quote
  #27  
Old 09-14-2006, 07:08 PM
vtrain's Avatar
vtrain vtrain is offline
Royal Croc
 
Join Date: Jan 2004
Location: Limerick - Ireland
Posts: 699
Thumbs down Re: HostGator not support PHP.ini?

I do understand why you got pissed but nobody here is deaf.

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
  #28  
Old 09-14-2006, 08:20 PM
gtgeorge's Avatar
gtgeorge gtgeorge is offline
Emperor Croc
 
Join Date: Mar 2005
Posts: 2,223
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 would suggest a quick check with Tim Greer (Systems Administrator - HostGator.com, LLC.
) before making such quick replies. A little research would show there are tickets relating to this issue. reference ticket#JYB-918342 which was opened over a month ago.
__________________
best regards,
George
Reply With Quote
  #29  
Old 09-14-2006, 08:57 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by vtrain View Post
I do understand why you got pissed but nobody here is deaf.
I'm not so sure of that.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #30  
Old 10-10-2006, 04:36 PM
Rebecca
HostGator Guest
 
Posts: n/a
Cool Re: HostGator not support PHP.ini?

Hi Everyone:
I wish I had found this thread before today - - I sent most of yesterday trying to get php.ini files to work on my php 5 shared server.

The techs didn't seem to be aware for most of the day (through tickets and chat) that there is a problem running php.ini on a php 5 only machine. They could have saved themselves, and me significant time if they had passed on the information to each other...

I finally was told that there is a "bug" in php 5 that might be fixed in php 5.2. (I wanted to turn off register_globals... I can't use a .htaccess file or php.ini...).
Reply With Quote
  #31  
Old 10-10-2006, 05:05 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: HostGator not support PHP.ini?

Exactly. I'm positive there is no work around for the bug and the bug only exists on HG servers. (oddly, at another host I have no problem).

I did talk directly to Brent and he said 100% it can't be done.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #32  
Old 10-10-2006, 06:58 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,475
Default Re: HostGator not support PHP.ini?

I don't think it's only in HG servers... http://forums.cpanel.net/showthread.php?t=54162
__________________
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
  #33  
Old 10-10-2006, 07:19 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by quietFinn View Post
I don't think it's only in HG servers... http://forums.cpanel.net/showthread.php?t=54162
Then, I can say that it isn't all PHP5 servers.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #34  
Old 10-10-2006, 09:17 PM
GatorBilly
HostGator Guest
 
Posts: n/a
Default Re: HostGator not support PHP.ini?

Just wanted to chime in here. This is a known issues with PHP 5.X and phpSuExec. PHP has stated that it will be fixed in PHP 5.2
Reply With Quote
  #35  
Old 10-10-2006, 09:45 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by GatorBilly View Post
Just wanted to chime in here. This is a known issues with PHP 5.X and phpSuExec. PHP has stated that it will be fixed in PHP 5.2
We will see. If so, I'll go back to PHP5.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #36  
Old 11-04-2006, 12:15 AM
Unregistered
HostGator Guest
 
Posts: n/a
Default Re: HostGator not support PHP.ini?

http://bugs.php.net/bug.php?id=38714

You can revert back to php 5.0.5 and it will work fine.

Also, any servers with php4 + php5 installed on the same machine will not work

php 5.2 should also fix the problem.

This is a big bug, but hard to see exactly what is going on.
Reply With Quote
  #37  
Old 11-04-2006, 12:18 AM
Unregistered
HostGator Guest
 
Posts: n/a
Default Re: HostGator not support PHP.ini?

Question.

Does anyone have to create php.ini files in all their directories? or is there a fix that allows you to put it in the parent directories and have those php directives populate through all its subfolders (aka, put a php.ini in the /home/user/public_html/ directory and all the settings are set for any directory in your website) ?
Reply With Quote
  #38  
Old 11-04-2006, 10:32 AM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: HostGator not support PHP.ini?

There is no fix, its not really broken, but support can put symbolic links in each of your directories for you.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #39  
Old 11-04-2006, 03:47 PM
Unregistered
HostGator Guest
 
Posts: n/a
Default Re: HostGator not support PHP.ini?

yea, the only problem with symbolic links is that you have to run that command everytime you create a directory.

find /home/username/public_html -type d -exec ln -s /home/username/php.ini {} \;
Reply With Quote
  #40  
Old 11-29-2006, 12:32 AM
GatorDaveM
HostGator Guest
 
Posts: n/a
Default Re: HostGator not support PHP.ini?

Just a heads up to everyone: php 5.2 was released awhile back which resolves the php override bug.

We hadn't upgraded yet because zend optimizer for 5.2 wasn't released. Zend came through within the past 48 hours and has released optimizer for php 5.2

I've notified a few of our head technicians and we should be rolling out php 5.2 within 48 hours or less so overrides will begin to function again.

Thank you for your time and don't hesitate to contact us if you have any questions or concerns.

Note: Hopefully I can now convince them to upgrade all of the boxes directly to php5 -- 6 is out so it shouldn't be too much of a feat.
Reply With Quote
  #41  
Old 12-19-2006, 08:54 AM
nlstart nlstart is offline
Hatchling Croc
 
Join Date: Aug 2006
Posts: 26
Default Re: HostGator not support PHP.ini?

In addition to this discussion; is it possible to change PHP.ini on a HG reseller hosting package? If so, how?
Reply With Quote
  #42  
Old 03-01-2007, 01:02 AM
MarkMiami MarkMiami is offline
Hatchling Croc
 
Join Date: Jan 2007
Posts: 3
Question Re: HostGator not support PHP.ini?

I put register_globals=off in php.ini, which is in public_html. Register globals is still on. Has this problem been corrected yet or am I doing something wrong? I can't have my Joomla clients looking at a great big yellow and red security warning when they are in their administrator section. What am I supposed to tell them when they ask me to correct it?
Reply With Quote
  #43  
Old 03-01-2007, 01:12 AM
MarkMiami MarkMiami is offline
Hatchling Croc
 
Join Date: Jan 2007
Posts: 3
Default Re: HostGator not support PHP.ini?

I think I found the answer. Someone suggested putting the new php.ini in every folder and sub-folder. Will try that.
Reply With Quote
  #44  
Old 03-01-2007, 04:21 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by MarkMiami View Post
I think I found the answer. Someone suggested putting the new php.ini in every folder and sub-folder. Will try that.
That is the correct answer, php.ini must be in every directory where php files are run. Your server must be using PHP 5.2 as well.

Remember, that if you override the PHP.ini file, you will need to include things like path and any zend stuff as well as the changes you want to include.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #45  
Old 03-01-2007, 05:36 PM
gtgeorge's Avatar
gtgeorge gtgeorge is offline
Emperor Croc
 
Join Date: Mar 2005
Posts: 2,223
Default Re: HostGator not support PHP.ini?

Yep I learned the hard way this morning that zend & ioncube was dropped if just adding what you want to change in the override php.ini. I found some nice info at:
http://www.washington.edu/computing/...g/php-ini.html

and then a handy lil script to recreate the global php.ini along with the changes you want to override that can be found at:
http://tips-scripts.com/?tip=php_ini#tip



Code:
 <?php 
// Put all the php.ini parameters you want to change below. One per line. 
// Follow the example format $parm[] = "parameter = value"; 
$parm[] = "register_globals = Off"; 
$parm[] = "session.use_trans_sid = 0"; 
// full unix path - location of the default php.ini file at your host 
// you can determine the location of the default file using phpinfo() 
$defaultPath = '/usr/local/lib/php.ini';  
// full unix path - location where you want your custom php.ini file 
$customPath = "/home/user/public_html/php.ini"; 
// nothing should change below this line. 
if (file_exists($defaultPath)) { 
  $contents = file_get_contents($defaultPath);  
  $contents .= "\n\n; USER MODIFIED PARAMETERS FOLLOW\n\n";   
  foreach ($parm as $value) $contents .= $value . " \n"; 
  $handle = fopen($customPath, 'w');  
  if (fwrite($handle, $contents)) {  
    fclose($handle); 
    if (chmod($customPath,0600)) $message = "The php.ini file has been modified and copied"; 
      else $message = "Processing error - php.ini chmod failed"; 
  } else { 
    $message = "Processing error - php.ini write failed"; 
  } 
} else { 
  $message = "Processing error - php.ini file not found"; 
} 
echo $message; 
?> 
__________________
best regards,
George
Reply With Quote
  #46  
Old 03-11-2007, 12:58 AM
ladynada's Avatar
ladynada ladynada is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 26
Default Re: HostGator not support PHP.ini?

How do you execute phpinfo() ?
thanks,
nada
__________________
Reply With Quote
  #47  
Old 03-11-2007, 01:02 AM
ladynada's Avatar
ladynada ladynada is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 26
Default Re: HostGator not support PHP.ini?

nevermind.

thanks.. I had made a bookmark to do it, and forgot!

nada
__________________
Reply With Quote
  #48  
Old 04-17-2007, 09:17 AM
jaz jaz is offline
Hatchling Croc
 
Join Date: Apr 2007
Posts: 2
Question Re: HostGator not support PHP.ini?

I tried adding "AddHandler application/x-httpd-php5 .php" to a .htaccess file in the root of one PHP application. This seems to have solved my issues with register_globals being enabled.

Does this affect the whole directory tree below this point?

I have dozens of sites, and each has dozens of subdirectories running php scripts, and new folders with php script get created dynamically. So rather than use many php.ini files (one file or symlink for each subdir) I'd like to have the .htaccess file control a particular application (subfolder tree).

What else can HG tell us about this?

Last edited by jaz; 04-17-2007 at 09:32 AM.
Reply With Quote
  #49  
Old 04-17-2007, 10:41 AM
gtgeorge's Avatar
gtgeorge gtgeorge is offline
Emperor Croc
 
Join Date: Mar 2005
Posts: 2,223
Default Re: HostGator not support PHP.ini?

that enables php5 all the way down from the point where you add it. Just remember the php5 is usually phpsuexec which will use php.ini for mods to folders below that. The php.ini overides are not recursive however.
__________________
best regards,
George
Reply With Quote
  #50  
Old 05-06-2007, 12:24 PM
D.Alexander D.Alexander is offline
Hatchling Croc
 
Join Date: May 2007
Posts: 1
Default Re: HostGator not support PHP.ini?

Quote:
Originally Posted by Serra View Post
That is the correct answer, php.ini must be in every directory where php files are run. Your server must be using PHP 5.2 as well.

Remember, that if you override the PHP.ini file, you will need to include things like path and any zend stuff as well as the changes you want to include.
Hello there

can i with php.ini increase upload_max_filesize?

and what i must type in php.ini file?

Quote:
upload_max_filesize = 20M;
post_max_size = 20M;

or
upload_max_filesize = 20M
post_max_size = 20M

or

upload_max_filesize = 20;
post_max_size = 20;
thank you
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 12:26 AM.