Moved server and it's all gone wrong

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davidtube
Forum Commoner
Posts: 79
Joined: Sun Mar 25, 2007 8:42 pm

Moved server and it's all gone wrong

Post by davidtube »

I think I need a lot of help. I've moved from a Windows server to a Linux one and now my site is covered with error messages. I've added this to a php file which is included on every page (if you're not too busy):

Code: Select all

error_reporting(E_ALL ^ E_NOTICE);
I've still got lots of errors though.

I'll show you the errors then the appropriate line of code and see if you know what's wrong:

Notice: Undefined index: email in /home/fhlinux160/w/website.co.uk/user/htdocs/signin.php on line 4

Code: Select all

$email = addslashes(trim($_POST['email']));

Notice: Use of undefined constant membership - assumed 'membership' in /home/fhlinux160/w/website.co.uk/user/htdocs/editproduct.php on line 3

Code: Select all

if($_SESSION[membership] != "current")

I assume this error is because the vardata[2] doesn't exist but some times it will exist and it all used to work properly:
Notice: Undefined offset: 2 in /home/fhlinux160/w/wikiprice.co.uk/user/htdocs/more.php on line 6

Code: Select all

$PATH_INFO = $_SERVER['PATH_INFO'];
   if(isset($PATH_INFO)) {   
      $vardata = explode('/', $PATH_INFO);
        $urlcat=$vardata[1];
		$urlsubcat=$vardata[2];
		}

This one shows up when an image can't be found.
function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/fhlinux160/w/wikiprice.co.uk/user/htdocs/product.php on line 76
Warning: Division by zero in /home/fhlinux160/w/wikiprice.co.uk/user/htdocs/product.php on line 89
Warning: Division by zero in /home/fhlinux160/w/wikiprice.co.uk/user/htdocs/product.php on line 90

Code: Select all

$ix=$imageinfo[0];
$iy=$imageinfo[1];


if ($iy>$ix)
{
$nheight=$iy/$iy*250;
$nwidth=$ix/$iy*250;
}
else
{
$nheight=$iy/$ix*250;
$nwidth=$ix/$ix*250;
}
Post Reply