Click to See Complete Forum and Search --> : How can i run the script of PHP, Help me,please


azizul
09-02-2002, 08:52 AM
I have installed windows 98 SE in C:\Windows
Then i install Mysql in c:\mysql (version: mysql-3.23.28-gamma-win)
and Apache in C:\Program Files\Apache Group\Apache\htdocs (version:1.3)
and PHP in c:\PHP (version:php-4.0.4pl1-Win32)

I copied the file php.ini-optimized to c:\windows by renaming to
php.ini , and i also copied php4ts.dll to c:\windows\system
but i can't configure the php.ini file.
I also configured file httpd.conf file of apache.
I have just join the following line to the end of the httpd.conf file:

#LoadModule php4_module c:/php/sapi/php4apache.dll
#ScriptAlias /php/ "C:/php/"
#Action application/x-httpd-php "/php/php.exe"
#AddType application/x-httpd-php .php

I give the '#' number sign before each line,did i right?
Mysql is running well.
When i click to the "Start\Programs\Apache Web Server\Documentation\Local"
that file then my browser open with apache documentation
the URL is:http://127.0.0.1/manual/index.html

I have describe all.But my problem is that,I can't know
how can i run the script of PHP like info.php file
which include <?php phpinfo() ?> this script,and where i will
save my script.PLEASE HELP ME.
my address is azizulhuq@yahoo.com

yelvington
09-02-2002, 10:42 AM
You should post installation questions in the installation forum, not the site feedback forum.

The # sign is used to indicate a comment, which is ignored by Apache.

# this is a comment

Uncomment the directives in php.ini.

muhammad qasim
09-16-2002, 08:20 AM
check DocumentRoot setting in APACHI configuration file and change it according to your requirement.
and place your php file in this folder.


suppose..
the documentroot setting is
DocumentRoot "c:\intetpub\wwwroot"

then you'll have to save the php file it into this folder. if you like you will create a folder in this folder and save the file into it.

suppose if you create a folder named "test" in wwwroot directory then the url will be :

http://localhost/test/yourfile.php

muhammad qasim
09-16-2002, 08:27 AM
if previous sloution is complicated then there is step by step
solution.

Apache on Windows


Introduction
Apache is the most popular web server in the world. It is available on most platforms and can be downloaded from http://www.apache.org/dist/binaries/win32/


Installing Apache
Its easy to install Apache 1.3.12 if you are careful. Download the win32 binary installer. I installed my copy in D:\APACHE. You will need to modify APACHE\CONF\HTTPD.CONF with a text editor.
If you have not done so yet, choose the directory you want for the root directory, say D:\INETPUB\WWWROOT

Find the DocumentRoot setting. Change it to:

DocumentRoot "D:/inetpub/wwwroot"

Find the Directory setting. Change it to:

<Directory "D:/inetpub/wwwroot">

If you have PWS or IIS running on port 80, you will need to change Apache's port, like I did. I found the Port setting and changed it to 3000 with:

Port 3000


Installing PHP for Apache
I ran the EasyWindows PHP installer to install PHP in D:\INETPUB\SCRIPTS\PHP.

Then I added the following lines:


# Path to PHP.EXE directory -- change ScriptAlias to suit your config.
ScriptAlias /php4/ "C:/inetpub/scripts/php/"
Action application/x-httpd-php4 "/php4/php.exe"
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4 .php3

To set default documents to open in a directory, modify the DirectoryIndex entry. Eg.:

DirectoryIndex index.html index.php index.php3

Stop and restart Apache (Look for the Apache Group in Start menu, Programs).

Then you will be able to run .PHP and .PHP3 files.