Paid affiliate hosting advertisement

Bluehost php.ini change recommendation wanted

dnuss - June 4, 2007 - 18:58

I have been running some basic sites on Bluehost for a few months without any real problems yet. They are Drupal 5.1 and running under PHP 4.4.6.

In anticipation of adding more modules, I would like to bump up the "memory_limit" PHP setting to at least 32, which Bluehost will allow me to do by making changes to the php.ini file located in the root ( public_html ) folder.

My question relates to a comment in the php.ini file ( from Bluehost ) that says:
";;;;;;;;;;;;;;;;;;;;;;;;;;;
; Bluehost Considerations ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
; If you would like to change the PHP environment for any PHP files
; in your account, make the changes to this file. Then copy this file to
; all directories, including subdirectories, that have PHP files in them.
;
; NOTE: If you do not copy this file to all directories and subdirectories
; with PHP files, your changes here will not affect those files in other
; directories."

In my limited knowledge of how Apache and PHP work, it was my assumption that if I make changes to this "root" php.ini file, it would be applicable to ALL php script execution, unless overridden by the occurrence of another php.ini file in another folder from which a script would be executed.

Can someone set me straight on this? Do I have to put my updated php.ini file in every Drupal folder ( as is insinuated in the above Bluehost consideration comment )?

Would it be better to put an entry into the Drupal settings.php file instead?

Recommendations from someone using Drupal on Bluehost would be appreciated.

=-=

VeryMisunderstood - June 4, 2007 - 19:02

just add the php.ini file to your drupal root and all drupal files and folders will use it. I've seen instruction like that on my host as well, and I only use a single php.ini in my publis root, which handles all php default settings across the board. including any multi sites I've installed.

Thanks

dnuss - June 5, 2007 - 11:48

Thanks for the reply. That is what I have done so far. When I do a phpinfo() I don't see any "memory_limit" settings being displayed so I am not sure how to determine if the revised setting is really working.

=-=

VeryMisunderstood - June 5, 2007 - 12:44

It should certainly be listed using phpinfo() , if the host allows the overwriting of this php.ini setting. Is it there without your custom php.ini ?
Are you able to verify with phpinfo() the adjustment of any othe setting ? like max_upload ?

phpinfo()

dnuss - June 5, 2007 - 13:16

The "memory_limit" setting does not show. Things like "upload_max_filesize,max_execution_time,post_max_size" all show.

The version of PHP on Bluehost is 4.4.6, and the version of PHP on my local test server is 4.4.4 and also does not show the "memory_limit" setting, so I am wondering if it is something that the phpinfo() does not report for PHP 4.

The original php.ini file contents displayed with phpinfo() also did not show "memory_limit", even though there was a setting "memory_limit=8M" in the file.

These are the little things that drive you crazy sometimes, that is why I was looking for someone who also uses Bluehost to reply to this formum message.

Have you contacted Bluehost,

seanray - July 7, 2009 - 00:33

Have you contacted Bluehost, they should be able to give you a better explain. My environment is php 5.x, so, it works well.

=============================================
Want to setup a Drupal site, find the Best Drupal Hosting for it now.

UPDATE************

Lakeside - June 11, 2009 - 16:51

Recently started with BlueHost.

As of June, 2009 they have PHP 5.2 installed.

After installing a php.ini file in the public_html folder that increases php memory to 64 Megs, I checked the top level folder and yes it does show 64 Megs available to PHP. However, when checking site folders below the root folder they still show 32 Megs.

So, it looks like it is necessary to drop a copy of the php.ini file into folders with php files.

As a side note. A lot of virtual host companies are now promoting unlimited space and bandwidth. What they are not talking about is the cap on CPU cycles. If your sites use a high rate of CPU cycles you could be in trouble. The best practice, IMHO, is to be conservative with modules.

I phoned BlueHost and asked tech support what have they found to generate problems in CPU cycle usage. They said, "Stat programs."

Another issue that can create CPU cycle problems--according to BlueHost--are cron jobs that use a direct URL. In other words, if you set up a cron job that accesses 'http://www.nameofsite.../cron.php', then you are going to be using additional CPU cycles. In fact the tech person said to use relative addresses if possible because whenever you go off site (that is using http://) you are using additional CPU cycles.

It is difficult to know when (or if) CPU cycle usage becomes an issue. IMHO it is better to be forewarned and act accordingly than to find your site shut down because of it.

Bottom line is the less CPU cycles your site uses generally the faster it will load (excluding DB issues, but that is a whole other story.)

Setting the PHP.INI in the

kamdroop - June 12, 2009 - 19:21

Setting the PHP.INI in the root /public_html folder usually only applies it to that folder. It appears that Bluehost has come out with a method that will enable all directories make use of the singular php.ini file in the root directory, which makes it easier. You can also do it the old school way by having each directory use it's own php.ini.

---
Find the best Drupal hosting providers

See the best drupal hosting providers on the Internet.

Bluehost

brianbrown - July 1, 2009 - 18:58

If you are using Bluehost fastcgi php, then I beloieve that the user pp.ini is recursive to all subtending directories.
As far as cron using CPU cycles, I was told on 25 May 2009 the following:

Dear customer,
thank you for contacting us.

Using the wget method will cause little (if any) more stress on the server than the php command line method. Unfortunately we don't have any control over what simple scripts displays as it is a 3rd party script. We recommend using the wget method though.

Thank you,
Jared
Level II Tech Support /Scripting
BlueHost.com
888.401.4678

I had noted that the cron job that is automatically installed by simple scripts for Drupal dos not work and I inquired as to a bandwidth issue for calling cron.php from the public internet (with either cUrl or wget). That is what they told me. I could never get cron to run using internal paths, but I was also advised that if you do use internal paths, you will not receive eMail from cron. Since Bluehost is not hosting my email accounts, they told me that I can not use sendmail from a php script nor will cron send email either. This of course, does not make sense to me, but using the SMTP Authentication Support module fixes the drupal mail problem (but you have to use port 80). Sorry for getting off on a tangent!
Regards,
-Brian

Brian Brown, Ph.D.

I've been running a couple of

Lakeside - July 5, 2009 - 18:40

I've been running a couple of dozen cron jobs on Bluehost using this code for Drupal 6 installs:

/ramdisk/bin/php5 /home/youruseraccountname/public_html/examplesite/cron.php

Don't get an email, but since they all run once daily it isn't something I want. On occasion I've checked Drupal's report log and everything processes as it should.

Hope this helps.

 
 

Drupal is a registered trademark of Dries Buytaert.