Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 10th, 2006, 10:16 PM
metropolis2k metropolis2k is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 3 metropolis2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 14 sec
Reputation Power: 0
Question PHP pages won't load, show source code (Apache 2/PHP 5)

I am trying to set up a web server on my windows xp machine. I chose to run Apache (2, latest version), PHP 5 and MySQL. At first I tried it with IIS but that didn't work out quite as I anticipated (didn't show ASP pages, so I figured PHP scripts wouldn't run with it either). So what I did, I uninstalled IIS and downloaded and installed Apache 2 and configured it the default way. Edited the httpd.conf file using the recommended settings etc. After this I used the PHP 5 zip distribution file and unpacked it to c:\php. I edited the php.ini file using the way that php.net describes it to do. Now, when I'm starting the apache server and attempt to load a simple php script test file, it just displays the source code of the script, instead of actually executing it. I have tried everything to overcome this problem (changed short_open_tag to on in php.ini, added the recommended lines to the apache httpd.conf file etc) but nothing works and it's driving me crazy.

Anybody here able to help me with that? It would be much appreciated.

Rudy

Reply With Quote
  #2  
Old April 11th, 2006, 08:43 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 17
"didn't show ASP pages, so I figured PHP scripts wouldn't run with it either" - Although this isn't necessarily true, I think Apache is a better option for PHP.

I would like to clarify first, as I don't see that you've stated it... You have your PHP file in Apache's home directory and are trying to access it with your browser pointed at http://localhost/somefile.php correct?

Have you added the lines to the apache conf file for AddType and LoadModule?
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #3  
Old April 11th, 2006, 09:27 AM
metropolis2k metropolis2k is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 3 metropolis2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 14 sec
Reputation Power: 0
I have configured c:\web as my apache webdir and consequently have added the two lines you mentioned (loadmodule and addtype) to my conf file. Still showing php source code though (and it's only a simple time/date display script too)

Reply With Quote
  #4  
Old April 11th, 2006, 10:39 AM
metropolis2k metropolis2k is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 3 metropolis2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 14 sec
Reputation Power: 0
Haha, I think I'll just try EasyPHP, that is supposed to have everything covered. Still stumps me though why the stupid thing shows source code instead of the execution of a simple script php.

Reply With Quote
  #5  
Old April 12th, 2006, 09:15 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 17
Wait, don't giveup so soon.
If you didn't have the Apache configurations setup, you might have missed some other stuff.

Apache doesn't just know how to read a PHP file... it must be configured to send the script to the PHP interpreter first...

I found a simple blog post which covers how to set up Apache and PHP on Windows. There's also a couple articles here on Devarticles.

Reply With Quote
  #6  
Old April 13th, 2006, 01:20 PM
infamous-online infamous-online is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 403 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 27 m 25 sec
Reputation Power: 16
from the sounds of your respones you've done nothing to make sure php works with either server.

with apache in your httpd.conf file you'll have to add these 3 lines.

LoadModule php5_module c:\php5\php5apache2.dll
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


of course, you would have to point to your own php folder.


with IIS the process is the same, except that you only have to point the isapi file. using your iis manager point to the isapi file like this, c:\php5\php5isapi.dll and that's it.

also make sure your php5ts.dll is in the system32 folder.
__________________
Apache Expert

Reply With Quote
  #7  
Old April 22nd, 2009, 09:11 PM
lazykate lazykate is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 1 lazykate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m
Reputation Power: 0
Short tags?

I had this problem and it was in php.ini short_open_tag was defaulted to off.

<?php pages worked OK

<? pages showed the source

I know this is an old thread, but might still help someone searching!

Reply With Quote
  #8  
Old May 28th, 2009, 01:30 PM
sfm sfm is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2009
Posts: 1 sfm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 21 sec
Reputation Power: 0
Thumbs up PHP showing source

Quote:
Originally Posted by lazykate
I had this problem and it was in php.ini short_open_tag was defaulted to off.

<?php pages worked OK

<? pages showed the source

I know this is an old thread, but might still help someone searching!


It did, and ended countless hours that had driven me mad.

I registered to this board just to say

THANK YOU!!!

Reply With Quote
  #9  
Old March 1st, 2010, 02:13 PM
shreyas shreyas is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 1 shreyas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 35 sec
Reputation Power: 0
php source code gets displayed in browser on requesting url --> http://localhost/inde

im using
winXP,
mysql,
php5.3.1,
apache2.0.02,
i dont know where problem lies with php or apache installation as im new to both....



i have written php file index.php saved it as "index.php" using notepad in apace2/htdocs folder

index.php
<html>
<body>

<?php
echo "Hello World";
?>

<?php
$txt="Hello World";
echo $txt;
?>

<?php phpinfo(); ?>

</body>
</html>

so plz someone help me out with this 1....
thanx....

Reply With Quote
  #10  
Old January 26th, 2011, 03:47 AM
Innorsloogs Innorsloogs is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2011
Location: Andorra
Posts: 2 Innorsloogs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 52 sec
Reputation Power: 0
Send a message via ICQ to Innorsloogs
I'm trying to find lifting method as a substitute to botox injections.

Hello you all, I truly must ask you smth really crucial! I just stopped to inject myself botox , after a very long time of procedures.Obviously you know why. Because I need one way or another to replace the botox, in an effort to preserve my face skin as stretched as possible, I've been inquiring for alternatives. I have got some good recommendations for a machine that works with galvanic stream and as they say (from the the manufacturer) the ointment and the tool itself slow the process of aging. Influenced by what I've understood, this machine is an alternative to botox, but I'd thank you a lot, if you write me down if you have any familiarity with it. Could it be that someone from you family or acquaintances has already ordered and tried it? I really recognize the value of your advices.

Reply With Quote
  #11  
Old January 26th, 2011, 08:18 AM
Innorsloogs Innorsloogs is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2011
Location: Andorra
Posts: 2 Innorsloogs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 52 sec
Reputation Power: 0
Send a message via ICQ to Innorsloogs
Just finished using the botox, what shall i do now?

Good day ladies, I have a very crucial matter, I'm sure for a good number of us. I just stopped up to inject myself botox , after a very long time of procedures. I know that you know the reason. As I must in some way to replace the botox, so as to keep my skin as lifted as possible, I've been inquiring for alternate options. I've been recommended to apply a small apparatus, a home spa which works with a galvanic current and special creams, when the firm that has patented it says that it has an effect on our genes and the procedure is not just for stretching the skin, but additionally it slows the process of aging from its basis.It looks very good, but have you ever used it? It certainly feels to be a very good working gadget, but I would like to know whether anyone of you has ever tried it? Is there a possibility, that you know anybody who has ever made him\herself a procedure with the device and it goes without saying the consequences? I'm expecting your comments and recommendations.

Reply With Quote
  #12  
Old January 27th, 2011, 11:35 AM
Acecessiobile Acecessiobile is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2011
Location: Uganda
Posts: 1 Acecessiobile User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 40 sec
Reputation Power: 0
Send a message via ICQ to Acecessiobile
Answer

Hallo, I positively can understand the reason you're anxious and not confident about your choice. Botox is a product that you must really quit and I'm happy that this is your decision. One of my colleagues stopped injecting herself botox and is now using this galvanic apparatus that you have reffered to and of course I'm not an specialist, but her results seem to me sincerely brilliant! Once I was watching TV, if I'm not mistaken it was in the morning on FOX Channel, and there was one of the former miss America, Shannon Marketik, she explained that after botox she's having this innovative galvanic tool and in addition other things from the same firm. Well, the truth is, that I don't remember neither how they labeled the gadget, nor where you can find it from. As soon as I'll meet my friend, I'll check with her, in the meantime somebody from the community forum might already answer these inquiries.I hope for you all the best and good luck.

Reply With Quote
  #13  
Old February 2nd, 2011, 09:48 AM
Enligisabraig Enligisabraig is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Location: Germany
Posts: 2 Enligisabraig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 17 sec
Reputation Power: 0
Send a message via ICQ to Enligisabraig
My cellulitis is extremely disturbing me!!!

Hi, I need to check with you something please. Since i'm working in the leisure business, I am in a move all the time and in no way have enough time at the same town. For some of times already I paid for anti-cellulitis treatments, but I can not go at the same beauty health resort, because I am going to work. In addition, there will not be any worthy effect, as I can't go to the health spa for the treatments every 7 days or even two-three times weekly... A neighbor of mine gave me some products and especially designed soaps, but they're not helping me. If you know something that could be in help for me, please update me as quick as possible. Please be free to advise anything good that you suggest, even if the price is high, since I'll manage it one way or another as it's really troubling me. Thank you in advance.

Reply With Quote
  #14  
Old February 2nd, 2011, 03:48 PM
Enligisabraig Enligisabraig is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Location: Germany
Posts: 2 Enligisabraig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 17 sec
Reputation Power: 0
Send a message via ICQ to Enligisabraig
I beg you, I am in need for valuable cellulitis procedures for home use!

Good day, I have a gigantic inquiry for you. The circumstances are, that I'm not remaining for a very long time at the same living place because of my work. For couple of times already I paid for anti-cellulite treatments, however I i'm not able to go at the same beauty spa, as I am going to work. More than that, what's the reason of paying for these treatments, when anyway I am not able to to go all of them. And I checked on the internet and purchased for myself some lotions and soaps, but the truth is I don't distinguish any major result. So, if by any chance, there's some other technique that may upgrade my situation, and is something that I may use at the hotel room, please let me know without hesitation. I am sure that mostly the good quality products are expensive, but I'll do anything to remove the cellulitis as much as possible. Thank you in advance.

Reply With Quote
  #15  
Old March 2nd, 2012, 01:19 AM
felixfergu felixfergu is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 1 felixfergu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 8 sec
Reputation Power: 0
This is the major problems with the PHP pages. They won,t load source code many times . This will lead to lot of work tension and also the work will be pending and waste of our valuable time. To avoid all these inconveniences, The apache 2 web server was introduced. This will overcome all the problems, and also there is a capability of Browser performing these tasks easily. Many of the coding statements are included in this to overcome the problem of not loading.


toronto software developer
toronto search engine marketing

Reply With Quote
  #16  
Old March 2nd, 2012, 03:26 AM
Donald24 Donald24 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 7 Donald24 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 38 sec
Reputation Power: 0
Haha, I think I'll just try EasyPHP, that is supposed to have everything covered. Still stumps me though why the stupid thing shows source code instead of the execution of a simple script php.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > PHP pages won't load, show source code (Apache 2/PHP 5)


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap