I am not so sure where to ask this, I have problem with PHP

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
foody
Forum Newbie
Posts: 9
Joined: Sun Dec 07, 2008 7:07 pm

I am not so sure where to ask this, I have problem with PHP

Post by foody »

I got this annoying problem. I am trying to write a simple PHP code, so I install DreamWeaver and start a fresh project as php. It fills it up with default HTML code and I enter the following line of code:

<?php echo $_SERVER['SCRIPT_NAME']."<br>"; ?>, you know for testing purposes. I end up when I save it as .php and open it in firefox I get this:

"; ?>

instead. I checked out and the reason that happens because I did not install php into my hard drive, but that is not true, I went to php.net installed the .EXE setup, followed the instructions and I still face the problem as if I have done nothing at all. Please can someone help me in this? Thanks in advance.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: I am not so sure where to ask this, I have problem with PHP

Post by Eran »

PHP needs a webserver to run. Do you have one installed? (such as Apache)
foody
Forum Newbie
Posts: 9
Joined: Sun Dec 07, 2008 7:07 pm

Re: I am not so sure where to ask this, I have problem with PHP

Post by foody »

I do, but I don't know how to configure it to work correctly. Could you please provide me step by step instructions in how to get it working? Thanks in advance.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: I am not so sure where to ask this, I have problem with PHP

Post by Eran »

There are several packages for getting PHP up and running - check out WampServer and XAMPP to name few. Also google "installing php" and you will find plenty of relevant information.
foody
Forum Newbie
Posts: 9
Joined: Sun Dec 07, 2008 7:07 pm

Re: I am not so sure where to ask this, I have problem with PHP

Post by foody »

But that is the funny thing is, I do have WampServer installed and still face this problem. That is why i am asking there must be something I am doing wrong or configuration problem or something. I am not familiar with this, can someone help me please?
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: I am not so sure where to ask this, I have problem with PHP

Post by greyhoundcode »

Are you saving your .php files in the correct directory?

WampServer isn't something I use personally, but, for example it may well be the case that there is a directory on your system like C:/Program Files/Wamp/www/ which acts as the 'root' directory, and that'll be where you need to place your files.
htdung
Forum Newbie
Posts: 17
Joined: Sun Apr 27, 2008 6:35 am

Re: I am not so sure where to ask this, I have problem with PHP

Post by htdung »

If you use window XP, download the installer of PHP installer
http://php.net/get/php-5.2.8-win32-inst ... m/a/mirror

During the install proccess, let choose IIS ISAP module option in the Web Server Setup Step. The other steps, they are up to you.

That's the right option to setup for IIS6 use PHP to read PHP Script.
Hope this can help you.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: I am not so sure where to ask this, I have problem with PHP

Post by Luke »

I moved this to "Installation and Configuration"
Post Reply