Error: No input file specified.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Error: No input file specified.

Post 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
:(
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post 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.
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post by fastfingertips »

But in this case won't the GET parameters be lost?
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: Error: No input file specified.

Post by volka »

fastfingertips wrote:AddHandler x-httpd-php5 .php
I've never heard of this mime type. What's our source?
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post 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.
Post Reply