Solved

My PHP project is showing the PHP source code

Posted on 2008-10-16
5
361 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 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