Error After Site Move

Hi

I have just transfered a website from one server to a new server, but i now get these 2 lines of error code.
The url for the site is http://64.71.162.104/~largerth/index.php, having to view this way as the original site is still active on other server till i change dns servers.

Deprecated: Assigning the return value of new by reference is deprecated in /home/largerth/public_html/classes/global.inc.php on line 7

The code for this one is public_html/classes/global.inc.php

[php]<?php
include(‘config.php’);
$host = DB_HOST;
$user = DB_USER;
$pass = DB_PW;
$name = DB_NAME;
$db = &new MySQL($host,$user,$pass,$name);
?>[/php]

Warning: Cannot modify header information - headers already sent by (output started at /home/largerth/public_html/classes/global.inc.php:7) in /home/largerth/public_html/index.php on line 18

and the index.php file for this one
[php]<?php
session_start();
include(‘classes/mysql.class.php’);
include(‘classes/global.inc.php’);
include(‘classes/shopping_basket.inc.php’);
include(‘classes/category.class.php’);
include(‘classes/site_controller.class.php’);
include(‘classes/message_prompt.php’);
$category = new view_category ;
$site_cont= new site_cont ;
function selfURL() { $s = empty($_SERVER[“HTTPS”]) ? ‘’ : ($_SERVER[“HTTPS”] == “on”) ? “s” : “”; $protocol = strleft(strtolower($_SERVER[“SERVER_PROTOCOL”]), “/”).$s; $port = ($_SERVER[“SERVER_PORT”] == “80”) ? “” : (":".$_SERVER[“SERVER_PORT”]); return $protocol."://".$_SERVER[‘SERVER_NAME’].$port.$_SERVER[‘REQUEST_URI’]; } function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); }
//print(selfURL());
$url = selfURL() ;
$u = explode(’.’,$url);
//print_r($u);
$https_url = explode(’:’,$u[0]);
if($https_url[0]==‘http’ ){
header(‘location:https://www.larger-than-life.co.uk/’);
}
?>

Larger Than Life

.highslide {
cursor: url(Administrator/highslide/graphics/zoomin.cur), pointer;
outline: none;
}
.highslide img {
border: 0px solid gray;
}
.highslide:hover img {
border: 0px solid silver;
}

.highslide-image {
border-bottom: 1px solid white;
}
.highslide-image-blur {
}
.highslide-caption {
display: none;

border-bottom: 1px solid white;
font-family: Verdana, Helvetica;
font-size: 10pt;
padding: 5px;
background-color: silver;

}
.highslide-loading {
display: block;
color: white;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
text-decoration: none;
padding: 3px;
border-top: 1px solid white;
border-bottom: 1px solid white;
background-color: black;

}

a.highslide-credits,
a.highslide-credits i {
padding: 2px;
color: silver;
text-decoration: none;
font-size: 10px;
}
a.highslide-credits:hover,
a.highslide-credits:hover i {
color: white;
background-color: gray;
}
.highslide-display-block {
display: block;
}
.highslide-display-none {
display: none;
}

<?php include('header.php');?>
 
 <? if($_GET['Mode'] =='gallery'){?>      
  <tr>
  <td class="white_font_big"><img src="images/subscriber-module/common/designers_title.gif" /></td>
 <tr> 
 <?php }else{ ?> 
   <tr>
  <td class="white_font_big"><img src="images/subscriber-module/common/designers_title2.gif" /></td>
 <tr> 
  <? }?>
  </tr>
  <tr>
    <td class="white_font_big">
    <table cellspacing="2" cellpadding="2"> 
    <?php $category->_view_collection()?>
    </table>        </td>
  </tr>
 <? if($_GET['Mode']!='gallery'){?> <tr>
    <td class="white_font_big"><img src="images/subscriber-module/common/category_title.gif" /></td>
  </tr>
  <tr>
    <td class="white_font_big">
    <table cellspacing="2" cellpadding="2">
    <?php $category->_view_cat()?>
    </table></td>
  </tr>
  <? } ?>
  <tr>
  	<td height="10px"></td>
  </tr>
  <tr>
  	<td height="10px"></td>
  </tr>
  <tr>
    <td class="white_font_big"><img src="images/subscriber-module/common/myacc_title.gif" /></td>
  </tr>
  <tr>
    <td class="white" style="padding-left:10px;padding-bottom:10px;padding-top:10px;"><table class="txt_category" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td height="20px">&nbsp;&nbsp; &nbsp;&nbsp;</td>
          <td class="bg_list1">Welcome <?php if(isset($_SESSION['user'])){echo($_SESSION['user']['first_name']);}else{echo("Guest <br>");}?></td>
        </tr>
        <tr>
          <td height="20px">&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td class="bg_list1"><?php if(isset($_SESSION['user'])){	

echo("

[My Profile]


[Edit Profile]
[Sign Out] ");
}
else
{
echo(’
[Sign In]

[Register] ');
}

?>
          </span></span></td>
        </tr>
        <tr>            </tr>
      </table>          </td>
  </tr>
  <tr>
  	<td height="5px"></td>
  </tr>
  <tr>
   <td>
   <table style="background: none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" class="box_body" border="0" cellpadding="0" cellspacing="0" width="100%">
      <tbody>
        <tr>
          <td class="white_font_big"><img src="images/subscriber-module/common/info_title.gif" /></td>
        </tr>
        <tr>
          <td style="padding-left: 9px ;">
		  <table class="txt_category" cellpadding="0" cellspacing="0" border="0">
             <tr> 
			  	<td height="20px"><img src="images/subscriber-module/collection/bg_list.gif" /></td>
			  	<td class="bg_list1"><a href="index.php?Mode=delivery">Delivery &amp; Returns</a></td>
            	</tr>
				<tr>
					<td height="20px"><img src="images/subscriber-module/collection/bg_list.gif" /></td>
					<td class="bg_list1"><a href="index.php?Mode=terms">Conditions of Use</a></td>
            	</tr>
				<tr>
					<td height="20px"><img src="images/subscriber-module/collection/bg_list.gif" /></td>
					<td class="bg_list1"><a href="index.php?Mode=contact">Contact Us</a></td>
          		</tr>
			</table>			  </td>
        </tr>
		<tr>
			<td class="txt_category1" style="padding:5px;">Search</td>
		</tr>
        <tr>
          <td class="txt_category1" style="padding:5px;">
          <table border="0" align="center" cellpadding="0" cellspacing="0">
            <form id="form1" name="form1" method="post" action="index.php?Mode=search_result"><tr>
              <td>
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><span id="sprytextfield1">
                      <label>
                      <input name="key" type="text" class="white_input_100px" id="key" />
                      </label>
                      <span class="textfieldRequiredMsg">Please Enter a Key Word</span></span></td>
                    <td valign="middle"><input type="image" name="imageField" src="images/subscriber-module/common/go_button.gif" />                        </td>
                  </tr>
                  <tr>
                    <td colspan="2" align="right">&nbsp;</td>
                  </tr>
                  <tr>
                    <td colspan="2" align="right"><a href="index.php?Mode=AD_search">Advanced Search</a></td>
                    </tr>
                </table>                  </td>
            </tr></form>
          </table>			  </td>
		  </tr>
		  <tr>			</tr>
      </tbody>
    </table>	   </td>
  </tr>
 
</table></td>
<td width="7" align="center" valign="top" style="padding-top:30px;"><img src="images/subscriber-module/common/vert_divider.jpg" /></td>
<td width="593" align="center" valign="top" style="padding-top:5px;padding-left:25px;"><?php $site_cont->_include_pages();?></td>
<?php include('footer.php');?>
[/php]

I have tried to rectify but cant seem to locate the errors

Objects are passed as reference by default in PHP 5 remove the &
[php]$db = new MySQL($host,$user,$pass,$name);[/php]

for your second error read this:

Hi

Thanks for your reply

will try that.

Sponsor our Newsletter | Privacy Policy | Terms of Service