![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |