Jump to content

Recommended Posts

Hi, this is my first day trying to use PHP.  I'm setting up Apache server 2.2x (latest build) and have downloaded PHP, and followed some manual setup steps as the automatic setup was not recommended.  Here is, more or less, what I have done:

 

1)  Download Apache 2.2x and install to standard directory

 

2)  Download PHP binary zip and install in C:\php with extensions in C:\php\ext

 

3)  Add the following to the http.config in Apache's config folder:

 

Loadfile "C:/PHP/php5ts.dll"

LoadModule php5_module "C:/PHP/php5apache2_2.dll"

PHPIniDir "C:/PHP/"

AddHandler application/x-httpd-php .php

AddHandler application/x-httpd-php-source .phps

 

4)  Add C:\PHP to Environmental Variables

 

5)  Restart the computer

 

When I start Apache and look at the error log it says:

"[sun Jun 08 16:17:50 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations"

Which I think is a good thing?

 

I feel like I'm missing a step here.  When I run, like, test.html, which basically just says:

 

<html>
Testing PHP:
<?php
echo "test taco test test";
?>

 

"Testing" comes up, but the echo isn't tossing anything out there.

 

What am I doing wrong?  I feel like there's a huge obvious step I'm missing here, like running an exe to launch PHP or something.  Any suggestions would be appreciated.  I'm in way over my head here.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/109308-apache-22x-setup-noob/
Share on other sites

You need to save your file with the .php file extension not .html

 

Also ensure you saving your php files in Apache'ss htdocs folder (eg C:/[path/to/Apache]/htdocs) and that you are going to http://localhost to run your scripts. You cannot load PHP files directly in to your web browser like you can with HTML files.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.