PDA

View Full Version : php installation problem



ravibhatdon
May 11th, 2005, 02:47 AM
Hi I am newbie to php.
I have gone through the tutorial on this website for installing the php and Apache.
Everything is fine,but when I test the sample php program it will not show anything on the screen.it will force to download the source php file.
I have installed php-5.0.0-Win32 in D:\web. And Apache2 in D:\web.
I have not extracted the php.ini file.whether I should extrct the php.ini file?
If so where I have to extract and what modifications should I do?
please help,

Thanks.

Enigmatic
May 11th, 2005, 02:59 AM
Does the default Apache page show when you type :

http://localhost

Where abouts are you saving your .php files to ?

ravibhatdon
May 11th, 2005, 03:07 AM
Does the default Apache page show when you type :

http://localhost

Where abouts are you saving your .php files to ?

Ya, it is showing Apache defualt screen.Indicating you have installed correctely.And I am saving the .php files in D:\web\Apache2\htdocs

Enigmatic
May 11th, 2005, 03:09 AM
Just re-read your original post, when you say you haven't extracted the php.ini file, are you saying you havent installed PHP on your machince yet ?

If that is so, then you need to install it using the instructions in the tutorial.

teiz77
May 11th, 2005, 03:18 AM
place a text file in your webroot with the only content

<? phpinfo(); ?>

rename it to test.php

open http://localhost/test.php in your browser.

What do you see?

ravibhatdon
May 11th, 2005, 03:29 AM
place a text file in your webroot with the only content

<? phpinfo(); ?>

rename it to test.php

open http://localhost/test.php in your browser.

What do you see?

Again the same problem(force to download the test.php)

ravibhatdon
May 11th, 2005, 03:35 AM
Just re-read your original post, when you say you haven't extracted the php.ini file, are you saying you havent installed PHP on your machince yet ?

If that is so, then you need to install it using the instructions in the tutorial.

In the tutorial page 3
they have given
Step 3 - Installing PHP
You downloaded the zip, did you not? If you didn't, hop back to Page 1 (../web/apache_php.htm).

Alright. To speed us ahead a few minutes, I uploaded the php.ini (../web/code/php.zip) file which you are to extract and place in your Windows root. Apache must be able to access it. For Windows 98/ME/XP it is C:\Windows and for Windows NT or 2000 it is C:\WINNT (file:///C:/WINNT).

If you did not base this tutorial on the C drive, then you must open php.ini and find+replace all matching "C:\" results with whichever drive you used. Don't forget to change the Windows to WINNT if you are using NT or 2000, since that ini was generated on an XP box.

Open up php-5.0.0-Win32.zip and extract it all to C:\web\php.

I have downloaded the php.ini and extrcted the php.ini file into C:\Windows and find+replace all matching C:\ with D:\.
But again it is showing the same problem(force to download ).What is wrong ?

teiz77
May 11th, 2005, 03:39 AM
are you running windows XP Professional? If so you should run IIS in combination with PHP. Works perfect. Otherwise try installing an all-in-one package like http://www.en.wampserver.com/

* edit: Also, use the installer package of PHP not the zip file.

ravibhatdon
May 11th, 2005, 04:41 AM
are you running windows XP Professional? If so you should run IIS in combination with PHP. Works perfect. Otherwise try installing an all-in-one package like http://www.en.wampserver.com/

* edit: Also, use the installer package of PHP not the zip file.

How to run IIS with PHP?

teiz77
May 11th, 2005, 04:47 AM
1. make sure IIS works correctly. (uninstall apache)
2. Run the PHP installer package
3. Make sure the PHP dir and executable files inside that dir are executable and readeble by the IUSR_<computername>. And that the upload_temp_dir and session_data dir are also writable by the IUSR_<computername>.

Voila