Re: $PHP_SELF no longer working
| From: | Mike Jackson | Date: | Thu, 17 Apr 2003 16:10:26 +0000 |
| Subject: | Re: $PHP_SELF no longer working | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144318@lists.php.net to get a copy of this message | ||
ext Jo Ann Comito (jacomito@sprintmail.com) wrote:
> I tried your suggestions and changed the form action statement to:
>
> <form action = "<?=$_SERVER['PHP_SELF']?>" method
> ="post"
>
> and the results were exactly the same as before - 404 url not found
> (with the same wrong url).
> phpinfo revealed the following: it is PHP version 4.3.1, build date Feb,
> 21, 2003, register_globals is on.
>
> I don't know what version they were using before and when/if they
> changed it, but the site has been working with no problems since before
> Feb -- until yesterday.
>
> Any more suggestions?
> Thanks,
> Jo Ann Comito
>
> >If you upgraded to 4.3.1, go into your php.ini file and turn
> >register_globals = on, otherwise for $PHP_SELF, use $_SERVER['PHP_SELF'].
> >
> >If you want to see if they did do any work or not, put an info.php file up
> >there with:
> >
> ><?
> >echo phpinfo();
> >?>
> >
> >in it... that will tell you what version they're running and the settings.
> >I bet they upgraded and didn't tell you.
> >
> >-Dan Joseph
> >
> >-----Original Message-----
> >From: Jo Ann Comito [mailto:jacomito@sprintmail.com]
> >Sent: Wednesday, April 16, 2003 4:54 PM
> >To: PHP List
> >Subject: [PHP] $PHP_SELF no longer working
> >
> >
> >All of a sudden, code that had been working just fine for months stopped
> >working. I called the host provider to see if they had made any changes
> >at their end and they said, "No."
> >
> >All the pages (page1.php, page2.php, etc.) within one directory
> >(protected) are password protected. The first line of each page in this
> >directory is:
> >
> ><?php include("accesscontrol.php"); ?>
> >
> >The accesscontrol.php file is in the same directory as the protected
> >pages. It checks to see if the user is already logged in. If not logged
> >in it displays a form asking for user id and password.
> >
> >The form action is as follows:
> ><form action="<?=$PHP_SELF?>" method="post"
> >
> >Up until today, after submitting the form with a password and user id,
> >the accesscontrol.php page would evaluate the submitted password and id,
> >and if correct, the original page would be displayed.
I bet they also turned short open tags off. Try it with <?php instead of
<? .
--
mike