Jump to content

Problems with Installing


Recommended Posts

Hello,

 

I've installed PHP 5.2.5 manually onto my Win XP Prof SP2 computer. I turned off the firewall, am running the server from a college (unfortunately), and have Apache 2.2.8.

 

I am now in the midst of trying to figure out why PHP is not showing up on my page.

 

I unzipped php to: "f:\php" and changed the php.ini-recommended to php.ini and adjusted the code for doc_root to be:

 

"F:\Apache\htdocs\".

 

I installed Apache obviously to F:\Apache

 

In any case, I altered the PATH in environmental variables to include ";F:\php".

 

When I edited the httpd.config I added the following lines:

# At the end of the loadmodule list...

 

LoadModule php5_module "F:/php/php5apache2_2.dll"

 

# After the AddType application/x-gzip .gz .tgz..

 

AddType application/x-httpd-php .php

 

# And at the very end of the httpd.conf

 

PHPIniDir "F:/php"

#Also tried it as "F:/php/"

 

 

 

Can anyone give me any hints as to what I've done wrong/need to add?  :'(

Link to comment
Share on other sites

Seems strange. PHP is loaded as an Apache as. Enable the following settings within the php:

display_errors (and ensure error_reporting is set to E_ALL)

display_startup_errors

 

Save the php.ini and restart Apache. Is there any errors reported during startup, or when running your script. Also note you don't need to set the doc_root within your php.ini.

Link to comment
Share on other sites

[Tue Feb 19 23:50:05 2008] [error] [client ---] File does not exist: F:/Apache/htdocs/favicon.ico

 

That is the only error I picked up when I connected to the page and I found that in my Apache errors log. When I set display_errors and display_startup_errors to E_ALL.

 

The error_log for my php.ini are all ; out and I'm not sure how to intialize it properly, but I tried making it output to my php folder, didn't seem to work though.

 

Changed the doc_root to blank.

 

Lastly, my page I'm testing it out on is an HTML. I have the <php? phpinfo() ?> inside the body of the page, but that should work right?

Link to comment
Share on other sites

Lastly, my page I'm testing it out on is an HTML. I have the <php? phpinfo() ?> inside the body of the page, but that should work right?

By that do you mean you have your PHP code within an HTML file (.html). If so then no it wont work. You should save your PHP code within a .php file in order for the PHP code to execute. HTML code can go inside .php files, eg:

<html>
<head>
<title>PHPInfo</title>
</head>
<body>
<?php phpinfo (); ?>
</body>
</html>

 

If you want to parse .html files as PHP you can do so by appending .html to the following line within the httpd.conf:

AddType application/x-httpd-php .php

Example:

AddType application/x-httpd-php .php .html

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.