Forums
This topic is locked
Problem with Restricted Page Access and PHAKT
Posted 05 Dec 2001 12:28:33
1
has voted
05 Dec 2001 12:28:33 Thomas Seuring posted:
I've setup a Test-Site based on a Windows 2000 System with Apache Server and PHP 4.0.6. Database is mySQLI've tried to use the Restricted page access but there I've got a error. The Page is open to everyone and I got the Message:
0) $KT_referrer .= "?" . $QUERY_STRING; $KT_authFailedURL = $KT_authFailedURL . $KT_qsChar . "accessdenied=" . urlencode($KT_referrer); header("Location: $KT_authFailedURL" exit; } ?>
It looks like a generated Part of PHAKT on top of the page.
Did anyone heard about this and knows a workaround??
Thanks
Tom
Replies
Replied 05 Dec 2001 12:34:14
05 Dec 2001 12:34:14 Tim Green replied:
This looks to me like an issue with your configuration, as it is obvious that the PHP code block is being sent to your browser instead of being interpreted by PHP itself.
Check your PHP Configuration. To do that create a new blank page, and enter :-
<?php
phpinfo();
?>
If you get a nice page with lots of information on it, all is well. Otherwise you need to look at your PHP configuration.
Failing that, look at the source code to the page, and look to locate the troublesome section. Is it in a code block ? It should be....
If all else fails post the code to your page here. But first please check all avenues.
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Check your PHP Configuration. To do that create a new blank page, and enter :-
<?php
phpinfo();
?>
If you get a nice page with lots of information on it, all is well. Otherwise you need to look at your PHP configuration.
Failing that, look at the source code to the page, and look to locate the troublesome section. Is it in a code block ? It should be....
If all else fails post the code to your page here. But first please check all avenues.
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 06 Dec 2001 08:35:44
06 Dec 2001 08:35:44 Thomas Seuring replied:
Hello Tim,
thanks for your answer. My PHP-Configuration is working well. All my normal PHP-Pages are Working correctly
The Problem seems to start here:
if (strlen($QUERY_STRING)>0) $KT_referrer .= "?" . $QUERY_STRING;
$KT_authFailedURL = $KT_authFailedURL . $KT_qsChar . "accessdenied=" . urlencode($KT_referrer);
header("Location: $KT_authFailedURL"
exit;
Which is opened by <?php and I think PHP interpretes the > in if (strlen($QUERY_STRING)>0) as closing the PHP Section.
If you think so, too, do you know how to tell PHP not to close the Code Section??
Thanks
Tom
thanks for your answer. My PHP-Configuration is working well. All my normal PHP-Pages are Working correctly
The Problem seems to start here:
if (strlen($QUERY_STRING)>0) $KT_referrer .= "?" . $QUERY_STRING;
$KT_authFailedURL = $KT_authFailedURL . $KT_qsChar . "accessdenied=" . urlencode($KT_referrer);
header("Location: $KT_authFailedURL"
exit;
Which is opened by <?php and I think PHP interpretes the > in if (strlen($QUERY_STRING)>0) as closing the PHP Section.
If you think so, too, do you know how to tell PHP not to close the Code Section??
Thanks
Tom
Replied 07 Dec 2001 11:37:11
07 Dec 2001 11:37:11 Tim Green replied:
OK, if PHP is working alright on your server then that's fine.
However, it must still be a configuration issue OR there is something else on your page making this section of code be sent to the browser.
PHP will not mistake (strlen($QUERY_STRING)>0) as the close of a code block.
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
However, it must still be a configuration issue OR there is something else on your page making this section of code be sent to the browser.
PHP will not mistake (strlen($QUERY_STRING)>0) as the close of a code block.
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>