Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Index.php not being served

Status
Not open for further replies.

jaymax2U

Technical User
Oct 1, 2008
47
US
I am having problems processing index.php files when pointing to a directory. My test.php runs fine showing all the details of the PHP Version 5.2.12 installation.

The server is an Apache/2.2.11 (FreeBSD)

The serving page is from a virtual domain, which for all other purposes functions well.

The httpd.config file has the following defaults checked
index.html and index.html

==>
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.htm
</IfModule>
<==

Is there something else I am missing?


Even more troubling, when I put the index.php explicitly in the URL it does not serve or display the page

Thanks


Title: index.php not being served
 
Yes there is - here it is

Request from Directory

Access log
nn.pp.qq.xxx - jaymax2 [24/Apr/2010:10:37:12 -0700] "GET /catalog/ HTTP/1.1" 500 -

Error log
[Sat Apr 24 10:37:12 2010] [error] [client nn.pp.qq.xxx] PHP Warning: require(includes/languages/.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/local/ on line 288, referer: [Sat Apr 24 10:37:12 2010] [error] [client nn.pp.qq.xxx] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/include/php:/usr/local/bin/php:/usr/local/etc/php:/usr/local/lib/php:/usr/local/share/deplate/lib/php') in /usr/local/ on line 288, referer:

___________________________________________________________


Requests from Explicit URL

Access log
nn.pp.qq.xxx - jaymax2 [24/Apr/2010:11:01:53 -0700] "GET /catalog/index.php HTTP/1.1" 500 -

Error log
[Sat Apr 24 11:01:53 2010] [error] [client nn.pp.qq.xxx] PHP Warning: require(includes/languages/.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/local/ on line 288
[Sat Apr 24 11:01:53 2010] [error] [client nn.pp.qq.xxx] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/include/php:/usr/local/bin/php:/usr/local/etc/php:/usr/local/lib/php:/usr/local/share/deplate/lib/php') in /usr/local/ on line 288
 
On my server I use the 'DirectoryIndex' directive and make sure index.php is listed there. Then whenever you hit that directory it will search for 'index' files in the order they are listed in the DirectoryIndex directive. I change the order around depending on if a site will be mostly serving up .html files or .php or something else...

Here is an example snipped out of my Vhosts.conf file...

ServerPath /var/DocumentRoot /var/
DirectoryIndex index.php index.html index.cgi index.shtml index.htm index.pl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top