PHP Offline problems...

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


Joined: 30 Nov 2007
Posts: 2

PostPosted: Fri Nov 30, 2007 12:55 am    Post subject: PHP Offline problems... Reply with quote

Hi, total newbie here. I've been searching the forums for an answer, but have been unable to find one.

I want to view my PHP website offline.

I have installed Abyss 2.5 and PHP 5 on my computer, and it seems to be working because if I use the phpinfo.php file, I get a long long list of settings for the PHP. However, when I try to run my index.php file, Explorer only asks if I want to save or open the page - and if I chose open, it opens in Dreamweaver.

If I use a html-page first (index.htm), with a link to the index.php file, I can get into the index.php file - but then it won't include

Code:
<?php
include("header.php");
?>


which I really need for the site to make sense.

If I upload the entire site online on my FTP, it shows everything perfectly.

I do believe I have followed the instructions and I have only downloaded the latest versions of everything, and since the phpinfo.php works, I have understood from the tutorials that I have installed it correctly. Or at least I think so. But obviously, something is wrong.

I use Windows XP.

Could anyone be as kind as to help me?
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Nov 30, 2007 8:13 am    Post subject: Reply with quote

Hello cosmic,

Since PHP is a server-side language, you will need to run it directly from the browser. You can use the localhost (127.0.0.1) address to access your website without being online (e.g. http://localhost), but make sure you're on the computer that has Abyss installed. Opening a PHP file locally will not run your PHP code because it needs to be run through the interpreter.

Kind regards, Josh
Back to top View user's profile Send private message Visit poster's website
cosmic
-


Joined: 30 Nov 2007
Posts: 2

PostPosted: Fri Nov 30, 2007 10:00 am    Post subject: Reply with quote

It seems I'm a bit stupid about this (no surprise, this stuff always makes my head spin), but I'm trying... I'm now using Dreamweaver's "Preview" function and using the local host setting. It then tries to open: http://localhost/index.php but all I get is "404 - This page cannot be found". I am on the computer with Abyss and all that installed.

I have two hard drives (C: and X:) - does that matter when it comes to running this? The site is on X and the Abyss and PHP is installed on C. I shouldn't think it'd matter, but I tried moving the whole site to C, just to make sure that wasn't the problem. Didn't help, obviously.

*headdesk and feels dumb but very thankful for the help*
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Fri Nov 30, 2007 11:44 am    Post subject: Reply with quote

Make sure your htdocs folder points to the folder on drive X: in the console. I just wrote a tutorial on how to do this.

http://www.abyssunderground.co.uk/change-htdocs.php

404 error means the file can't be found so check that it does exist and that abyss is looking in the correct location.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
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