Solved

My PHP project is showing the PHP source code

Posted on 2008-10-16
5
349 Views
Last Modified: 2013-12-13
My PHP project is not only NOT working, but is also showing the PHP code when i view source.

I have uninstalled both PHP and Apache, rebooted, reinstalled apache, reinstalled PHP, and still have same issue.

I am not so much concerned with the project not working, but am sure both issues are taking place for the same reason...what ever that might be.

The only think i can note, is that before i uninstalled and reinstalled both programs, my first attempt to fix this was to  just uninstall PHP, reboot, then reinstall. When i did this i got an error stating httpd.conf issue. I did a google search on it and found out that their were more then one httpd.conf files due to reinstalling apache in the past. So as noted originally, i uninstalled both Apache and PHP, deleted any extra httpd.conf files that were found, rebooted and reinstalled...

Any Ideas?

I am running this on Windows Xp
Apache 2.2.9
PHP 5.2.6
MySQL 5.0
0
Comment
Question by:matrix1324
5 Comments
 
LVL 9

Expert Comment

by:chingmd
ID: 22735237
You are going to need to post portions of your httpd.conf file.  

My initial guess is that you need to make sure that you have the proper php handlers setup.

here is a how to  Look at the information in the red boxes.  that's the portion of the config file that make php execute.

http://www.evaria.com/v3/index/article/19/how-to-install-php5-on-windows.html
0
 
LVL 6

Accepted Solution

by:
thebradnetwork earned 500 total points
ID: 22737846
You need these 3 lines in your http.conf file.
Make sure that you have the latest version of PHP installed and make sure that that first line is pointed to your php5apache2_2.dll ...what i posted is the default.
Also make sure that you have selected PHP when you were running the installed.

LoadModule php5_module "c:/program files/php/php5apache2_2.dll" 

AddType application/x-httpd-php .php 

PHPIniDir "c:/program files/php" 

Open in new window

0
 

Author Comment

by:matrix1324
ID: 22745187
Thanks, i will check this out and post back
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now