Undeifined varables give errors on win32 web server but work on linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • synergz

    Undeifined varables give errors on win32 web server but work on linux

    I have 2 parallel systems for php development
    Debian linux with apache and PHP4
    and Windows XP professional with apache & PHP4

    I have been in the habit of debugging on the xp machine before I
    upload to the debian server

    If I run this example , it works fine on the linux web server
    _______________ _______________ ___

    problem.html

    <HTML><BODY>
    <FORM METHOD=POST ACTION="problem .php">
    show your email address to others ?
    <INPUT NAME="showmail" TYPE="Checkbox" >
    <BR><BR>
    <INPUT TYPE=SUBMIT>
    </FORM></BODY></HTML>

    =============== =============== =====

    problem.php

    <HTML><BODY>
    <?php
    echo $showmail;
    ?>
    </BODY></HTML>

    _______________ _______________ ___

    On XP it runs fine but only if the checkbox is selected. If I do not
    select the checkbox & hit submit I get this error. (it fails because
    $showmail is not defined)

    Notice: Undefined variable: Choice in c:\program files\apache
    group\apache\ht docs\begphp\ch0 3\problem.php on line 3

    I have compared the php.ini files of the 2 systems and cannot see any
    significant differences. I have had one or 2 other anomalies between
    the 2 systems, but this is fundamentally the most difficult to
    diagnose

    Thanks in advance for any assistance

    Synergz
  • Jochen Daum

    #2
    Re: Undeifined varables give errors on win32 web server but work on linux

    Hi synergz!
    On 20 Jul 2003 16:36:59 -0700, synergz@yahoo.c om (synergz) wrote:
    [color=blue]
    >I have 2 parallel systems for php development
    >Debian linux with apache and PHP4
    >and Windows XP professional with apache & PHP4
    >
    >I have been in the habit of debugging on the xp machine before I
    >upload to the debian server
    >[/color]
    Compare php.ini on the systems. One has error_reporting = E_ALL, the
    other has probably something different.

    HTH, Jochen
    --
    Jochen Daum - CANS Ltd.
    PHP DB Edit Toolkit -- PHP scripts for building
    database editing interfaces.
    Download PHP DB Edit Toolkit for free. PHP DB Edit Toolkit is a set of PHP classes makes the generation of database edit interfaces easier and faster. The main class builds tabular and form views based on a data dictionary and takes over handling of insert/update/delete and user input.

    Comment

    • Andreas Paasch

      #3
      Re: Undeifined varables give errors on win32 web server but work on linux

      Jochen Daum wrote:
      [color=blue]
      > Hi synergz!
      > On 20 Jul 2003 16:36:59 -0700, synergz@yahoo.c om (synergz) wrote:
      >[color=green]
      >>I have 2 parallel systems for php development
      >>Debian linux with apache and PHP4
      >>and Windows XP professional with apache & PHP4
      >>
      >>I have been in the habit of debugging on the xp machine before I
      >>upload to the debian server
      >>[/color]
      > Compare php.ini on the systems. One has error_reporting = E_ALL, the
      > other has probably something different.
      >
      > HTH, Jochen[/color]

      Jochen,

      reading this reply of yours tells me know why the heck my code today started
      messing up.
      Guess I changed my default error_reporting to only E_ALL ... away from the
      default which I can't recall .... darn.
      You shouldn't have it right around there somewhere so I can restore here?
      Would make me a happy man.

      /Andreas

      --
      Registeret Linux user #292411

      Comment

      • stephan beal

        #4
        Re: Undeifined varables give errors on win32 web server but work on linux

        synergz wrote:
        [color=blue]
        > I have 2 parallel systems for php development
        > Debian linux with apache and PHP4
        > and Windows XP professional with apache & PHP4
        >
        > I have been in the habit of debugging on the xp machine before I
        > upload to the debian server
        >
        > If I run this example , it works fine on the linux web server[/color]



        --
        ----- stephan beal
        Registered Linux User #71917 http://counter.li.org
        I speak for myself, not my employer. Contents may
        be hot. Slippery when wet. Reading disclaimers makes
        you go blind. Writing them is worse. You have been Warned.

        Comment

        • synergz

          #5
          Re: Undeifined varables give errors on win32 web server but work on linux

          Thankyou all that solved it I missed it on the original compare
          error_reporting = E_ALL & ~E_NOTICE was the linux setting and has
          repaired the problem

          Jim
          synergz@yahoo.c om


          Jochen Daum <jochen.daum@ca ns.co.nz> wrote in message news:<u4bmhvkn8 5umc8k1pmti8ns4 grihrh9h7j@4ax. com>...[color=blue]
          > Hi Andreas!
          > On Mon, 21 Jul 2003 01:51:36 +0200, Andreas Paasch
          > <Andreas@Paasch .Net> wrote:
          >[color=green]
          > >Jochen Daum wrote:
          > >[color=darkred]
          > >> Hi synergz!
          > >> On 20 Jul 2003 16:36:59 -0700, synergz@yahoo.c om (synergz) wrote:
          > >>
          > >>>I have 2 parallel systems for php development
          > >>>Debian linux with apache and PHP4
          > >>>and Windows XP professional with apache & PHP4
          > >>>
          > >>>I have been in the habit of debugging on the xp machine before I
          > >>>upload to the debian server
          > >>>
          > >> Compare php.ini on the systems. One has error_reporting = E_ALL, the
          > >> other has probably something different.
          > >>
          > >> HTH, Jochen[/color]
          > >
          > >Jochen,
          > >
          > >reading this reply of yours tells me know why the heck my code today started
          > >messing up.
          > >Guess I changed my default error_reporting to only E_ALL ... away from the
          > >default which I can't recall .... darn.
          > >You shouldn't have it right around there somewhere so I can restore here?
          > >Would make me a happy man.
          > >[/color]
          > I have
          >
          > error_reporting = E_ALL & ~E_NOTICE
          >
          > but its my server as well, so I might have changed it. I would rather
          > put
          >
          > error_reporting (your errorreporting)
          >
          > in all your pages, as you might move servers and then you the problem
          > again.
          >
          > HTH,
          >
          > jochen
          >
          >
          >[color=green]
          > >/Andreas[/color][/color]

          Comment

          Working...