Re: htaccess
| From: | Simon J Welsh | Date: | Sun, 07 Jul 2013 20:10:01 +0000 |
| Subject: | Re: htaccess | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-321581@lists.php.net to get a copy of this message | ||
On 8/07/2013, at 8:06, Tedd Sperling <tedd@sperling.com> wrote:
> Hi gang:
>
> I have a client who has an account with GoDaddy (I know).
>
> GoDaddy says they have PHP v 5.3 installed on the client's account, but phpinfo() says
> different, namely it reports 5.2.17.
>
> After calling GoDaddy, they said the client has an htaccess file that makes everything 5.2
> instead of 5.3.
>
> Now, I'm not an expert on these things and the reason why I am asking here, but here are
> the two htaccess files I find at root level:
>
> 1. Named: .htaccess.bak_hosting_company_Apache24_compatibility_fix
>
> Options +ExecCGI
> AddType application/x-httpd-php .php .htm .html
> AddHandler x-httpd-php5-cgi .php .htm .html
> # AddHandler php5-script .php .html
> # AddHandler x-httpd-php5 .php .html
> ErrorDocument 404 /404.html
> ErrorDocument 403 /403.html
>
> AND
>
> 2. Named: .htacess
>
> # The below FilesMatch stanza was added by your
> # hosting provider on 2013-06-27 11:05:33
> # to resolve a potential Apache 2.4
> # compatibility issue with your custom AddHandler(s)
> # for PHP. If you feel this was in error, please
> # contact support and we will work to resolve the
> # issue. Thanks!
> <FilesMatch "\.(htm|html)$">
> Options +ExecCGI
> </FilesMatch>
>
> Options +ExecCGI
> AddType application/x-httpd-php .php .htm .html
> AddHandler x-httpd-php5-cgi .php .htm .html
>
>
> Does anyone see a problem here?
>
> OR -- a way to get PHP to version 5.3?
>
> Cheers,
>
> tedd
I don’t use GoDaddy, so this may not be entirely accurate.
I’m guessing that it’s these two lines in .htaccess:
AddType application/x-httpd-php .php .htm .html
AddHandler x-httpd-php5-cgi .php .htm .html
They’re changing the handler from PHP files from the default ones to x-httpd-php5-cgi, which would
cause PHP 5.2 to be used instead. Try commenting out these two lines.
---
Simon Welsh
Admin of http://simon.geek.nz/