[Fwd: Re: [sclug] Re: php problems]

Stuart Major stuartmajor at phonecoop.coop
Sat Sep 3 19:32:53 UTC 2005



-------- Original Message --------
Subject: 	Re: [sclug] Re: php problems
Date: 	Sat, 03 Sep 2005 20:32:39 +0100
From: 	Stuart Major <stuartmajor at phonecoop.coop>
To: 	Graham <lists at Information-Cascade.co.uk>
References: 	<200509022343.j82NhdHU005217 at l-oeuf.tmdg.co.uk> 
<20050903105209.6d732523.lists at Information-Cascade.co.uk>



Graham wrote:

>	Connect with gftp, SSH or the site-admin facility.
>
>	look at the files that are there - and were there when you started
>	Is there a directory called "htdocs" ?
>  
>

Hi Graham,

there was no directory called htdocs so I created one and took the 
contents of htdocs on my machine and put it in that dirctory using gFTP.

My host told me to use public but that didn't seem to work (there might 
have been some other problem).

> 
>	Thats where you place your web-files and sub-dirs.
>	(It varies with each ISP)
>  
>

I haven't changed the permissions, but perhaps I should check them?

>	You dont need to set 'permissions', thats a red-herring,
>	as you are NOT using htdocs/cgi-bin/ (yet). The key feature
>	is the filename.php extension, which tells apache to run php over it.
>	You can upload ANY kind of file, with ftp, then ask for it back with http
>
>		http://www.thebluejays.co.uk/hello.txt - with a simple message
>
>  
>

Did this and got a simple Hello back, that's what I put in the file.

>	But its more interesting to get
>
>		http://www.thebluejays.co.uk/hello.php -   <? phpinfo(); ?>
>  
>

Created hello.php using Kate with

<? phpinfo(); ?>

as it's contents and then got back a large page of details abot the php 
version.

>	If that works, rename the file to hello.html, and see if it still
>	gets pre-processed by the php part of the web-server.
>	Do you get it back raw or cooked?
>
>  
>
When I upload the same file named hello.html with the same contents

<? phpinfo(); ?>

and then try to access www.thebluejays/hello.html I get nothing, but I 
still get all the details about the php version when I try /hello.php 
despite having removed the file?

Does this shed any light on my problem?

Thanks, Stuart.



>>>>>Stuart Major wrote:
>>>>>          
>>>>>
>>The error I get is:
>>
>> Forbidden
>>
>>You don't have permission to access / on this server.
>>Apache/2.0.54 (Red Hat) Server at www.thebluejays.co.uk Port 80
>>
>>    
>>
>
>	Thats the message Apache sends instead of 'index file not found'.
>
>	You asked for a directory ('/' the root dir, which is probably $HOME/htdocs)
>	Apache auo-tried /index.html and /index.php - neither existed
>	Apache then wanted to generate an auto list of files in that dir
>	but the .htaccess configuation says dont, hence forbidden.
>
>  
>
>>>>>Then you need to tell Apache that files ending in
>>>>>          
>>>>>
>>>>".php" should be 
>>>>interpreted as PHP files.
>>>>        
>>>>
>
>	this will (probably) be already set
>
>  
>
>>>>How do I tell Apache about the .php files, I have a
>>>>index.php file that 
>>>>I presume initiates the site in some way?
>>>>
>>>>        
>>>>
>
>	you put them there,
>	you ask for them by name,
>	or index.php by special-case name
>
>--
> Graham
>_______________________________________________
>sclug mailing list
>sclug at sclug.org.uk
>http://www.sclug.org.uk/mailman/listinfo/sclug
>
>  
>




More information about the Sclug mailing list