Member Avatar for HTMLperson5

Hi,

I am trying to install PHP and have had no sucsess; the steps I have taken are shown below.

  1. Download .msi PHP installer
  2. Run Installer
  3. Download .msi APACHE installer
  4. I don't have a webserver!
  5. Open PHP
  6. Console comes up.
  7. Try following code:

    <?php echo '<p>Hello World</p>'; ?>

  8. Save as hello.php

  9. Open hello.php
  10. Does not work, instead displays:

Hello World

'; ?>

Yeah, its not supposed to show the "'; ?>"

have you tried:
<?php echo "<p>Hello World!</p>"; ?>

Try if apache web server is running. Go to your web root directory and create a simple index.htm file with the following contents:

<html><head>HTML test</head><body><p>Hello html world</p></body></html>

Open it in your browser and check if web server is running OK.

Next you can test if PHP works. Create a test.php with the following in it:

<?php phpinfo()?>

Open it in a browser and you should see a lot of tables with heaps of information about your installation. If not, something is definetely wrong.

Member Avatar for diafol

Download .msi APACHE installer
I don't have a webserver!

What does that mean? Apache will not run?

Member Avatar for HTMLperson5

What does that mean? Apache will not run?

No it will not, I ran the installer:

1. Welcome to Installation Wizard for Apache HTTP server 2#2#22 ....Next
2. Licence Agreement  ...Accept....Next
3. "Read this first" page ...Next
4. And then,heres the catch, the "Server Information" area, it asks for the Network Domain, Server name, and      Administrators email address, YOU CANNOT LEAVE THAT FIELD BLANK!

?

why not use XAMPP for a test bed?

Member Avatar for HTMLperson5

Try if apache web server is running. Go to your web root directory and create a simple index.htm file with the following contents:

I put it in htdocs, and ran it like this:

http://25.51.44.13:3010/index.html

Worked fine!
But when i tried the php test it did not work, probably because i did not configure php on Apache...How do i do it?

PS.The ip address i had used is FAKE so no sneeky peekies try and launch something unwanted at it. And yes, port 3010 is fake as well. It was all for example purposes

Have you downloaded correct versions of PHP and Apache binaries (VC6 is apparently for Apache, V9 fo IIS)? Have you installed everything in correct order?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.