/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] installed XAMPP, still can’t run PHP offline

Hello all.

I installed XAMPP 1.6.3a so that I could test out contact forms without having to upload the pages online. The installation went perfectly, but I still can’t run PHP scripts offline. I’m sure it’s something obvious that I can’t see, so I was wondering if anyone here could tell me what I need to do to make it work. Currently, this is what pops up if I hit ‘submit’ offline. ?

“; exit; } // prepare email body text $Body = “”; $Body .= “Name: “; $Body .= $Name; $Body .= “n”; $Body .= “n”; $Body .= “Organization: “; $Body .= $Organization; $Body .= “n”; $Body .= “n”; $Body .= “Website: “; $Body .= $Website; $Body .= “n”; $Body .= “n”; $Body .= “Comments: “; $Body .= “n”; $Body .= $Comments; $Body .= “n”; // send email $success = mail($EmailTo, $Subject, $Body, “From: <$EmailFrom>”); // redirect to success page if ($success){ print “”; } else{ print “”; } ?>

these are the affected pages, by the way, if anyone wanted to look at the code:
[url]http://aicasdaiga.com/contact.html[/url]
[url]http://aicasdaiga.com/contact.php[/url]

The forms work fine online, though. I’m running Windows XP SP2, Firefox 2.0.0.3. Thanks in advance!

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@jcalauthorAug 14.2007 — EDIT: I guess I had to put my website directory in the c:xampphtdocs folder for it to work. Is there a way to do it so that it doesn't have to be stuck in there? I'd like to be able to test the files from any directory.
Copy linkTweet thisAlerts:
@YelgnidrocAug 14.2007 — I may be wrong but I think you need to have your websites in the c:xampphtdocs folder which you really want from a security point of view.
Copy linkTweet thisAlerts:
@NogDogAug 14.2007 — Yes, it will have to be under the htdocs directory, but you can use any sub-directory under that directory, too. Also, you can probably create a short-cut from htdocs to another directory outside of that directory tree, then call it as though it were a subdirectory of htdocs.
Copy linkTweet thisAlerts:
@jcalauthorAug 14.2007 — Thanks for the quick replies, guys. I just made a desktop shortcut to the htdocs folder. Easy enough fix. ?
×

Success!

Help @jcal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...