Jump to content

PHP code not showing


Recommended Posts

I'm not new to the php programming language by any means, but this is my first time installing PHP and Apache.

I'm working with Windows XP. I downloaded Apache2.2.3 and it is working fine, but after installing PHP5.2.0, I tried to view a PHP file (date display page) and all it gave me was a blank screen. To be specific... shows everything EXCEPT the php.

For example, the script
[i]<html>
<head>
<title>Testing PHP</title>
</head>
<body>

<? print(Date("l F d, Y")); ?>

Hopefully this works<p>
This is frustrating!

</body>
</html>[/i]
displays

[i]Hopefully this works

This is frustrating! [/i]

As for installing PHP and Apache...
I added C:\php; to the value of the PATH environment variable.
I also added the following to the httpd.conf file:

[i]LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "c:/php"

[/i]

Finally, i changed the php.ini-recommended file to simply php.ini and changed extension_dir to "C:\php\ext"

Is this correct and is there anything i neglected to change?

I'm not sure if it helps at all, but when I open the Apache monitor, the dev5_ap1 will not start... it says it can't find the path specified.
I've double-checked the code over and over and can't seem to find anything wrong...

Thanks
Link to comment
Share on other sites

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.