Jump to content

Moved Web Hosts


batherst

Recommended Posts

Hi guys, hoping you can help.

 

Iv recently moved a site from one server to another. Needless to say this site encountered a few errors when the move was done. I believe i have corrected most of these errors but now it is as though the mysql data base isnt connecting correctly with the site. I can see the category's on the site but when i click on a category the products do not display. Its almost as though the info is not being pulled through from the data base. Im at a complete loss!

 

It was originally on a site running MYSQL5.0.92 old and the new site is running 5.1.56 new.Not sure if that makes a difference. Any help greatly needed/appreciated

Link to comment
Share on other sites

I believe that this is a PHP issue and not a MySQL one.  Can you please provide some code where it isn't working?

 

~juddster

 

Hi Juddster thanks for the reply. Please see the list.php code.

 

<?
include_once "./lib.inc.php";
include_once "head.inc.php";

recursion_ca_id($ca_id, $whereStr);
$subject = $whereStr;
?>


<tr>
  <td><table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#FFFFFF>
    <tr>
      <td width=628 valign=top><img src="img/spacer.gif" width="606px" height="1px" /><br />
        <table width=100% border=0 cellspacing=2 cellpadding=0>
          <tr>
            <td height=20 style="padding-left:15px"><span class="breadcrumb"><a href="javascript:history.go(-1);"><img align="left" style="vertical-align:middle" src='<? echo "$g_dir/$g_skin_dir/back_arrows.gif" ?>' border="0"></a> <a href='<? echo "$g_dir/index.php" ?>'>Home</a><? echo $subject ?></span></td>
          </tr>
          <tr>
            <td width=100% height=1 class=line2></td>
          </tr>
        </table>
        <p>
          <?
			$sql = " select ca_id, ca_name,ca_type from $category_table where ca_sen_id = '$ca_id' order by ca_rank desc, ca_name, ca_id ";
			$result = mysql_query($sql) or die(mysql_error());
			if (mysql_num_rows($result))
			{
			?>
        <table width=100% cellspacing=1 cellpadding=2 border=0 bgcolor=#cccccc>
          <tr >
            <?
				while ($row = mysql_fetch_array($result))
				{
					echo "<td bgcolor=#ffffff align='center'><a href='./list.php?ca_id=$row[ca_id]'>$row[ca_name]</a></td>";
				}
				?>
          </tr>
        </table>
        <p>
          <? } ?>
          <?
$sql = " select ca_id, ca_name,ca_type from $category_table where ca_id = '$ca_id' order by ca_rank desc, ca_name, ca_id ";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);



?>
        <form>
        </form>
      <td><?
include_once "right.inc.php";
include_once "tail.inc.php";
?>

 

Im trying to iron out all the issues so i can get it running again. I believe the about code is in relation to this page http://184.173.229.96/~artformm/shop/list.php?ca_id=30 

 

it looks like all the product id's are being called for as you can see in that link but there are no products displaying or being drawn down from the data base :confused: :confused:

Link to comment
Share on other sites

Two things -

 

1) You need to have php's error_reporting set to E_ALL and display_errors set to ON when you are debugging code so that php will help you by reporting and displaying all the errors it detects (I don't see any place where the program variable $ca_id is being set from the correct $_GET variable.)

 

2) Moving thread to the php help section... (Unless the problem is isolated to and due to a specific mysql query problem, it's not a problem for the mysql forum section.)

Link to comment
Share on other sites

Two things -

 

1) You need to have php's error_reporting set to E_ALL and display_errors set to ON when you are debugging code so that php will help you by reporting and displaying all the errors it detects (I don't see any place where the program variable $ca_id is being set from the correct $_GET variable.)

 

2) Moving thread to the php help section... (Unless the problem is isolated to and due to a specific mysql query problem, it's not a problem for the mysql forum section.)

 

Thats fine, i wasnt sure if it was a SQL error at the time but appears it is another php error. In relation to the about error reporting. Where do i display these codes? Into the php file that i am looking at? Im not overly familiar with the programme variables side of it either, assuming that is why my products on that site arnt displaying

Link to comment
Share on other sites

It looks like you might have been previously using registered_globals.  I don't see anywhere in your code where you set the variable $ca_id.

 

You are going to need to adjust the code so that it does grab that value.

$ca_id = $_GET['ca_id'];

 

My guess is that your old host had it enabled but your new one does not.

 

~juddster

Link to comment
Share on other sites

It looks like you might have been previously using registered_globals.  I don't see anywhere in your code where you set the variable $ca_id.

 

You are going to need to adjust the code so that it does grab that value.

$ca_id = $_GET['ca_id'];

 

My guess is that your old host had it enabled but your new one does not.

 

~juddster

 

Thanks juddster. Ill try that when i get a chance and let you know how i get on. Fingers crossed it works. Would it be worth approaching the new host to see if they support registered globals also?

Link to comment
Share on other sites

No ... registered_globals was deprecated and turned off by default for a reason.  Your code should handle it, not assume the server will.

 

~juddster

 

So i've turned on display error's. Why didnt i think of this earlier what a great tool. Now that i have included the display error code i am getting the following error's which i assume is in relation to grabbing the value's. Where would i need to make the change in the code with the grab value code you mentioned earlier $ca_id = $_GET['ca_id']; obviously on the lines it presents in the error but does any thing else need to supplement the code?

 

Notice: Undefined variable: SESSION_CACHE_LIMITER in /home/artformm/public_html/shop/lib.inc.php on line 29

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/artformm/public_html/shop/lib.inc.php:29) in /home/artformm/public_html/shop/lib.inc.php on line 33

Notice: Use of undefined constant g_on_uid - assumed 'g_on_uid' in /home/artformm/public_html/shop/lib.inc.php on line 505

Notice: Undefined variable: ca_id in /home/artformm/public_html/shop/list.php on line 8

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 9

Notice: Use of undefined constant cfg_value - assumed 'cfg_value' in /home/artformm/public_html/shop/tail.inc.php on line 10

Notice: Use of undefined constant cfg_id - assumed 'cfg_id' in /home/artformm/public_html/shop/tail.inc.php on line 11

Notice: Use of undefined constant cfg_sel_value - assumed 'cfg_sel_value' in /home/artformm/public_html/shop/tail.inc.php on line 12

Home » 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.