# Running PHP+apache locally

**URL:** <https://forum.kirupa.com/t/running-php-apache-locally/19382>\
**Category:** programming\
**Created:** [April 27, 2003, 1:35pm UTC](https://forum.kirupa.com/t/running-php-apache-locally/19382 "2003-04-27T13:35:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mooler](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mooler](https://forum.kirupa.com/u/mooler)\
**Post date:** [April 27, 2003, 1:35pm UTC](https://forum.kirupa.com/t/running-php-apache-locally/19382/1 "2003-04-27T13:35:58Z")

</div>

Hi I´m new to this and have a question

I´ve installed apache 2.0.45 and PHP 4.2.3 and used phpdev to get it started and it checks ou ok when running through the testpages of phpdev  
But when I test my site (php+flash) php doesn´t seem to work.

Now what I wonder is do I have to run my html pages from a specific location (ie the phpdev folder) or should PHP be able to run from anywere on my computer?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 27, 2003, 2:14pm UTC](https://forum.kirupa.com/t/running-php-apache-locally/19382/2 "2003-04-27T14:14:35Z")

</div>

Make sure you have apache running, and when you come to call a script, the path should be ‘[http://127.0.0.1/script.php](http://127.0.0.1/script.php)’ 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 27, 2003, 3:27pm UTC](https://forum.kirupa.com/t/running-php-apache-locally/19382/3 "2003-04-27T15:27:30Z")

</div>

[AS]loadVariables(“[http://127.0.0.1/script.php](http://127.0.0.1/script.php)”, \_self);[/AS]

Something like this from my swf?

Can´t I call it without the “whole” path like a “local” path like this

[AS]loadVariables(“script.php”, \_self);[/AS]

or is that why my code isn´t functioning!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 27, 2003, 6:01pm UTC](https://forum.kirupa.com/t/running-php-apache-locally/19382/4 "2003-04-27T18:01:03Z")

</div>

If you place your swf inside the www folder you can use the relative path. Otherwise you’ll the full path. And, are you sure the script actually works? try calling it from a browser and make sure there are no errors 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 27, 2003, 7:52pm UTC](https://forum.kirupa.com/t/running-php-apache-locally/19382/5 "2003-04-27T19:52:40Z")

</div>

Yes the script works and I finally got it working. It was my misstake ( isn´t it always?!) didn´t now I had to have the files in the www folder 👽

Thanks alot for your time hope I´ll be able to help you sometime (not likely 😉 but who knows).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 27, 2003, 7:53pm UTC](https://forum.kirupa.com/t/running-php-apache-locally/19382/6 "2003-04-27T19:53:52Z")

</div>

haha it’s okay… let me know if you need some more help 😉
