vickie Posted May 10, 2010 Share Posted May 10, 2010 Really need help with a client's website utilizing old code. The site has to be moved to a new server with updated code: Current Server web1 New Server web2 MySQL 4.0.18 MySQL 5.1.42 PHP 4.3.11 PHP 5.3.1 Perl 5.8.3 Perl 5.10.0 Fedora Core 1 Fedora 12 I believe the primary problem is php code since the two primary pages with php are not working on the new server. (I had the site moved back to the old server for now). I have researched the code upgrades and believe I have it fixed but how do I test it? I use Snow Leopard Mac and have installed MAMP. But I get a white screen when I call up the pages in question "http://localhost:8888/xxx.phtml". The basic code is below...what am I doing wrong? Current code: <?php require("admin2/admin2.php3"); $sql=new MySQL_class; $sql->Create("database-name"); ?> <div id="footer"> <?php @readfile('http://www.website.com/ssi/ssi-footer.html'); ?> </div> <? } ?> Quote Link to comment https://forums.phpfreaks.com/topic/201311-web-server-upgrade-breaks-website/ Share on other sites More sharing options...
trq Posted May 11, 2010 Share Posted May 11, 2010 Have you actually setup your server to parse the .php3 extension as php? Its not common. Quote Link to comment https://forums.phpfreaks.com/topic/201311-web-server-upgrade-breaks-website/#findComment-1056187 Share on other sites More sharing options...
vickie Posted May 11, 2010 Author Share Posted May 11, 2010 Thanks for the quick reply! I always wondered why the site was created using that php3 extension, and that it worked. But I did change all the extensions and references from php3 to php...and it helped. Now, my next question: does this language still apply: <form action=\"$PHP_SELF\" method=post > ? For some reason the members page won't activate after I log in as a member on the homepage, it just reverts to a login page and not revealing the member resources. And then when logging in on this second login page, it fails and remains on this page. Quote Link to comment https://forums.phpfreaks.com/topic/201311-web-server-upgrade-breaks-website/#findComment-1056205 Share on other sites More sharing options...
PFMaBiSmAd Posted May 11, 2010 Share Posted May 11, 2010 $PHP_SELF was depreciated and should have been turned off by default in php4.2 in April of the year 2002 when register_globals were turned off by default. As a temporary patch you could turn register_globals on (assuming your web host allows it) but since register_globals have been completely removed in php6, you will need to fix your code sooner or later. It should be $_SERVER['PHP_SELF'] Register_globals magically populated program variables (such as $PHP_SELF) from the corresponding predefined superglobals where the data actually originates. Unfortunately, register_globals also allowed hackers to 'magically' set session and program variables by simply setting a same name external post/get/cookie variable and a lot of web sites were taken over. If your code is using any of the following source variables, you need to modify your code to use the actual $_XXXXXX superglobal variable instead of a program variable by the same name as the superglobal index name - $_SERVER — Server and execution environment information $_GET — HTTP GET variables $_POST — HTTP POST variables $_FILES — HTTP File Upload variables $_SESSION — Session variables $_ENV — Environment variables $_COOKIE — HTTP Cookies Quote Link to comment https://forums.phpfreaks.com/topic/201311-web-server-upgrade-breaks-website/#findComment-1056207 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.