| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Remote server and local server behave differently|
| 2:41 am on May 15, 2008 (gmt 0)|
I am having the problem with some PHP script which wont run properly when uploaded in remote web server though they work nicely in local web server...for example
In my php login script remote server gives an error like cannot modify header information
| 3:53 am on May 15, 2008 (gmt 0)|
Do both servers have the same PHP version? You may be using some methods not supported by older versions. Also double check your php.ini files to make sure they are similar where needed
| 3:59 pm on May 15, 2008 (gmt 0)|
you might be sending a header location redirect, move it a couple lines or re-order the logic and see if that works.
also do a phpinfo() on both servers and compare...
and posting your script might help too!
| 1:22 am on May 16, 2008 (gmt 0)|
my local server has php 5.0.4 and remote has got 5.2.6....will that affect?
my script is very basic...
if(isset($_POST['username']) && isset($_POST['password']))
if ($username=="xyz" && $password=="xyz")
echo "incorrect username or password";
Some HTML Code
if(isset($_SESSION['login']) && $_SESSION['login']==true)
echo "<a href='../admin/logout.php'>Logout</a>";
echo "<a href='../admin/index.php'>Login</a>";
| 1:40 am on May 16, 2008 (gmt 0)|
Don't use session_register();
$_SESSION['login']=true; is enough. Use of session_register() is deprecated.
Other than that it looks fine. GL
| 3:29 am on May 16, 2008 (gmt 0)|
many thanks ag_47...
My this problem is now solved...
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved