TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Opening Php files displays script in browser (http://www.talkphp.com/absolute-beginners/2895-opening-php-files-displays-script-browser.html)

j4v1 06-04-2008 02:08 PM

Opening Php files displays script in browser
 
I tried searching the forums on this issue, pretty sure its been discussed before.

I've just recently had to re-install xampp 1.6.6a. Previously everything was working like a charm. I even kept all the extensions an php.ini. Could this be a httpd.conf issue?

:-/

SpYkE112 06-04-2008 02:50 PM

Yes, maybe the loading of the PHP module has been for some reason disabled..

delayedinsanity 06-04-2008 02:51 PM

More likely it would be your httpd.conf than your php.ini - the php configuration won't even come into play until the script is actually parsed as PHP. Are you on Windows or Linux? Make sure you have a line in your httpd.conf that reads something to this effect;

LoadModule php5_module "C:/Program Files/path/to/php/php5apache2_2.dll"

or

LoadModule php5_module modules/libphp5.so

Then you'll need to make sure this is somewhere in your httpd.conf as well,

AddType application/x-httpd-php .php

Hope that helps...
-m

j4v1 06-04-2008 02:53 PM

Checking right now. Also wanted to ask, sometimes I see back slashes used and other times I see forward slashes for windows directory path. Which is correct and when?

j4v1 06-04-2008 02:59 PM

BRB...I'm so tired of this BS. This was working fine all last week.

I now have to restart Vista...no suprise. See if that jars some of its senses.

delayedinsanity 06-04-2008 03:21 PM

Generally speaking backslashes on Windows, and forward slashes on Linux, though some applications, such as Apache which is native to linux, will accept forward slashes for windows paths as the backslash is generally accepted to be an escape character.
-m

j4v1 06-04-2008 03:32 PM

No dice, on reboot. Still everything is the same. Script shows up in browser.

delayedinsanity 06-04-2008 03:34 PM

Double check your path, make sure the .dll file is where you're specifying it to be, and you definitely have the AddType declaration in your httpd.conf as well?

j4v1 06-04-2008 04:23 PM

We've made progress! I'm getting somewhere now. Im using MS Expressions- Web Designer. It has a built in DevelopmentServer that needed to be started.

Thank you.


All times are GMT. The time now is 09:01 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0