!!!!!!!! This How to has been updated, check the section on Zend Configuration. These settings might create problems and it seems now godaddy makes use of apc which is much better !!!!!!!!!
What this How-to is
I recently installed a Concrete5 website on a Godaddy shared Linux hosting plan and had to deal with many issues. Those are the solutions I used to fix those problems. I did a lot of research and after an almost terminal, frustration-induced, hair-loss related episode, this is what I got.
What this How-to is not
My purpose is not to explain how to put your Concrete5 website online or anything of the kind. Some very good tutorials exists on that particular topic. Here I assume you know how to do that and I focus only on the Godaddy specific requirements and issues.
The only advice I would give concerning the installation is to do what was advised many time elsewhere (check the other Godaddy How-to on this website):
- Upload your site zipped (not rared) and then have the Godaddy interface unzip it for you.
- Once that's done, move your files to the root (unless you want your address to be http://mydomain.com/somefolder)
Why oh Why??????
Your website is installed, the database ready, everything by the book so you have a look at your website and what you get is:
Warning: session_start() [function.session-start]: open (/home/content/23/8569523/tmp/sess_7b8d18a8ad216652bd3409c9ea97ac6e11a2d6b3, O_RDWR) failed: No such file or directory (2) in /home/content/23/8569523/html/concrete/startup/session.php on line 22 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/23/8569523/html/concrete/startup/session.php:22) in /home/content/23/8569523/html/concrete/startup/session.php on line 22 Warning: Cannot modify header information - headers already sent by (output started at /home/content/23/8569523/html/concrete/startup/session.php:22) in /home/content/23/8569523/html/concrete/libraries/view.php on line 833 Warning: Unknown: open(/home/content/23/8569523/tmp/sess_7b8d18a8ad216652bd3409c9ea97ac6e11a2d6b3, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
First of all, I strongly suggest that you follow the steps directly from Godaddy's FTP manager's interface. We're dealing with a Linux hosting plan and I assume most of you are using windows. Using Godaddy's interface for editing purposes will help you avoid strange characters issues between the 2 systems.
- Create a folder named tmp at the root
- If it doesn't already exists, create a php5.ini file at the root
edit the file by adding the following 2 lines to it:
session.save_path = "/tmp/"
Everybody says to wait 20 to 40 minutes before the changes take effect but for me it was instant so I can't really say how it'll go for you.
The explanation of the solution is simple. I added the first line simply because everywhere I looked, everybody said to use it with Godaddy. Even Godaddy suggests that fix. Frankly it seemed to work fine without it but I didn't want to take a chance so I added it.
The second line defines the temporary folder needed for saving session information. If you look at the error messages you get "No such file or directory", a lot of errors all related to the same line 22, and in the end "Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0". Can't be any clearer. Took me hours to figure it out though...
These 2 lines fixed all the error messages and I was a happy man. Or was I???
Proud of myself, I clicked a link to just enjoy my work and admire the results and what do I get???? an absolutely empty page with on top the message:
No input file specified.
I found the solution on cesgeekbook.com So to quote that article:
From the Hosting Control Center click on the Settings tab then click on File Extension. change the .php (not php4 or php5) extension From PHP 5.x FastCGI to PHP 5.x And Voila it works!
Yes! Now it works.
- Zend Optimizer
According to Godaddy's documentation, if you want to use the zend optimizer you need to check the version of php you have. 3 possibilities:
- If it's below 5.2, you need to upgrade to 5.2 (check their documentation)
- If it's 5.3 you need to use Zend autoloader instead of Zend Optimizer (check their documentation)
If it's 5.2 you need to add the following lines to your php5.ini file
UPDATE: As of October 2012 it seems that using these settings for Zend make the website not work and you might get an error "Internal server error..." It seems that godaddy has installed the apc cache (which is good news) and so in order to make use of it you need to enable its use: in your site.php file add:
in Your php5.ini you could use the following settings that work well:
;APC extension="apc.so" apc.enabled=1 apc.shm_segments=1 apc.shm_size=128 apc.ttl=7200 apc.user_ttl=7200 apc.num_files_hint=1024 apc.enable_cli=1
BE WARNED: apc is enabled by default on their accounts and it WILL clash with zend optimizer. You have to either comment out the zend optimizer lines in your php5.ini and use apc settings, OR leave the zend Optimizer lines and specifically disable apc with: apc.enabled=0
If you want to use their SMTP server to send mail, use the following setting: Server: relay-hosting.secureserver.net Port: 25 No need for login or password (I know strange)
If you want to use the php mail() function, it's ok too, it works.
Since I applied all these fixes, I didn't experience any problem (front or back end). Of course, I wouldn't say Godaddy is the fastest host ever but at least now it's working.