Current location: Hot Scripts Forums » Other Discussions » Web Servers » (beginner) a question for you.


(beginner) a question for you.

Reply
  #1 (permalink)  
Old 07-03-07, 12:16 PM
alexandergre alexandergre is offline
New Member
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
I am beginner and I have a question.

Hi,
I am using WAMP5 version1.7.2. on xp sp2 and dreamweaver 8 as my editor.
I do not understand one thing. I have downloaded a super simple PHP News script. and copied the files to my root folder. Please download the attached file.
Problem:
when I click on "Post a news" the post.php opens but get this codes in the top of the page:

PHP Code:

"; $btitle = ""; $etitle = ""; $bdate = " Posted on:"; $edate = ""; $bpost = ""; $epost = ""; $etable = "


"; //Define PHP Date format. Used for the default date form value. 
$defdate=date("m/d/Y"); //Other notes //The date is automatically set to todays date by using PHP to echo the //variable of defdate. The form action uses this file itself to process the //data. // The If/Else statements decide what is displayed based on whether a HTTP GET // or POST was issued by the browser. GET: If the submit button has not been // pushed -- display form. PUT: Submit button has been pushed -- write data to // text file and display confirmation message. //IF browser does not send a POST request (ie: if submit has not been pressed) //then display the form.... if ($_SERVER['REQUEST_METHOD'] != 'POST'){ //If able to open file do... if ($file) { ?> 
How can I make it work using wamp server?
How can I set the a file to chmod 766?
Every time I use some downloaded script from internet I get this error when I click on submit form or send mail:

Forbidden

You don't have permission to access /Site1/news/< on this server.

what is this? How can I have the permission? is this about chmod 766?

thasnx
Attached Files
File Type: zip Site1.zip (5.8 KB, 96 views)

Last edited by alexandergre; 07-03-07 at 12:44 PM.
Reply With Quote
  #2 (permalink)  
Old 07-04-07, 03:41 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
the reason why you're seeing the php code is probably because the short_open_tags setting in the php.ini file is set to off. Check if the post.php script opens with: <? instead of <?php
if this is the case you will either have to change the opening tag in the page, or change the setting to On in the php.ini file

I'm not sure why you're getting that error, cause there aren't permissions on windows (at least not regarding your server settings). You can easily open files and folders via php, regardless of the chmod settings
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
beginner question domprofesor PHP 1 05-04-07 07:48 AM
Injecting a string into an If Statement ? nova912 PHP 4 07-21-06 02:04 PM
beginner question regarding smtp server sending mail martin_ua PHP 2 12-06-05 07:49 AM
[PHP] Array question UmiSal Script Requests 1 04-05-04 01:52 PM
question and answer software jaydifox C/C++ 0 02-21-04 09:26 AM


All times are GMT -5. The time now is 01:25 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.