Reply to topic
php Not Working, Please Help
john barrett


Joined: 04 Nov 2005
Posts: 41
Location: Hawaii
Reply with quote
Hi,
I am a real newbie at php. I installed a package called wamp. I follwed all the instructions for setting up php with apache 2 on windows.

However when I put a test php in the localhost, it does not work, and I am asked if I want to download(filename.php) the test page just has:
<?php
phpinfo();
?>


Nothing shows up on any pages with php Sad
First I tried to install everything manually, but that turned out to be a nightmare. Is installing php with MySQL & Apache on windows really that difficult.
Basically I am just trying to set up a testing server at school, so I don't have to upload to HMS every time I make a change.

Any help would be great,
Thanks John[/quote]
Re: php Not Working, Please Help
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 550
Location: Harrisburg, PA
Reply with quote
john barrett wrote:
Hi,
I am a real newbie at php. I installed a package called wamp. I follwed all the instructions for setting up php with apache 2 on windows.

However when I put a test php in the localhost, it does not work, and I am asked if I want to download(filename.php) the test page just has:
<?php
phpinfo();
?>


Nothing shows up on any pages with php Sad
First I tried to install everything manually, but that turned out to be a nightmare. Is installing php with MySQL & Apache on windows really that difficult.
Basically I am just trying to set up a testing server at school, so I don't have to upload to HMS every time I make a change.

Any help would be great,
Thanks John
[/quote]

Hey There.

I've never installed PHP on Apache. However, I got it up and running flawlessly in about 10 minutes using IIS.

THIS is the website I used when setting it up. The instructions are very straight forward. If you can't get apache working, consider using IIS. I like IIS much better over apache. Don't use the automatic install for PHP since it only installs the CGI version. You have to manually install it to get it working. (It even says that on their website last time I looked)

MySQL was also very simple to install. If you still want to use apache maybe someone else can shed some light on the windows install under apache.
john barrett


Joined: 04 Nov 2005
Posts: 41
Location: Hawaii
Reply with quote
Hi,
Thanks os much for your help`-`
I will try this when I go to school tomorrow:)
Here is a dumb question:
Does Windows XP have IIS? I assume that it does, since it is a windows web server. I am a mac guy, and the mac comes with apache, and so I think that the windows must come with IIS. My thinking is that window users still want a web server. Well I am hoping, as I really want to create a testing server for php.

Thanks again,
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 550
Location: Harrisburg, PA
Reply with quote
john barrett wrote:

Does Windows XP have IIS?


Sure Does. Windows XP Pro Comes with IIS 5 (Which only allows one website)

Windows 2003 comes with IIS 6 (Which Allows unlimited websites)

Windows XP Home does not support the installation of IIS. So if you have XP Home, you'll have to use apache.


IIS on windows XP is not installed by default. You'll have to add it via the "Add/Remove Programs" --"Add/Remove Windows Components" within it in the control panel.

(Go HERE for install instructions)

If you run into any problems, let me know. Good Luck! Very Happy
cheryl


Joined: 17 Apr 2004
Posts: 84
Location: Newark, DE
Reply with quote
How are you defining the mime type in the apache configuration for PHP? Normally I use
AddType application/x-httpd-php .php

Also - are you loading the module properly? Are there any errors at startup?
rob_hms


Joined: 20 Sep 2006
Posts: 4
Reply with quote
John,

If you view the source of the test PHP page you created, does the PHP code display or is the page just blank? If you see the code, Apache is not handling .php files correctly. While, I've never used Apache on Windows, in Linux I would make sure that somewhere in your Apache configuration files, you have something like this:

Code:
AddType application/x-httpd-php .php


If the page is simply blank, there's probably a problem with PHP. You might try turning on display_errors in your php.ini file and then restarting Apache. If there is a PHP error it will now be displayed instead of just a blank page.

Hope this helps!
php Not Working, Please Help
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic