Page 1 of 1
I am not so sure where to ask this, I have problem with PHP
Posted: Sun Dec 07, 2008 7:13 pm
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.
Re: I am not so sure where to ask this, I have problem with PHP
Posted: Sun Dec 07, 2008 7:30 pm
by Eran
PHP needs a webserver to run. Do you have one installed? (such as Apache)
Re: I am not so sure where to ask this, I have problem with PHP
Posted: Sun Dec 07, 2008 7:33 pm
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.
Re: I am not so sure where to ask this, I have problem with PHP
Posted: Sun Dec 07, 2008 7:36 pm
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.
Re: I am not so sure where to ask this, I have problem with PHP
Posted: Sun Dec 07, 2008 7:51 pm
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?
Re: I am not so sure where to ask this, I have problem with PHP
Posted: Mon Dec 08, 2008 3:44 pm
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.
Re: I am not so sure where to ask this, I have problem with PHP
Posted: Tue Dec 09, 2008 10:28 pm
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.
Re: I am not so sure where to ask this, I have problem with PHP
Posted: Tue Dec 09, 2008 10:44 pm
by Luke
I moved this to "Installation and Configuration"