HighDots Forums  

[Q] PHP script is displayed instead of executed - DW or PHP problem?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss [Q] PHP script is displayed instead of executed - DW or PHP problem? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael T. Peterson
 
Posts: n/a

Default [Q] PHP script is displayed instead of executed - DW or PHP problem? - 07-12-2004 , 03:56 PM






During testing, I've encountered the following problem - One of my php
scripts is displayed in the browser instead of being executed. But some
complications exist and I'd like to explain 'em:

When index.php (my start page) is read, the user's session id is checked and
validated. If no session id is present or the validation fails, the user is
vectored to a second page containing a username-password login form
(member_login.htm). After completing the form and clicking the submit
button, the info is forwarded to a third page, validate_member_login.php,
that checks the username and password against a database. Note that the
validate_member_login.php script is invoked via the login form's action
parameter, i.e.,

<form action="validate_member_login.php" ... />

All this is a very straight-from-the-book, dirt-simple username-login model.
Nothing fancy.

Now, here's the problem: When I display member_login.htm in my local
browser, fill-in the form and click submit, the validate_member_login.php
script executes correctly.
The problem is that the php script, validate_member_login.php, is displayed.
However, when I initiate the sequence by displaying index.php (my start
page) when the validate_member_login.php script is dispatched, the source is
displayed in the browser rather being executed.

In other words, when the latter sequence of steps is taken the
validate_member_login.php script is properly executed. When the former
sequence is taken, the validate_member_login.php source is displayed in the
browser instead of being executed.

+ I'm using Dreamweaver MX.
+ All my other php scripts seem to execute correctly.
+ I'm using the latest stable release of Apache and PHP installed on my
local, winxp-based system.

I would appreciate any hints and or suggestions that could help me diagnose
and solve this problem.

Cheers,

Michael



Reply With Quote
  #2  
Old   
seb
 
Posts: n/a

Default Re: [Q] PHP script is displayed instead of executed - DW or PHP problem? - 07-12-2004 , 04:54 PM






test on a remote server?...


Michael T. Peterson wrote:

Quote:
During testing, I've encountered the following problem - One of my php
scripts is displayed in the browser instead of being executed. But some
complications exist and I'd like to explain 'em:

When index.php (my start page) is read, the user's session id is checked and
validated. If no session id is present or the validation fails, the user is
vectored to a second page containing a username-password login form
(member_login.htm). After completing the form and clicking the submit
button, the info is forwarded to a third page, validate_member_login.php,
that checks the username and password against a database. Note that the
validate_member_login.php script is invoked via the login form's action
parameter, i.e.,

form action="validate_member_login.php" ... /

All this is a very straight-from-the-book, dirt-simple username-login model.
Nothing fancy.

Now, here's the problem: When I display member_login.htm in my local
browser, fill-in the form and click submit, the validate_member_login.php
script executes correctly.
The problem is that the php script, validate_member_login.php, is displayed.
However, when I initiate the sequence by displaying index.php (my start
page) when the validate_member_login.php script is dispatched, the source is
displayed in the browser rather being executed.

In other words, when the latter sequence of steps is taken the
validate_member_login.php script is properly executed. When the former
sequence is taken, the validate_member_login.php source is displayed in the
browser instead of being executed.

+ I'm using Dreamweaver MX.
+ All my other php scripts seem to execute correctly.
+ I'm using the latest stable release of Apache and PHP installed on my
local, winxp-based system.

I would appreciate any hints and or suggestions that could help me diagnose
and solve this problem.

Cheers,

Michael



Reply With Quote
  #3  
Old   
Michael T. Peterson
 
Posts: n/a

Default Re: [Q] PHP script is displayed instead of executed - DW or PHP problem? - 07-12-2004 , 10:33 PM



The remote server behaves in exactly the same way.

Cheers,

Michael

"seb" <sebnewyork (AT) earhlink (DOT) netTakeThisOut> wrote

Quote:
test on a remote server?...


Michael T. Peterson wrote:

During testing, I've encountered the following problem - One of my php
scripts is displayed in the browser instead of being executed. But some
complications exist and I'd like to explain 'em:

When index.php (my start page) is read, the user's session id is checked
and
validated. If no session id is present or the validation fails, the user
is
vectored to a second page containing a username-password login form
(member_login.htm). After completing the form and clicking the submit
button, the info is forwarded to a third page,
validate_member_login.php,
that checks the username and password against a database. Note that the
validate_member_login.php script is invoked via the login form's action
parameter, i.e.,

form action="validate_member_login.php" ... /

All this is a very straight-from-the-book, dirt-simple username-login
model.
Nothing fancy.

Now, here's the problem: When I display member_login.htm in my local
browser, fill-in the form and click submit, the
validate_member_login.php
script executes correctly.
The problem is that the php script, validate_member_login.php, is
displayed.
However, when I initiate the sequence by displaying index.php (my start
page) when the validate_member_login.php script is dispatched, the
source is
displayed in the browser rather being executed.

In other words, when the latter sequence of steps is taken the
validate_member_login.php script is properly executed. When the former
sequence is taken, the validate_member_login.php source is displayed in
the
browser instead of being executed.

+ I'm using Dreamweaver MX.
+ All my other php scripts seem to execute correctly.
+ I'm using the latest stable release of Apache and PHP installed on my
local, winxp-based system.

I would appreciate any hints and or suggestions that could help me
diagnose
and solve this problem.

Cheers,

Michael





Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.