Switch to PHP 5.4 on BlueHost

I want to learn laravel 4 and find starter kit using github that combine many class from others plus twitter bootstrap.

As traits available on php 5.4 I decide to find a host that support that version. As  I have account on Bluehost I decide to try it. Bluehost provide php 5.2, 5.3 and 5.4. By default you’ll see php 5.2 but you can enable other version. Here’s how to do that :

1. Login to bluehost cpanel

2. Find PHP Config

The option under Software/Services

change php1 Switch to PHP 5.4 on BlueHost

 

Choose PHP 5.4 (single php.ini) and click save settings.

 

change php2 Switch to PHP 5.4 on BlueHost

 

3. Try login via ssh

ssh access not provided by default. You need to request it first via support.

PHP cli will follow the setting. Here’s my login before change the version :

Using username “myacc”.
myacc@mydomain.net’s password:
Last login: Sun May 12 20:54:42 2013 from 36.69.54.183
myacc@mydomain.net [~]# php -v
PHP 5.2.17 (cgi-fcgi) (built: Oct 29 2012 18:51:17)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
myacc@mydomain.net [~]#

Here’s my login after change PHP version to PHP 5.4 :

Using username “myacc”.
myacc@mydomain.net’s password:
Last login: Wed May 15 21:51:27 2013 from 180.242.6.211
hostinj9@mydomain.net [~]# php -v
PHP 5.4.13 (cgi-fcgi) (built: Apr 5 2013 16:41:50)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
myacc9@mydomain.net [~]#

As simple as 123 icon smile Switch to PHP 5.4 on BlueHost

How to check status of dns propagation

Common task when move to new web hosting is changing ns server supplied by hosting company.

ns1.domainname.com

ns2.domainname.com

You must enter those ns to domain control panel and wait. In case of web transfer after where you hired by someone or they little bit worry about the process you can educate them by using these tools :

  1. intodns.com ; this service will check latest ns server that work for a domain.
  2. free dns service ; you can use google public dns or opendns service.
  3. clean dns cache ; you can type ipconfig \flushdns under ms dos command prompt.

By use those tools you can show latest status of domain propagation. In case of slow respond from your dns given by your isp you can ask them to use no.2.

Happy transfering icon smile How to check status of dns propagation

A communication error occurred: “Operation timed out” Network Error (tcp_error)

A message came out when one “heavy” php script work :

Network Error (tcp_error)

 

A communication error occurred: “Operation timed out”
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
For assistance, contact your network support team.

Easy way to overcome this message is increase maximum execution time.

Create .htaccess file with this content :

php_value max_execution_time xxx

xxx in second, by default the value of this option is 30.

I try to change to 120 :

php_value max_execution_time 120

save the file and recheck it via phpinfo().