Not quite clear on your problem - did you run an ALTER TABLE on your MySQL
table or just an INSERT of a new row? Assuming it was the former, all I can
say is look at the code that populates the $cat_array variable to see if the
underlying query would have been affected by the alter table command...
Does the query that populates $cat_array run OK if executed directly in

-----Original Message-----
From: Steve Jackson [mailto:[EMAIL PROTECTED]]
Sent: 09 December 2002 13:11
To: PHP General
Subject: [PHP] Different output on two different servers

Hi all,

I have set-up a production server and a live server. The problem is with
the production server. I am using PHP version 4.2.3 and MySQL 3.23.39 on
both servers. We have just configured the production server to mimick
the live server (which incidentally works fine) and the code from both
servers is identical. I dumped all the data into the production MySQL
database then copied the code from the live server to our production one
and there didn't seem to be any problems. However today my boss asked
for a new category to go into our webshop with a new product. I went
into MySQL and updated the database fine then when I went to check the
section of the site to see if the extra category and product are there I
get my own PHP encoded error 'No categories currently available'. It
fails on the first function:
function display_categories($cat_array)

  //display all categories in the array passed in
  if (!is_array($cat_array))
     echo "<br>No categories currently available.<br>";
    //create table
    echo "<table width = \"760\" border='0'

Now it works superbly on my live server and did work fine until I tried
adding another field to the database on the production server. Where
should I start looking to de-bug this?

Steve Jackson
Web Developer
Viola Systems Ltd.
Mobile +358 50 343 5159

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to