|
#1
|
|||
|
|||
|
UPDATE
All servers now run php5 by default. You will no longer need to configure your account to use it. This thread is now being closed to prevent any further confusion. Any information below here is considered out dated and no longer relevant. All of our shared and reseller servers now have both PHP 4 and PHP 5 installed. By default the server will use PHP 4 to process PHP pages. You can easily configure your account to use PHP 5 by adding a line to the apache .htaccess file for your account. The command to add will depend on whether your server is configured to run under phpsuexec. The first step is to find out if your server is using phpsuexec. This can be done by creating a simple 'php info' script. Create a file in the public_html folder of your site named 'phpinfo.php' and insert the following: Code:
<?php phpinfo(); ?> The next step is to add the appropriate command to your .htaccess file. For the primary domain name on an account the .htaccess file should be located in the public_html folder. Create the file if it does not exist. Place the following command in the file: AddHandler application/x-httpd-php5 .php Please note, PHP 5 will not work work using a temporary URL. PHP 5 is only accessible when using the domain name to access your account. Also, the cpanel software will always reflect your current PHP version in the lower left General Server Information box. (NOTE: If you are on php4 and use the .htaccess edit to use php5, cPanel will still reflect version 4 as that is the default server engine. However, php5 can still be used for your scripts.) Thank you for choosing HostGator! Regards, Basil H. HostGator Technical Support Last edited by GatorJess; 06-19-2008 at 01:56 PM. Reason: Warning: PHP4 phase-out - In Progress |
|
#2
|
|||
|
|||
|
my account has php 4.4
is there an addhandler that will work for this? thanks! |
|
#3
|
|||
|
|||
|
i can't even do the phpinfo because it wants to download the file not display it.
|
|
#4
|
||||
|
||||
|
If you have any questions feel free to contact us via Livechat and we can tell you whether you have a phpsuexec or a non-phpsuexec server. Also, if you have a newer account you will be phpsuexec. All of the newer servers have this enabled by default.
|
|
#5
|
|||
|
|||
|
I've seen this happen too, but only when I do the following steps:
Built phpinfo.php as instructed in previous posts, then copied it to public_html using ftp. Then while still in ftp, with public_html dir files displayed, I double-clicked on the newly-copied phpinfo.php. Was then I got the "Do you want to Download" popup. Yeah...that's not going to work. Instead open your bowser and in the address enter yourdomain.TLD/phpinfo.php |
|
#6
|
|||
|
|||
|
I have a phpsuexec server, but after adding the line to .htaccess I get an internal server error, could someone take a look? IP is 67.18.172.226. Does that server have php5 at all?
|
|
#7
|
||||
|
||||
|
We can't see your .htaccess, . files are restricted. Post what you have in the file.
|
|
#8
|
|||
|
|||
|
Code:
AddHandler application/x-httpd-php5 php |
|
#9
|
|||
|
|||
|
Where could I find apache error logs?
|
|
#10
|
||||
|
||||
|
All of those are under /var/log
|
|
#11
|
|||
|
|||
|
n0other, I placed the command in the .htaccess file on your account and the site is displaying correctly and the phpinfo script does show it is using PHP 5.
On a shared or reseller plan the error log for the account can be viewed from the account cpanel. You do not have access to view the apache logs directly. Please note, the cpanel does not run using the settings on your account and will always display PHP version 4 is being used. PHP 5 will only be used to run scripts that you place on your account. Basil H. HostGator Technical Support http://hostgator.com/help |
|
#12
|
|||
|
|||
|
Hello,
I've got exactly the same problem as n0other = phpsuexec server, after adding the line to .htaccess I get an internal server error. Here is the proof: http://74.53.88.18/~cules/phpinfo.php Everything I have in .htaccess is: Code:
AddHandler application/x-httpd-php5 php Last edited by Raijn; 03-27-2007 at 12:07 PM. |
|
#13
|
||||
|
||||
|
The 500 error is from using the temporary url. You will need to access it with the actual domain name.
__________________
best regards, George |
|
#14
|
|||
|
|||
|
The URL used to access the site will have no effect on the use of PHP 5 on the account.
In this instance it was caused by the fact that Raijn's account is on a brand new server that had not had PHP 5 configured on it yet. PHP 5 is running correctly on the server now. Basil H. HostGator Technical Support http://hostgator.com/help Update: updated the original post to reflect the change to this information. |
|
#15
|
||||
|
||||
|
Quote:
http://gmc.websitewelcome.com/~gt1636/info.phpAll accounts that had php5 enabled worked fine til the accounts dns was changed to another server.
__________________
best regards, George |
|
#16
|
|||
|
|||
|
Hello,
I do not see any issues with PHP 5 on the gmc server. I am not able to check for other issues with your account because it appears you have already cancelled it to move it to a dedicated server. Basil H. HostGator Technical Support http://hostgator.com/help |
|
#17
|
||||
|
||||
|
Sorry, we decided to cancel our account on GMC this morning due to it being the anniversary for our signup and billing and no longer needed it.
Accessing a .php file did have the behavior of giving a 500 server error on every account that we enabled php5 on using the temporary url. But they all worked fine accessing them with the domain name ![]() Really not important as this behavior is not present on our dedicated
__________________
best regards, George |
|
#18
|
|||
|
|||
|
If I have entered that code that u gave us.... when we access the file phpinfo.php shouldn't it be php 5.2 there?! or something like that!?
http://www.suporterfc.com/phpinfo.php Have a look.... if u think u can help me... feel free to modify the files that my site/server need to use php5.
|
|
#19
|
|||
|
|||
|
I saw it has been upgraded... 10x
|
|
#20
|
|||
|
|||
|
I am having the same issue as Raijn. Is it possible that I'm on a new server that has not been set up for PHP5. The IP is 74.53.87.226
Thanks for your help. |
|
#21
|
|||
|
|||
|
Speaking for someone on the earlier non CGI servers, I followed the AddType instructions and it worked perfectly. The php script is now showing 5.2
|
|
#22
|
|||
|
|||
|
Still not working:
http://gator254.hostgator.com/~antimon/info.php When i uploaded the .htaccess file, it showed up a php5 info for the first request. But now, it shows up a http 500 server error. |
|
#23
|
|||
|
|||
|
Reversing my earlier statement regarding the URL used to access the site:
PHP 5 can only be accessed using your domain name. It can not be accessed using a temporary URL. This is due to a change in the way PHP 5 is configured on the servers. The change was required to make it possible to use custom php.ini files with PHP 5. When using a temporary URL the server has no way to identify the user that owns the site thus can not run PHP as the site owner. This causes the server to generate the error when using the temporary URL. Basil H. HostGator Technical Support http://hostgator.com/help Update: updated the original post to reflect the change to this information. |
|
#24
|
||||
|
||||
|
Quote:
Thanks for the update
__________________
best regards, George |
|
#25
|
|||
|
|||
|
Quote:
Last edited by cKey1990; 05-04-2007 at 10:55 PM. |
![]() |
| Bookmarks |
| Thread Tools | |
|
|