Banshee
the secure PHP framework

Forum

No input file specified.

Ahcor Werdna
25 february 2012, 06:32
I am trying to add the "Files" page and it gives me this error "No input file specified."
Is there is a quick fix, for my issue?

- Menu administration -
* homepage /homepage
* files /files
* demos /demos


Banshee version: 3.3
PHP version: 5
MySQL version: 5.1
Webserver: Hiawatha 8.0
Hugo Leisink
25 february 2012, 14:56
What does your Hiawatha configuration for the website look like?
Ahcor Werdna
26 february 2012, 01:45
# Hiawatha main configuration file

ServerId = www-data
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log

Binding {
Port = 80
# Interface = 0.0.0.0
MaxKeepAlive = 30
TimeForRequest = 3,20
}

#Binding {
# Port = 443
# Interface = ::1
# MaxKeepAlive = 30
# TimeForRequest = 3,20
# SSLcertFile = hiawatha.pem
#}

BanOnGarbage = 300
BanOnMaxPerIP = 60
BanOnMaxReqSize = 300
KickOnBan = yes
RebanDuringBan = yes

CGIhandler = /usr/bin/perl:pl
CGIhandler = /usr/bin/php5-cgi:php
CGIhandler = /usr/bin/python:py
CGIhandler = /usr/bin/ruby:rb
CGIhandler = /usr/bin/ssi-cgi:shtml
CGIextension = cgi

FastCGIserver {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:2005
Extension = php, php5
}

UrlToolkit {
ToolkitID = banshee
RequestURI isfile Return
Match ^/(css|files|images|js|slimstat)/ Return
Match ^/(favicon.ico|robots.txt|sitemap.xml)$ Return
Match .*\?(.*) Rewrite /index.php?$1
Match .* Rewrite /index.php
}

Hostname = 127.0.1.1
WebsiteRoot = /var/www/localhost
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi

VirtualHost {
Hostname = www.pd0s.net, *.pd0s.net
WebsiteRoot = /home/internet/www/public
StartFile = index.php
AccessLogfile = /home/internet/www/logfiles/access.log
ErrorLogfile = /home/internet/www/logfiles/error.log
TimeForCGI = 5
UseFastCGI = PHP5
UseToolkit = banshee
}
Hugo Leisink
26 february 2012, 07:49
Oh wait. Of course. Silly me that I havent' thought of it before. In the directory 'public' there is already a subdirectory called 'files'.

Best thing to do is to rename your 'files' modules to something else. If you really want to keep the name of that module, remove the word 'files' (and one pipe sign) from the first 'Match' in the banshee UrlToolkit rule.
Ahcor Werdna
26 february 2012, 09:42
No worries, but I am still stuck. I guess to be more exact, here is a perfect example. On you site, http://hiawatha-webserver.org/files// it gives you a list of files. But on http://www.banshee-php.org/files/ it give you "No input file specified."

Now this is the part that doesn't make sense to me. When I edit my menu with | files | /files/ | it errors "The requested page could not be found." By searching deeper, I find files directory in public (as you already stated) and a file called "file" within the admin directory.

Could it be possible that there should be a file named, "files" in the views/controllers/models directory?

Thank you for taking the time to help me with my issue.
Hugo Leisink
26 february 2012, 09:59
Ah, oke. You want to have a directory index there. Short version: add "StartFile = index.html" to the .hiawatha file in the public/files directory or add "TriggerOnCGIstatus = yes" to the virtual host configuation section in the Hiawatha configuration.

Long version: you are using FastCGI. When using FastCGI, Hiawatha doesn't check for the existence of the requested file, because the FastCGI daemon could be located on a remote server. A directory index is only shown if the requested file is not found. But with FastCGI, Hiawatha doesn't check for it. So, if you want to show a directory index while using FastCGI, you have to do a little trick:

1) don't use FastCGI in that directory, which is what you do when you say a .html (or any other non-CGI file) is the start file for that directory.
2) tell Hiawatha to trigger on the result of a CGI request and show a directory index when that result is 404 Not Found.
Ahcor Werdna
26 february 2012, 10:15
Thank you!

I am using FastCGI, and I added "TriggerOnCGIstatus = yes" to my virtual host configuration.
I did not apply step 1 or 2 yet and the files page is available to view. But I will follow those steps, soon.

Also, I noticed that I can access the /files/ page on this site also. I ended up using downloading v3.2 of banshee-php to compair files, thinking that my problem could be a missing file. I found myself to be wrong. l0l

I enjoy using your framework and webserver, they work perfect together.

Thank you for your help and keep up the great work.
Message preview

The following BB-codes are available in a message:

  • [b]Bold text[/b]
  • [center]Center text or imagen[/center]
  • [color=color name or #RGB code]Colored text[/color]
  • [i]Italic text[/i]
  • [img]Link to image[/img]
  • [right]Align text or image right[/right]
  • [s]Strike-through text[/s]
  • [size=pixelsize]Big or small text[/size]
  • [u]Underlined text[/u]
  • [url]Link to website[/url]
  • [url=link to website]Link text[/url]