PHP 5.2 and Mysql

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

    #1

    PHP 5.2 and Mysql

    Hello Newsgroup,
    I have redhat 3.0 Enterprise, and mysql (3.58.xxx more or less)
    installed from a redhat rpm,
    and php 4.3.9 (installed from an rpm) - I can access data from my mysql
    db using php and the "pear" Db .php. I recently upgraded my Apache to
    2.2 and installed (more or less) PHP 5.2 as well - neither of these
    installs were from a Redhat rpm, I downloaded the tarballs, extracted,
    configed, make, etc.
    Apache seems to work fine (but not with the php 4.3.9 rpm). I set the
    httpd.conf file to access php 5 (libphp5.so) and can display PHP 5.2.0
    info using phpinfo(). But... I cannot access any data in my mysql
    database (/usr/local/share/DB.php) from the "pear". And it does not
    appear that phpinfo() is reading the php.ini file. I have two php.ini
    files, one in /etc (redhat rpm location), and another in
    /usr/local/lib/php.ini. I have edited and changed both these files,
    but the "changed" items (like default
    mysql.socket=/var/lib/mysql/mysql.sock) do not show up in the phpinfo()
    page. I have even renamed each php.ini file so there is no php.ini
    file (like php_ini), and the phpinfo() data still displays! this is in
    php 5.2.0. In 4.3.9 - all is well - the file (/etc/php.ini) is read,
    etc, and I can access the db.

    I have attempted to set the PHP 5.2 switch to the location where my
    mysql binary is (/usr/bin/mysql), but still nothing seems to work. My
    guess is that I am not selecting the correct place for PHP 5.2 to hook
    up with my already installed (but old) redhat my sql rpm.

    Any ideas on how I can get PHP 5.2 to work with my version of mysql?
    Or should I remove the existing mysql rpm, and start fresh with a later
    version of mysql - and install it from tarball, etc Then I would at
    least know where the mysql stuff is. Redhat seems to spread the
    package info all over the place.

    Help!

    eric jones

  • Jerry Stuckle

    #2
    Re: PHP 5.2 and Mysql

    eholz1 wrote:
    Hello Newsgroup,
    I have redhat 3.0 Enterprise, and mysql (3.58.xxx more or less)
    installed from a redhat rpm,
    and php 4.3.9 (installed from an rpm) - I can access data from my mysql
    db using php and the "pear" Db .php. I recently upgraded my Apache to
    2.2 and installed (more or less) PHP 5.2 as well - neither of these
    installs were from a Redhat rpm, I downloaded the tarballs, extracted,
    configed, make, etc.
    Apache seems to work fine (but not with the php 4.3.9 rpm). I set the
    httpd.conf file to access php 5 (libphp5.so) and can display PHP 5.2.0
    info using phpinfo(). But... I cannot access any data in my mysql
    database (/usr/local/share/DB.php) from the "pear". And it does not
    appear that phpinfo() is reading the php.ini file. I have two php.ini
    files, one in /etc (redhat rpm location), and another in
    /usr/local/lib/php.ini. I have edited and changed both these files,
    but the "changed" items (like default
    mysql.socket=/var/lib/mysql/mysql.sock) do not show up in the phpinfo()
    page. I have even renamed each php.ini file so there is no php.ini
    file (like php_ini), and the phpinfo() data still displays! this is in
    php 5.2.0. In 4.3.9 - all is well - the file (/etc/php.ini) is read,
    etc, and I can access the db.
    >
    I have attempted to set the PHP 5.2 switch to the location where my
    mysql binary is (/usr/bin/mysql), but still nothing seems to work. My
    guess is that I am not selecting the correct place for PHP 5.2 to hook
    up with my already installed (but old) redhat my sql rpm.
    >
    Any ideas on how I can get PHP 5.2 to work with my version of mysql?
    Or should I remove the existing mysql rpm, and start fresh with a later
    version of mysql - and install it from tarball, etc Then I would at
    least know where the mysql stuff is. Redhat seems to spread the
    package info all over the place.
    >
    Help!
    >
    eric jones
    >
    What does phpinfo() show for the path to your php.ini file?

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • eholz1

      #3
      Re: PHP 5.2 and Mysql

      Hello - I will check it out - and get back - cannot get to my system at
      the moment,

      Thanks,

      eric

      On Nov 20, 10:30 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
      eholz1 wrote:
      Hello Newsgroup,
      I have redhat 3.0 Enterprise, and mysql (3.58.xxx more or less)
      installed from a redhat rpm,
      and php 4.3.9 (installed from an rpm) - I can access data from my mysql
      db using php and the "pear" Db .php. I recently upgraded my Apache to
      2.2 and installed (more or less) PHP 5.2 as well - neither of these
      installs were from a Redhat rpm, I downloaded the tarballs, extracted,
      configed, make, etc.
      Apache seems to work fine (but not with the php 4.3.9 rpm). I set the
      httpd.conf file to access php 5 (libphp5.so) and can display PHP 5.2.0
      info using phpinfo(). But... I cannot access any data in my mysql
      database (/usr/local/share/DB.php) from the "pear". And it does not
      appear that phpinfo() is reading the php.ini file. I have two php.ini
      files, one in /etc (redhat rpm location), and another in
      /usr/local/lib/php.ini. I have edited and changed both these files,
      but the "changed" items (like default
      mysql.socket=/var/lib/mysql/mysql.sock) do not show up in the phpinfo()
      page. I have even renamed each php.ini file so there is no php.ini
      file (like php_ini), and the phpinfo() data still displays! this is in
      php 5.2.0. In 4.3.9 - all is well - the file (/etc/php.ini) is read,
      etc, and I can access the db.
      >
      I have attempted to set the PHP 5.2 switch to the location where my
      mysql binary is (/usr/bin/mysql), but still nothing seems to work. My
      guess is that I am not selecting the correct place for PHP 5.2 to hook
      up with my already installed (but old) redhat my sql rpm.
      >
      Any ideas on how I can get PHP 5.2 to work with my version of mysql?
      Or should I remove the existing mysql rpm, and start fresh with a later
      version of mysql - and install it from tarball, etc Then I would at
      least know where the mysql stuff is. Redhat seems to spread the
      package info all over the place.
      >
      Help!
      >
      eric jonesWhat does phpinfo() show for the path to your php.ini file?
      >
      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstuck...@attgl obal.net
      =============== ===

      Comment

      • Eric

        #4
        Re: PHP 5.2 and Mysql

        Jerry Stuckle wrote:
        eholz1 wrote:
        >
        >Hello Newsgroup,
        >I have redhat 3.0 Enterprise, and mysql (3.58.xxx more or less)
        >installed from a redhat rpm,
        >and php 4.3.9 (installed from an rpm) - I can access data from my mysql
        >db using php and the "pear" Db .php. I recently upgraded my Apache to
        >2.2 and installed (more or less) PHP 5.2 as well - neither of these
        >installs were from a Redhat rpm, I downloaded the tarballs, extracted,
        >configed, make, etc.
        >Apache seems to work fine (but not with the php 4.3.9 rpm). I set the
        >httpd.conf file to access php 5 (libphp5.so) and can display PHP 5.2.0
        >info using phpinfo(). But... I cannot access any data in my mysql
        >database (/usr/local/share/DB.php) from the "pear". And it does not
        >appear that phpinfo() is reading the php.ini file. I have two php.ini
        >files, one in /etc (redhat rpm location), and another in
        >/usr/local/lib/php.ini. I have edited and changed both these files,
        >but the "changed" items (like default
        >mysql.socket =/var/lib/mysql/mysql.sock) do not show up in the phpinfo()
        >page. I have even renamed each php.ini file so there is no php.ini
        >file (like php_ini), and the phpinfo() data still displays! this is in
        >php 5.2.0. In 4.3.9 - all is well - the file (/etc/php.ini) is read,
        >etc, and I can access the db.
        >>
        >I have attempted to set the PHP 5.2 switch to the location where my
        >mysql binary is (/usr/bin/mysql), but still nothing seems to work. My
        >guess is that I am not selecting the correct place for PHP 5.2 to hook
        >up with my already installed (but old) redhat my sql rpm.
        >>
        >Any ideas on how I can get PHP 5.2 to work with my version of mysql?
        >Or should I remove the existing mysql rpm, and start fresh with a later
        >version of mysql - and install it from tarball, etc Then I would at
        >least know where the mysql stuff is. Redhat seems to spread the
        >package info all over the place.
        >>
        >Help!
        >>
        >eric jones
        >>
        >
        What does phpinfo() show for the path to your php.ini file?
        >
        Hello I did check the location - and moved the php.ini file to this
        location - /usr/local/apache2/php/lib - now it reads the file (php).

        I still am unable to connect to the db -my my.cnf file seems ok.
        I will make a change to my php page that accesses the db.

        If I run the older version of apache (2.0) and php 4.3.9 - all is well -
        i can diplay data on the php page.

        any ideas here???

        Thanks,

        eholz1

        Comment

        • Jerry Stuckle

          #5
          Re: PHP 5.2 and Mysql

          Eric wrote:
          Jerry Stuckle wrote:
          >
          >eholz1 wrote:
          >>
          >>Hello Newsgroup,
          >>I have redhat 3.0 Enterprise, and mysql (3.58.xxx more or less)
          >>installed from a redhat rpm,
          >>and php 4.3.9 (installed from an rpm) - I can access data from my mysql
          >>db using php and the "pear" Db .php. I recently upgraded my Apache to
          >>2.2 and installed (more or less) PHP 5.2 as well - neither of these
          >>installs were from a Redhat rpm, I downloaded the tarballs, extracted,
          >>configed, make, etc.
          >>Apache seems to work fine (but not with the php 4.3.9 rpm). I set the
          >>httpd.conf file to access php 5 (libphp5.so) and can display PHP 5.2.0
          >>info using phpinfo(). But... I cannot access any data in my mysql
          >>database (/usr/local/share/DB.php) from the "pear". And it does not
          >>appear that phpinfo() is reading the php.ini file. I have two php.ini
          >>files, one in /etc (redhat rpm location), and another in
          >>/usr/local/lib/php.ini. I have edited and changed both these files,
          >>but the "changed" items (like default
          >>mysql.socke t=/var/lib/mysql/mysql.sock) do not show up in the phpinfo()
          >>page. I have even renamed each php.ini file so there is no php.ini
          >>file (like php_ini), and the phpinfo() data still displays! this is in
          >>php 5.2.0. In 4.3.9 - all is well - the file (/etc/php.ini) is read,
          >>etc, and I can access the db.
          >>>
          >>I have attempted to set the PHP 5.2 switch to the location where my
          >>mysql binary is (/usr/bin/mysql), but still nothing seems to work. My
          >>guess is that I am not selecting the correct place for PHP 5.2 to hook
          >>up with my already installed (but old) redhat my sql rpm.
          >>>
          >>Any ideas on how I can get PHP 5.2 to work with my version of mysql?
          >>Or should I remove the existing mysql rpm, and start fresh with a later
          >>version of mysql - and install it from tarball, etc Then I would at
          >>least know where the mysql stuff is. Redhat seems to spread the
          >>package info all over the place.
          >>>
          >>Help!
          >>>
          >>eric jones
          >>>
          >>
          >What does phpinfo() show for the path to your php.ini file?
          >>
          Hello I did check the location - and moved the php.ini file to this
          location - /usr/local/apache2/php/lib - now it reads the file (php).
          >
          I still am unable to connect to the db -my my.cnf file seems ok.
          I will make a change to my php page that accesses the db.
          >
          If I run the older version of apache (2.0) and php 4.3.9 - all is well -
          i can diplay data on the php page.
          >
          any ideas here???
          >
          Thanks,
          >
          eholz1
          It would help if you would tell us what errors you're getting.

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          • eholz1

            #6
            Re: PHP 5.2 and Mysql

            Hello Again,

            Thanks for checking my post. Well, as to errors - I am not getting
            any. I will double check the php page that is supposed to access the
            db.
            I do a "SELECT * FROM pet" and display about 10 records. I will double
            check to see if I do any error checking, etc.

            Below is the php code to connect to the database:
            <table class="maintabl e" border=1>
            <tr class="rowbar"> <th>Pet Name</th><th>Owner</th><th>Pet
            Type</th><th>Gender</th><th>Date of Birth</th></tr>
            <?php
            // connect
            require_once('D B.php');
            $db = DB::connect("my sql://abc:password@my server/menagerie");
            $dbhost = 'myserver';
            $dbuser = 'abc';
            $dbpass = 'password';

            if (DB::iserror($d b))
            die($db->getMessage() );
            //else
            // echo 'Congratulatons ! Connected to Database!<br></br>';

            ?><!--center-->
            <?php
            $sql = "SELECT * FROM pet";
            $q = $db->query($sql);
            if (DB::iserror($q )) {
            die($db->getMessage() );
            }

            // generate the table
            while ($q->fetchInto($row )) {
            ?>
            <tr>
            <td><?= $row[0] ?></td>
            <td><?= $row[1] ?></td>
            <td><?= $row[2] ?></td>
            <td><?= $row[3] ?></td>
            <td><?= $row[4] ?></td>
            </tr>
            <?php }
            ?>
            </table></center>

            This code works fine when I am running the older Apache (2.0), and PHP
            4.3.9.

            Thanks,

            eric

            On Nov 20, 6:44 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
            Eric wrote:
            Jerry Stuckle wrote:
            >
            eholz1 wrote:
            >
            >Hello Newsgroup,
            >I have redhat 3.0 Enterprise, and mysql (3.58.xxx more or less)
            >installed from a redhat rpm,
            >and php 4.3.9 (installed from an rpm) - I can access data from my mysql
            >db using php and the "pear" Db .php. I recently upgraded my Apache to
            >2.2 and installed (more or less) PHP 5.2 as well - neither of these
            >installs were from a Redhat rpm, I downloaded the tarballs, extracted,
            >configed, make, etc.
            >Apache seems to work fine (but not with the php 4.3.9 rpm). I set the
            >httpd.conf file to access php 5 (libphp5.so) and can display PHP 5.2.0
            >info using phpinfo(). But... I cannot access any data in my mysql
            >database (/usr/local/share/DB.php) from the "pear". And it does not
            >appear that phpinfo() is reading the php.ini file. I have two php.ini
            >files, one in /etc (redhat rpm location), and another in
            >/usr/local/lib/php.ini. I have edited and changed both these files,
            >but the "changed" items (like default
            >mysql.socket =/var/lib/mysql/mysql.sock) do not show up in the phpinfo()
            >page. I have even renamed each php.ini file so there is no php.ini
            >file (like php_ini), and the phpinfo() data still displays! this is in
            >php 5.2.0. In 4.3.9 - all is well - the file (/etc/php.ini) is read,
            >etc, and I can access the db.
            >
            >I have attempted to set the PHP 5.2 switch to the location where my
            >mysql binary is (/usr/bin/mysql), but still nothing seems to work. My
            >guess is that I am not selecting the correct place for PHP 5.2 to hook
            >up with my already installed (but old) redhat my sql rpm.
            >
            >Any ideas on how I can get PHP 5.2 to work with my version of mysql?
            >Or should I remove the existing mysql rpm, and start fresh with a later
            >version of mysql - and install it from tarball, etc Then I would at
            >least know where the mysql stuff is. Redhat seems to spread the
            >package info all over the place.
            >
            >Help!
            >
            >eric jones
            >
            What does phpinfo() show for the path to your php.ini file?
            >
            Hello I did check the location - and moved the php.ini file to this
            location - /usr/local/apache2/php/lib - now it reads the file (php).
            >
            I still am unable to connect to the db -my my.cnf file seems ok.
            I will make a change to my php page that accesses the db.
            >
            If I run the older version of apache (2.0) and php 4.3.9 - all is well -
            i can diplay data on the php page.
            >
            any ideas here???
            >
            Thanks,
            >
            eholz1It would help if you would tell us what errors you're getting.
            >
            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstuck...@attgl obal.net
            =============== ===

            Comment

            • Jerry Stuckle

              #7
              Re: PHP 5.2 and Mysql

              eholz1 wrote:
              On Nov 20, 6:44 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
              >
              >>Eric wrote:
              >>
              >>>Jerry Stuckle wrote:
              >>
              >>>>eholz1 wrote:
              >>
              >>>>>Hello Newsgroup,
              >>>>>I have redhat 3.0 Enterprise, and mysql (3.58.xxx more or less)
              >>>>>installe d from a redhat rpm,
              >>>>>and php 4.3.9 (installed from an rpm) - I can access data from my mysql
              >>>>>db using php and the "pear" Db .php. I recently upgraded my Apache to
              >>>>>2.2 and installed (more or less) PHP 5.2 as well - neither of these
              >>>>>installs were from a Redhat rpm, I downloaded the tarballs, extracted,
              >>>>>configed , make, etc.
              >>>>>Apache seems to work fine (but not with the php 4.3.9 rpm). I set the
              >>>>>httpd.co nf file to access php 5 (libphp5.so) and can display PHP 5.2.0
              >>>>>info using phpinfo(). But... I cannot access any data in my mysql
              >>>>>database (/usr/local/share/DB.php) from the "pear". And it does not
              >>>>>appear that phpinfo() is reading the php.ini file. I have two php.ini
              >>>>>files, one in /etc (redhat rpm location), and another in
              >>>>>/usr/local/lib/php.ini. I have edited and changed both these files,
              >>>>>but the "changed" items (like default
              >>>>>mysql.sock et=/var/lib/mysql/mysql.sock) do not show up in the phpinfo()
              >>>>>page. I have even renamed each php.ini file so there is no php.ini
              >>>>>file (like php_ini), and the phpinfo() data still displays! this is in
              >>>>>php 5.2.0. In 4.3.9 - all is well - the file (/etc/php.ini) is read,
              >>>>>etc, and I can access the db.
              >>
              >>>>>I have attempted to set the PHP 5.2 switch to the location where my
              >>>>>mysql binary is (/usr/bin/mysql), but still nothing seems to work. My
              >>>>>guess is that I am not selecting the correct place for PHP 5.2 to hook
              >>>>>up with my already installed (but old) redhat my sql rpm.
              >>
              >>>>>Any ideas on how I can get PHP 5.2 to work with my version of mysql?
              >>>>>Or should I remove the existing mysql rpm, and start fresh with a later
              >>>>>version of mysql - and install it from tarball, etc Then I would at
              >>>>>least know where the mysql stuff is. Redhat seems to spread the
              >>>>>package info all over the place.
              >>
              >>>>>Help!
              >>
              >>>>>eric jones
              >>
              >>>>What does phpinfo() show for the path to your php.ini file?
              >>
              >>>Hello I did check the location - and moved the php.ini file to this
              >>>location - /usr/local/apache2/php/lib - now it reads the file (php).
              >>
              >>>I still am unable to connect to the db -my my.cnf file seems ok.
              >>>I will make a change to my php page that accesses the db.
              >>
              >>>If I run the older version of apache (2.0) and php 4.3.9 - all is well -
              >>>i can diplay data on the php page.
              >>
              >>>any ideas here???
              >>
              >>>Thanks,
              >>
              >>>eholz1It would help if you would tell us what errors you're getting.
              >>
              >>--
              >>============= =====
              >>Remove the "x" from my email address
              >>Jerry Stuckle
              >>JDS Computer Training Corp.
              >>jstuck...@att global.net
              >>============= =====
              >
              >
              Hello Again,
              >
              Thanks for checking my post. Well, as to errors - I am not getting
              any. I will double check the php page that is supposed to access the
              db.
              I do a "SELECT * FROM pet" and display about 10 records. I will double
              check to see if I do any error checking, etc.
              >
              Below is the php code to connect to the database:
              <table class="maintabl e" border=1>
              <tr class="rowbar"> <th>Pet Name</th><th>Owner</th><th>Pet
              Type</th><th>Gender</th><th>Date of Birth</th></tr>
              <?php
              // connect
              require_once('D B.php');
              $db = DB::connect("my sql://abc:password@my server/menagerie");
              $dbhost = 'myserver';
              $dbuser = 'abc';
              $dbpass = 'password';
              >
              if (DB::iserror($d b))
              die($db->getMessage() );
              //else
              // echo 'Congratulatons ! Connected to Database!<br></br>';
              >
              ?><!--center-->
              <?php
              $sql = "SELECT * FROM pet";
              $q = $db->query($sql);
              if (DB::iserror($q )) {
              die($db->getMessage() );
              }
              >
              // generate the table
              while ($q->fetchInto($row )) {
              ?>
              <tr>
              <td><?= $row[0] ?></td>
              <td><?= $row[1] ?></td>
              <td><?= $row[2] ?></td>
              <td><?= $row[3] ?></td>
              <td><?= $row[4] ?></td>
              </tr>
              <?php }
              ?>
              </table></center>
              >
              This code works fine when I am running the older Apache (2.0), and PHP
              4.3.9.
              >
              Thanks,
              >
              eric
              >
              (top posting fixed)

              Hmmm, this shouldn't be a problem. What happens if you use MySQL calls?

              I don't use Pear::MDB2, but I wonder if the version you have is not
              compatible with PHP 5.2. I really don't know - it's just a shot in the
              dark.

              P.S. Please don't top post. Thanks.

              --
              =============== ===
              Remove the "x" from my email address
              Jerry Stuckle
              JDS Computer Training Corp.
              jstucklex@attgl obal.net
              =============== ===

              Comment

              • Jerry Stuckle

                #8
                Re: PHP 5.2 and Mysql

                eholz1 wrote:
                Hello Again,
                >
                Thanks for checking my post. Well, as to errors - I am not getting
                any. I will double check the php page that is supposed to access the
                db.
                I do a "SELECT * FROM pet" and display about 10 records. I will double
                check to see if I do any error checking, etc.
                >
                Below is the php code to connect to the database:
                <table class="maintabl e" border=1>
                <tr class="rowbar"> <th>Pet Name</th><th>Owner</th><th>Pet
                Type</th><th>Gender</th><th>Date of Birth</th></tr>
                <?php
                // connect
                require_once('D B.php');
                $db = DB::connect("my sql://abc:password@my server/menagerie");
                $dbhost = 'myserver';
                $dbuser = 'abc';
                $dbpass = 'password';
                >
                if (DB::iserror($d b))
                die($db->getMessage() );
                //else
                // echo 'Congratulatons ! Connected to Database!<br></br>';
                >
                ?><!--center-->
                <?php
                $sql = "SELECT * FROM pet";
                $q = $db->query($sql);
                if (DB::iserror($q )) {
                die($db->getMessage() );
                }
                >
                // generate the table
                while ($q->fetchInto($row )) {
                ?>
                <tr>
                <td><?= $row[0] ?></td>
                <td><?= $row[1] ?></td>
                <td><?= $row[2] ?></td>
                <td><?= $row[3] ?></td>
                <td><?= $row[4] ?></td>
                </tr>
                <?php }
                ?>
                </table></center>
                >
                This code works fine when I am running the older Apache (2.0), and PHP
                4.3.9.
                >
                Thanks,
                >
                eric
                >
                One other thought. Do you get anything if you add the following to the
                start of your PHP code?

                error_reporting (E_ALL);
                ini_set('error_ reporting', E_ALL);


                --
                =============== ===
                Remove the "x" from my email address
                Jerry Stuckle
                JDS Computer Training Corp.
                jstucklex@attgl obal.net
                =============== ===

                Comment

                • eholz1

                  #9
                  Re: PHP 5.2 and Mysql



                  On Nov 21, 1:23 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                  eholz1 wrote:
                  Hello Again,
                  >
                  Thanks for checking my post. Well, as to errors - I am not getting
                  any. I will double check the php page that is supposed to access the
                  db.
                  I do a "SELECT * FROM pet" and display about 10 records. I will double
                  check to see if I do any error checking, etc.
                  >
                  Below is the php code to connect to the database:
                  <table class="maintabl e" border=1>
                  <tr class="rowbar"> <th>Pet Name</th><th>Owner</th><th>Pet
                  Type</th><th>Gender</th><th>Date of Birth</th></tr>
                  <?php
                  // connect
                  require_once('D B.php');
                  $db = DB::connect("my sql://abc:password@my server/menagerie");
                  $dbhost = 'myserver';
                  $dbuser = 'abc';
                  $dbpass = 'password';
                  >
                  if (DB::iserror($d b))
                  die($db->getMessage() );
                  //else
                  // echo 'Congratulatons ! Connected to Database!<br></br>';
                  >
                  ?><!--center-->
                  <?php
                  $sql = "SELECT * FROM pet";
                  $q = $db->query($sql);
                  if (DB::iserror($q )) {
                  die($db->getMessage() );
                  }
                  >
                  // generate the table
                  while ($q->fetchInto($row )) {
                  ?>
                  <tr>
                  <td><?= $row[0] ?></td>
                  <td><?= $row[1] ?></td>
                  <td><?= $row[2] ?></td>
                  <td><?= $row[3] ?></td>
                  <td><?= $row[4] ?></td>
                  </tr>
                  <?php }
                  ?>
                  </table></center>
                  >
                  This code works fine when I am running the older Apache (2.0), and PHP
                  4.3.9.
                  >
                  Thanks,
                  >
                  ericOne other thought. Do you get anything if you add the following to the
                  start of your PHP code?
                  >
                  error_reporting (E_ALL);
                  ini_set('error_ reporting', E_ALL);
                  >
                  --
                  =============== ===
                  Remove the "x" from my email address
                  Jerry Stuckle
                  JDS Computer Training Corp.
                  jstuck...@attgl obal.net
                  =============== ===
                  Hello Jerry,

                  I figured something out - I followed your suggestion and switched the
                  db access code from the "pear" format
                  to std mysql calls (mysql_connect( $a,$b,$c) etc) and can return
                  records, etc. I will guess that there is something not
                  quite right inregard to my use of the Pear db and this latest version
                  of PHP. I will check that out.
                  Thanks for helping.

                  eric

                  Comment

                  Working...