Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter on Dreamhost
#1

[eluser]cdevroe[/eluser]
After hunting for an answer to this question for hours (I even tweeted my disgust last night) I am left with no choice but to post a new topic.

I've already gone through every solution that I was able to find on this forum and on the wiki. No matter what I do, I can not seem to find the right settings to have CodeIgniter run smoothly on Dreamhost. At this point I'm not even trying to have cruft free URLs I simply want it to work.

With default config - meaning .index.php/controller/ only the home page seems to work. The default controller is "home". But none of the methods underneath (such as index.php/home/signup/) work. They all report "No input file specified."

I've found a few blog posts and wiki pages that describe this error and most of them involve using mod_rewrite to remove index.php altogether from the URLs and some of them even mention that Dreamhost seems to prefer an extra '?' in the .htaccess file. I've tried all of those solutions and only came up with different problems (such as 404 errors when there shouldn't be).

As I said, at this point I'd like to get the site up and running even with index.php/ in the URL. Then I can work from there. Does anyone have any insight as to why CodeIgniter would be so hard to get running on Dreamhost?

(a bit of info)
PHP Version: 4.4.9 (which is above the requirements.)
Blank .htaccess file.
#2

[eluser]davidbehler[/eluser]
Try playing with your config:
Code:
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'        Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'        Uses the REQUEST_URI
| 'ORIG_PATH_INFO'    Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol']    = "AUTO";

AUTO might not work for you.
#3

[eluser]cdevroe[/eluser]
[quote author="waldmeister" date="1270575510"]Try playing with your config: AUTO might not work for you.[/quote]

waldmeister: Thanks. I've tried every possible configuration in config with both mod_rewrite being on and off. Meaning, every combination that I could conceive I believe I've tried with slightly different results each time. Sometimes "No input file specified", sometimes 404 and sometimes the wrong method being called in the controller.

I've seen a few mumbles on the forums about CodeIgniter requiring PHP5 on Dreamhost - and this I have not tried yet - but according to the main documentation CodeIgniter does not require PHP5.

Thanks again.
#4

[eluser]Unknown[/eluser]
I had some trouble initially setting it up on dreamhost. You should probably move your server to php5 in prep for CI 2.0 anyway. My current setup uses php5. I use mod-rewrite to remove the index.php. It took a while to get the right rewrite rule. When doing that you need to make sure to remove the 'index.php' from the index_page variable in config.php. The .htaccess I use is as follows:
Code:
RewriteEngine on

## Route everything through /index.php except for the pages in the following expression  - note '.' are escaped '\.' ##
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php?$1 [L,QSA]
#5

[eluser]pranky[/eluser]
Hello Folks,

input file not specified:

I am submitting a link which will explain you what exactly you have to do.

While doing just remember that your index.php? should contain ? mark

<a href="http://pankajdangi.com/2010/04/no-input-file-specified-codeigniter">Check this link</a>



Thanks
Pankaj
#6

[eluser]cdevroe[/eluser]
I wanted to post a follow up on the resolution of this.

My host is Dreamhost and I was putting my app on an older domain - one that ran PHP4 still. Even though the version of PHP4 that was running was greater than the CodeIgniter requirements I still had the problem described above. Simply by changing the version of PHP for the domain from 4 to 5 in my Dreamhost Panel solved the issue.
#7

[eluser]Unknown[/eluser]
I know this is old thread but i came across this issue and struggled with for around an hour and got it working finally. Here is the settings i used

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?defaultcontroller/$1 [L]

I wanted to load some of the pages using a default controller and remove the controller the name as well from the url and in the config file

Code:
$config['index_page'] = “”;
$config['uri_protocol'] = “AUTO”;


Thanks to No input link for pointing me in the right direction. Smile Cheers!




Theme © iAndrew 2016 - Forum software by © MyBB