Newbie Question: Getting a simple script to work.

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Goldmund
-


Joined: 19 Feb 2005
Posts: 19
Location: Seattle, WA

PostPosted: Sat Feb 19, 2005 8:45 pm    Post subject: Newbie Question: Getting a simple script to work. Reply with quote

Hi-
I recently installed Abyss Web Server, and installed PHP 5.0.3 with it to locally test scripts before paying a monthly fee to a web host company. Anyway, since I am very new at this, I was wondering if anyone could give me a brief tutorial on how to test a simple script like:

---------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=ansi" />
<title>Your Feedback</title>
</head>
<body>
<?php print ("Hi"); ?>
</body>
</html>
----------------------------------------------------------------------------------

And get it to appear on my local server browser?

Thanks!
_________________
You learn something new every day.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Feb 19, 2005 8:53 pm    Post subject: Re: Newbie Question: Getting a simple script to work. Reply with quote

Goldmund,

Go to your htdocs/ directory (located inside the Abyss Web Server directory), create a file called test.php and open it using a text editor (such as Windows Notepad) and enter the script source code there. Save the file and go to your browser and request the URL http://127.0.0.1/test.php .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Goldmund
-


Joined: 19 Feb 2005
Posts: 19
Location: Seattle, WA

PostPosted: Sat Feb 19, 2005 9:46 pm    Post subject: Reply with quote

Thanks for the info, but it's still not working. I get an error 404 when I type http://ipaddress/test.php into the URL. I'm not sure what's going on. Anyone have any ideas?

Thanks again.
_________________
You learn something new every day.
Back to top View user's profile Send private message
roganty
-


Joined: 08 Jun 2004
Posts: 357
Location: Bristol, UK

PostPosted: Sun Feb 20, 2005 7:13 pm    Post subject: Reply with quote

Goldmund wrote:
Thanks for the info, but it's still not working. I get an error 404 when I type http://ipaddress/test.php into the URL. I'm not sure what's going on. Anyone have any ideas?


check to see if the file isn't saved as "test.php.txt".
if it is then, open the file, and then save it as "test.php" (including the quotes) it should then save it as "test.php" (without the quotes). then try again.
when you view the folder in windows explorer, the file will have the unknown icon, double-click, and when the open with box opens, select "notepad" and making sure that the "Always use this program to open this file" is ticked, then click "Ok" or "Open".
then you won't have to type the quotes every time.

if it isn't check to make sure that the file is saved in the "htdocs" folder
_________________
Anthony R

Roganty
| Links-Links.co.uk
Back to top View user's profile Send private message Visit poster's website
Goldmund
-


Joined: 19 Feb 2005
Posts: 19
Location: Seattle, WA

PostPosted: Sun Feb 20, 2005 8:58 pm    Post subject: Reply with quote

Okay so I opened the test.php (unknown document) with notepad and now the icon looks like a a piece a paper with a notepad on it. It's also in my htdocs folder and it still doesn't work. Do I need to do something else on my console? With the server parameters or something? I really don't understand why it's not working.

Thanks for your help guys. Much appreciated!
_________________
You learn something new every day.
Back to top View user's profile Send private message
Goldmund
-


Joined: 19 Feb 2005
Posts: 19
Location: Seattle, WA

PostPosted: Mon Feb 21, 2005 1:38 am    Post subject: Reply with quote

It was the console port number!!! That's what was gave me three days of frustration. Well now everything works. Thanks for helping guys.
_________________
You learn something new every day.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group