CodeIgniter Forums
Codeigniter with Hostgator and PHP 5.4 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Codeigniter with Hostgator and PHP 5.4 (/showthread.php?tid=58739)



Codeigniter with Hostgator and PHP 5.4 - El Forum - 07-14-2013

[eluser]Unknown[/eluser]
Hi there,

I'm quite desperate. I have a CI site on Hostgator that works with php 5.3 but completely fails with php 5.4, as soon as I specify
Code:
AddType application/x-httpd-php54 .php
in my .htaccess file. I have seen other similar topics on this forum but haven't been able to fix things.

Here is my .htaccess file:
Code:
Options -Indexes
RewriteEngine on
RewriteRule ^$ http://stage.mydomain.com/app [L]
RewriteCond $1 !^(index\.php|assets/|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
AddType application/x-httpd-php54 .php

Without the last line: works fine. With it: error 404 for all URLs that depend on CI.

After checking with Hostgator mod_rewrite is there, my account can get php 5.4 so it's not a failure on their side.

I have tried to change $config['uri_protocol'] to every single option, without any success.

I hope one of you has encountered this type of problem before because I don't know what to try anymore...

Thanks!