Click to See Complete Forum and Search --> : PHP doesn't seem to work


blaster_master
12-24-2004, 07:09 PM
Hi everyone,

I've installed Apache 1.3.xx, MySQL and PHP 4 (binary) on my PC. I created a test php file and opened it and worked ok. However the php file doesn't seem to be compiled into html and as a result it wouldn't open. I only have the option to save the file to my hard disk (which is not what I want).

So, again, Apache is working, PHP scripting isn't.

Also to mention, I haven't done any changes to php.ini. The file is in the right place by the way...

So can some one help me? Thanks in advance

Did I mention that I'm a total n00b into php?

laserlight
12-25-2004, 04:01 AM
What steps did you take in the installation?

blaster_master
12-26-2004, 08:10 PM
ok lets see... first i installed the installer version, but realized that it wasn't what i needed. so i then downloaded and extracted the binary version on top.
added the necessary lines to httpd.conf:

ScriptAlias /php/ "c:/Program Files/PHP/"
AddType application/x-httpd-php .php

# For PHP 4
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"

# specify the directory where php.ini is
SetEnv PHPRC C:/windows/

as a result apache worked fine, however the sample php page i wrote didn't show anything. what happened was that the apache sever did its job when i typed the address (http://localhost....), but there was nothing on the page (in my code i had used an echo command, but when executed in browser nothing was on the page).

thnx

blaster_master
12-26-2004, 08:11 PM
ok lets see... first i installed the installer version, but realized that it wasn't what i needed. so i then downloaded and extracted the binary version on top.
added the necessary lines to httpd.conf:

ScriptAlias /php/ "c:/Program Files/PHP/"
AddType application/x-httpd-php .php

# For PHP 4
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"

# specify the directory where php.ini is
SetEnv PHPRC C:/windows/

as a result apache worked fine, however the sample php page i wrote didn't show anything. what happened was that the apache sever did its job when i typed the address (http://localhost....), but there was nothing on the page (in my code i had used an echo command, but when executed in browser nothing was on the page).

thnx

blaster_master
12-26-2004, 08:13 PM
ok lets see... first i installed the installer version, but realized that it wasn't what i needed. so i then downloaded and extracted the binary version on top.
added the necessary lines to httpd.conf:

ScriptAlias /php/ "c:/Program Files/PHP/"
AddType application/x-httpd-php .php

# For PHP 4
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"

# specify the directory where php.ini is
SetEnv PHPRC C:/windows/

then put the php.ini file into my windows directory -but didn't alter it. also moved all the files in the "dlls" and "sapi" folders into the main php dir.

as a result apache worked fine, however the sample php page i wrote didn't show anything. what happened was that the apache sever did its job when i typed the address (http://localhost....), but there was nothing on the page (in my code i had used an echo command, but when executed in browser nothing was on the page).

thnx

blaster_master
12-26-2004, 08:15 PM
ok lets see... first i installed the installer version, but realized that it wasn't what i needed. so i then downloaded and extracted the binary version on top.
added the necessary lines to httpd.conf:

ScriptAlias /php/ "c:/Program Files/PHP/"
AddType application/x-httpd-php .php

# For PHP 4
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"

# specify the directory where php.ini is
SetEnv PHPRC C:/windows/

then put the php.ini file into my windows directory -but didn't alter it. also moved all the files in the "dlls" and "sapi" folders into the main php dir.

as a result apache worked fine, however the sample php page i wrote didn't show anything. what happened was that the apache sever did its job when i typed the address (http://localhost....), but there was nothing on the page (in my code i had used an echo command, but when executed in browser nothing was on the page).

thnx

blaster_master
12-26-2004, 08:53 PM
ok lets see... first i installed the installer version, but realized that it wasn't what i needed. so i then downloaded and extracted the binary version on top.
added the necessary lines to httpd.conf:

ScriptAlias /php/ "c:/Program Files/PHP/"
AddType application/x-httpd-php .php

# For PHP 4
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"

# specify the directory where php.ini is
SetEnv PHPRC C:/windows/

then put the php.ini file into my windows directory -but didn't alter it. also moved all the files in the "dlls" and "sapi" folders into the main php dir.

as a result apache worked fine, however the sample php page i wrote didn't show anything. what happened was that the apache sever did its job when i typed the address (http://localhost....), but there was nothing on the page (in my code i had used an echo command, but when executed in browser nothing was on the page).

thnx

blaster_master
12-26-2004, 10:55 PM
ok lets see... first i installed the installer version, but realized that it wasn't what i needed. so i then downloaded and extracted the binary version on top.
added the necessary lines to httpd.conf:

ScriptAlias /php/ "c:/Program Files/PHP/"
AddType application/x-httpd-php .php

# For PHP 4
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"

# specify the directory where php.ini is
SetEnv PHPRC C:/windows/

then put the php.ini file into my windows directory -but didn't alter it. also moved all the files in the "dlls" and "sapi" folders into the main php dir.

as a result apache worked fine, however the sample php page i wrote didn't show anything. what happened was that the apache sever did its job when i typed the address (http://localhost....), but there was nothing on the page (in my code i had used an echo command, but when executed in browser nothing was on the page).

thnx

blaster_master
12-26-2004, 10:56 PM
ok lets see... first i installed the installer version, but realized that it wasn't what i needed. so i then downloaded and extracted the binary version on top.
added the necessary lines to httpd.conf:

ScriptAlias /php/ "c:/Program Files/PHP/"
AddType application/x-httpd-php .php

# For PHP 4
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"

# specify the directory where php.ini is
SetEnv PHPRC C:/windows/

as a result apache worked fine, however the sample php page i wrote didn't show anything. what happened was that the apache sever did its job when i typed the address (http://localhost....), but there was nothing on the page (in my code i had used an echo command, but when executed in browser nothing was on the page).

thnx

blaster_master
12-26-2004, 11:00 PM
ok lets see... first i installed the installer version, but realized that it wasn't what i needed. so i then downloaded and extracted the binary version on top.
added the necessary lines to httpd.conf:

ScriptAlias /php/ "c:/Program Files/PHP/"
AddType application/x-httpd-php .php

# For PHP 4
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"

# specify the directory where php.ini is
SetEnv PHPRC C:/windows/

as a result apache worked fine, however the sample php page i wrote didn't show anything. what happened was that the apache sever did its job when i typed the address (http://localhost....), but there was nothing on the page (in my code i had used an echo command, but when executed in browser nothing was on the page).

thnx