[solved] Enabled Pretty URLs, getting a "No input file specified." Error

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
kurashiki_ben
Forum Members
Forum Members
Posts: 86
Joined: Sun Jul 05, 2009 2:37 am

[solved] Enabled Pretty URLs, getting a "No input file specified." Error

Post by kurashiki_ben »

The homepage of the site shows up fine.
The links in the homepage are modified, but when the user clicks on a link, they get a white page with just "No input file specified."

1) config.php settings:

Code: Select all

#------------
#URL Settings
#------------

#What type of URL rewriting should we be using for pretty URLs?  Valid options are:
#'none', 'internal', and 'mod_rewrite'.  'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates.  For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod_rewrite';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '/';

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
2) .htaccess file contents (placed in root of CMS installation)

Code: Select all

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

#option to remove directory listings in all folder (avoid publishing unwanted contents)
 Options -Indexes

# Deny access to config.php
# This can be useful if php ever breaks or dies
# Use with caution, this may break other functions of CMSms that use a config.php
# file.  This may also break other programs you have running under your CMSms
# install that use config.php.  You may need to add another .htaccess file to those
# directories to specifically allow config.php.
<Files "config.php">
    order allow,deny
    deny from all
</Files>

# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
 RewriteCond %{QUERY_STRING} http\: [OR]

#OR if the URI contains a "["
 RewriteCond %{QUERY_STRING} \[ [OR]

#OR if the URI contains a "]"
 RewriteCond %{QUERY_STRING} \] [OR]

#OR if the URI contains a "<__script__>"
 RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]

#OR if the script trying to set a PHP GLOBALS variable via URL
 RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]

#OR if any script is trying to modify a _REQUEST variable via URL
 RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) [OR]

# #OR if the URI contains a double slash
 RewriteCond %{QUERY_STRING} // [OR]

# #OR if the URI contains a *
 RewriteCond %{QUERY_STRING} \*

#then deny the request (403)
 RewriteRule ^.*$ - [F,L]
# End URL Filtering

# No sense advertising what we are running
ServerSignature Off

# HTTP response header forced to be "Server: Apache" only
# Sometimes this istruction must be saved inside httpd.conf or apache.conf or sites-enabled instead of .htaccess
ServerTokens Prod
3) {metatags} is present in all templates


I don't think it's a .htaccess issue since other settings work ok.
If I change RewriteBase / to RewriteBase /wibble then I get a 500 error, which shows that .htaccess settings are taken into account.

Perhaps a conflict with the URL Filtering statements? Even if I take them out, I still get the same result, so perhaps not.

Any advice welcome

Regards

Ben
Last edited by kurashiki_ben on Thu Dec 24, 2009 1:53 pm, edited 1 time in total.
kurashiki_ben
Forum Members
Forum Members
Posts: 86
Joined: Sun Jul 05, 2009 2:37 am

Re: Enabled Pretty URLs, getting a "No input file specified." Error

Post by kurashiki_ben »

php.ini contents are:

Code: Select all

[PHP]
default_charset = "utf-8"
engine = On
zend.ze1_compatibility_mode = Off
short_open_tag = On
asp_tags = Off
precision    =  14
y2k_compliance = On
output_buffering = Off
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = On
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions = exec, show_source, shell_exec, system, popen, proc_open, proc_nice, ini_restore, passthru,dl
disable_classes =
expose_php = Off
max_execution_time = 30
max_input_time = 60
memory_limit = 64M
error_reporting = E_ALL & ~E_NOTICE
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
variables_order = "GPCS"
register_globals = Off
register_long_arrays = On
register_argc_argv = On
auto_globals_jit = On
post_max_size = 8M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
include_path = ".:/usr/local/php5/share/pear:/usr/local/share/adodb"
doc_root =
user_dir =
enable_dl = On
cgi.fix_pathinfo=1
file_uploads = On
upload_max_filesize = 4M
allow_url_fopen = Off
allow_url_include = Off
default_socket_timeout = 60
[Date]
[filter]
[iconv]
[sqlite]
[xmlrpc]
[Pcre]
[Syslog]
define_syslog_variables  = Off
[mail function]
SMTP = localhost
smtp_port = 25
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.allow_persistent = Off
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLi]
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mSQL]
msql.allow_persistent = On
msql.max_persistent = -1
msql.max_links = -1
[OCI8]
[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase]
sybase.allow_persistent = On
sybase.max_persistent = -1
sybase.max_links = -1
sybase.min_error_severity = 10
sybase.min_message_severity = 10
sybase.compatability_mode = Off
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Informix]
ifx.default_host =
ifx.default_user =
ifx.default_password =
ifx.allow_persistent = On
ifx.max_persistent = -1
ifx.max_links = -1
ifx.textasvarchar = 0
ifx.byteasvarchar = 0
ifx.charasvarchar = 0
ifx.blobinfile = 0
ifx.nullformat = 0
[Session]
session.save_handler = files
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly = 
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor     = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.secure_connection = Off
[Assertion]
[COM]
[mbstring]
[FrontBase]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
[Zend]
zend_optimizer.optimization_level=15
zend_optimizer.enable_loader=0
zend_optimizer.disable_licensing=0
zend_extension_manager.optimizer="/usr/local/php5/lib/php/Optimizer"
zend_extension_manager.optimizer_ts="/usr/local/php5/lib/php/Optimizer_TS"
zend_optimizer.version=3.3.0
zend_extension=/usr/local/php5/lib/php/ioncube/ioncube_loader_fre_5.2.so
zend_extension_ts=/usr/local/php5/lib/php/ioncube/ioncube_loader_fre_5.2_ts.so
zend_extension="/usr/local/php5/lib/php/ZendExtensionManager.so"
zend_extension_ts="/usr/local/php5/lib/php/ZendExtensionManager_TS.so"
kurashiki_ben
Forum Members
Forum Members
Posts: 86
Joined: Sun Jul 05, 2009 2:37 am

Re: Enabled Pretty URLs, getting a "No input file specified." Error

Post by kurashiki_ben »

How remiss of me not to state my versions!
CMS 1.6.5
PHP version 5.2.8
MySQL 5.1.30


Could this be related to the following in php.ini:
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
?

Regards

Ben
User avatar
tern
Forum Members
Forum Members
Posts: 65
Joined: Tue Oct 16, 2007 1:00 pm

Re: Enabled Pretty URLs, getting a "No input file specified." Error

Post by tern »

i having the same problem as u too.
thank you cms made simple. cms made possible:
www.redstarz.net
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Enabled Pretty URLs, getting a "No input file specified." Error

Post by Dr.CSS »

First off / is not a page extension, .html, .php, .asp, etc. are...

For the life of me I don't understand why people try to use it as one...

The RewriteBase / is for sites that are in a subfolder of the root like mydomain.com/mycmsms so you need to comment it out...
kurashiki_ben
Forum Members
Forum Members
Posts: 86
Joined: Sun Jul 05, 2009 2:37 am

Re: Enabled Pretty URLs, getting a "No input file specified." Error

Post by kurashiki_ben »

Dr. CSS wrote: First off / is not a page extension, .html, .php, .asp, etc. are...

For the life of me I don't understand why people try to use it as one...

The RewriteBase / is for sites that are in a subfolder of the root like mydomain.com/mycmsms so you need to comment it out...
Dr CSS,

Thanks for your reply.
Had no idea about the / . I think that was the default setting.
==> solved

Thanks again!

Ben
Locked

Return to “[locked] Installation, Setup and Upgrade”