Re: [PHP] Different output on two different servers

2002-12-10 Thread DL Neil
Hi Steve,
Have you solved this already?

If not, when you copied the code between machines was there some effort to
ensure that the 'copy' points to the RDBMS/tbls on the same box/different
box - or does the original box have code that points to tbls on itself, and
the second box have code that runs on 'it' but (still) points to tbls on the
first box (not on itself)?
[make sense?]

Regards,
=dn

PS what's the difference between "production" and "live"?
(in my jargon they are synonyms)


> 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 "No categories currently available.";
>   }
>   else
>   {
> //create table
> echo " background='images/shopbg.gif'>";
> etc.
>
> 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.
> http://www.violasystems.com
> [EMAIL PROTECTED]
> Mobile +358 50 343 5159
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Different output on two different servers

2002-12-09 Thread Rich Gray
Steve
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
MySQL?
Rich

-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 "No categories currently available.";
  }
  else
  {
//create table
echo "";
etc.

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.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php