Dynadot

PHP on a UNIX Server...

Spaceship Spaceship
Watch
Hey guys... I'm new to this board, but have been going absolutely crazy trying to get my web site to work on a UNIX server. The problem is... I have an index.php page... This page is located within in a folder on my University web space account. I played around with permissions of both the folder, and file, but am not able to see it come up. Just typing the address in brings up a 403 forbidden error, however if you type the file name at the end of the address it does work... Just to test it out, I made a blank page in htm (index.htm vs index.php) format and uploaded that. That one is found and automatically loaded. I made the permissions identical on the php file as the htm file and it still did not work. Is there something to be done so that it automatically loads?

Many thanks for any help you can offer!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
First make sure that you actually have capabilities to use PHP on your particular server. There are some that doesn't allow you access to view. Another thing you might want to let me know so I can know whats going on fully is what do you have the permission of your directory set at. Please let me know and I will definately see how I can help.
 
0
•••
You probably need to set it in your DirectoryIndex in your apache httpd.conf file if you're using apache.

Search for a line that looks similar to this:
DirectoryIndex index.html index.htm

And add what ever file types you want to be accessed as index files (ex: index.php index.php3 index.php4)

You can find it in the /usr/local/apache/conf/ directory or something similar to that. :)
 
0
•••
that definitely sounds like it is it... thanks much... I'll talk to my Admin about it. I know that PHP support is enabled as a bulk of the pages for the curriculum here are indeed in php format... Thanks for the help.
 
0
•••
You can also specify a DirectoryIndex in a .htaccess file at the root of the referenced directory
 
0
•••
Not to sound too dumb... but how would I go about making .htaccess files?

Thanks!
 
0
•••
It's just a text file. You just open up a text file or create one and add the information in it and save it as .htaccess probably in your root directory.
 
0
•••
Since your taking about UNIX, I'm assuming you have shell access.

Just shell in and vi .htaccess (which will create the file). To do what you want, you only need one line in there which is:

Code:
DirectoryIndex index.php

If you don't have ssh/telnet access, then you can create this file with notepad on your workstation and ftp it to the directory where your index.php resides.
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back