Page 1 of 1

Error: No input file specified.

Posted: Mon May 14, 2007 1:22 am
by fastfingertips
Hello

I receive this error in my project and i don't know how to fix it. I'm imagine that some lines from my htaccess file cause this but i'm not sure yet.
Do you have any idea what is causing this? I'm using ZF and i'm able to access only default (index/index) but when i'm trying to access other controllers like contact/index this error is triggered.

My htaccess looks:

Code: Select all

RewriteEngine on
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
:(

Posted: Mon May 14, 2007 3:50 am
by CoderGoblin
OK not an expert on .htaccess (actually a complete newbie :oops: )

My .htaccess file looks like this...

Code: Select all

RewriteEngine on
RewriteBase /~myuser/rootdir/
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
In my index.php I have the following:

Code: Select all

define('DS',DIRECTORY_SEPARATOR);
...
...
$frontController = Zend_Controller_Front::getInstance();
$frontController->throwExceptions(true);
$frontController->setBaseUrl(DS.'~myuser'.DS.'rootdir');
$frontController->setControllerDirectory('.'.DS.'application'.DS.'controllers');
I would imagine your main problem could be the index.php/$1. You may have to get rid of the $1.

Posted: Mon May 14, 2007 3:53 am
by fastfingertips
But in this case won't the GET parameters be lost?

Posted: Mon May 14, 2007 4:16 am
by CoderGoblin
Try it and see :wink:.

For my application I actually use the define different routes with the $_GET as part of the URL (see below)

Code: Select all

Browse=Search/Browse/category/0/page/1
Browse/:category=Search/Browse/category/0/page/1
Browse/:category/:page=Search/Browse/category/0/page/1
but adding ?myvar=1 is still picked up correctly.

Re: Error: No input file specified.

Posted: Mon May 14, 2007 7:51 am
by volka
fastfingertips wrote:AddHandler x-httpd-php5 .php
I've never heard of this mime type. What's our source?

Posted: Mon May 14, 2007 7:58 am
by fastfingertips
When you are using both version of php (4 and 5) on the same web server, you have to make some workaround, by default the files with .php extensions are served to php4, in this way i just want to let the apache to know that from now on the .php extension files must be serverd to php 5.