working with mysql

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

    working with mysql

    I have installed php on my server and can get the phpinfo page to display.
    I have installed mysql 5 and I'm able to get into the database and create
    data. I would like to be able to get php to pull the data. I have been
    reading on the internet as to what I need to do in php and have created a
    couple of pages. When I go to the page all I get is a blank screen - no
    data from the database.

    I edited my php.ini file to allow for mysql. I copied libmysql.dll to my
    c:\windows\syst em32 directory. Is there anything else that I need to do to
    make mysql and php work together?

    Will


  • Jim Dornbos

    #2
    Re: working with mysql

    On Wed, 05 Jul 2006 13:06:17 -0400, Auddog <will_k@hotmail .comwrote:
    I have installed php on my server and can get the phpinfo page to
    display.
    I have installed mysql 5 and I'm able to get into the database and create
    data. I would like to be able to get php to pull the data. I have been
    reading on the internet as to what I need to do in php and have created a
    couple of pages. When I go to the page all I get is a blank screen - no
    data from the database.
    When I get a blank page, it tells me that I can go look in my apache error
    log for some direction on the problem to solve.

    I found it helpful to echo my sql queries to screen, then copy and paste
    that query into phpadmin and run it from there. In that way, I could
    separate my php errors from my sql errors from my html errors, etc.

    Jim

    Comment

    • Alvaro G. Vicario

      #3
      Re: working with mysql

      *** Auddog escribió/wrote (Wed, 05 Jul 2006 17:06:17 GMT):
      couple of pages. When I go to the page all I get is a blank screen - no
      data from the database.
      Enable error reporting in PHP. You can do it in php.ini or in a per-script
      basis:

      <?php

      error_reporting (E_ALL);

      ?>


      --
      -+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
      ++ Mi sitio sobre programación web: http://bits.demogracia.com
      +- Mi web de humor con rayos UVA: http://www.demogracia.com
      --

      Comment

      • Iván Sánchez Ortega

        #4
        Re: working with mysql

        -----BEGIN PGP SIGNED MESSAGE-----
        Hash: SHA1

        Auddog wrote:
        I edited my php.ini file to allow for mysql. I copied libmysql.dll to my
        c:\windows\syst em32 directory.
        Check that loading of the mysql library works - what does phpinfo() say
        about it?

        - --
        - ----------------------------------
        Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

        La ciudad (polis) es una de las cosas que existen por naturaleza; y el
        hombre es, por naturaleza, un animal político.
        -- Aristóteles. (384-322 A.C.) Filósofo griego.

        -----BEGIN PGP SIGNATURE-----
        Version: GnuPG v1.4.3 (GNU/Linux)

        iD8DBQFEq/7A3jcQ2mg3Pc8RA s9yAJ9Ed1IoSW1X 88aEvokaLNfkGY3 aWACeIRlB
        8IvTr68WwWku5sf DUDR8cxU=
        =lVcb
        -----END PGP SIGNATURE-----

        Comment

        • taofik.hidayat@gmail.com

          #5
          Re: working with mysql

          If Windows you've installed, please make a folder tmp, like: c:\\tmp.

          Auddog wrote:
          I have installed php on my server and can get the phpinfo page to display.
          I have installed mysql 5 and I'm able to get into the database and create
          data. I would like to be able to get php to pull the data. I have been
          reading on the internet as to what I need to do in php and have created a
          couple of pages. When I go to the page all I get is a blank screen - no
          data from the database.
          >
          I edited my php.ini file to allow for mysql. I copied libmysql.dll to my
          c:\windows\syst em32 directory. Is there anything else that I need to do to
          make mysql and php work together?
          >
          Will

          Comment

          • Auddog

            #6
            Re: working with mysql

            I have tried all of the options listed and I have even tried this code

            <?php

            // example using procedural approach
            if(!$db=mysqli_ connect('localh ost','root','pa ssword','pppe') ){
            throw new Exception('Erro r connecting to host.
            '.mysqli_connec t_error());
            }
            error_reporting (E_ALL);

            // display host information
            echo 'Host information: '.mysqli_get_ho st_info($db);
            // close connection
            mysqli_close($d b);

            ?>

            I still get nothing but a blank page

            <taofik.hidayat @gmail.comwrote in message
            news:1152174121 .598411.161670@ b68g2000cwa.goo glegroups.com.. .
            If Windows you've installed, please make a folder tmp, like: c:\\tmp.
            >
            Auddog wrote:
            >I have installed php on my server and can get the phpinfo page to
            >display.
            >I have installed mysql 5 and I'm able to get into the database and create
            >data. I would like to be able to get php to pull the data. I have been
            >reading on the internet as to what I need to do in php and have created a
            >couple of pages. When I go to the page all I get is a blank screen - no
            >data from the database.
            >>
            >I edited my php.ini file to allow for mysql. I copied libmysql.dll to my
            >c:\windows\sys tem32 directory. Is there anything else that I need to do
            >to
            >make mysql and php work together?
            >>
            >Will
            >

            Comment

            • Jerry Stuckle

              #7
              Re: working with mysql

              Auddog wrote:
              I have tried all of the options listed and I have even tried this code
              >
              <?php
              >
              // example using procedural approach
              if(!$db=mysqli_ connect('localh ost','root','pa ssword','pppe') ){
              throw new Exception('Erro r connecting to host.
              '.mysqli_connec t_error());
              }
              error_reporting (E_ALL);
              >
              // display host information
              echo 'Host information: '.mysqli_get_ho st_info($db);
              // close connection
              mysqli_close($d b);
              >
              ?>
              >
              I still get nothing but a blank page
              >
              <taofik.hidayat @gmail.comwrote in message
              news:1152174121 .598411.161670@ b68g2000cwa.goo glegroups.com.. .
              >
              >>If Windows you've installed, please make a folder tmp, like: c:\\tmp.
              >>
              >>Auddog wrote:
              >>
              >>>I have installed php on my server and can get the phpinfo page to
              >>>display.
              >>>I have installed mysql 5 and I'm able to get into the database and create
              >>>data. I would like to be able to get php to pull the data. I have been
              >>>reading on the internet as to what I need to do in php and have created a
              >>>couple of pages. When I go to the page all I get is a blank screen - no
              >>>data from the database.
              >>>
              >>>I edited my php.ini file to allow for mysql. I copied libmysql.dll to my
              >>>c:\windows\s ystem32 directory. Is there anything else that I need to do
              >>>to
              >>>make mysql and php work together?
              >>>
              >>>Will
              >
              >
              >
              If you get an error, you're throwing an exception but not catching it.

              Rather, try:

              error_reporting (E_ALL);
              if(!$db=mysqli_ connect('localh ost','root','pa ssword','pppe') ){
              echo 'Error connecting to host. '.mysqli_connec t_error());
              exit();
              }
              .... rest of code

              (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

              • Auddog

                #8
                Re: working with mysql

                thanks, I should've known to place that at the top.

                That being said, I still get nothing but a blank page

                A



                "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                news:IKydnfxTcf DetTDZnZ2dnUVZ_ sCdnZ2d@comcast .com...
                Auddog wrote:
                >I have tried all of the options listed and I have even tried this code
                >>
                ><?php
                >>
                >// example using procedural approach
                >if(!$db=mysqli _connect('local host','root','p assword','pppe' )){
                > throw new Exception('Erro r connecting to host.
                >'.mysqli_conne ct_error());
                >}
                >error_reportin g(E_ALL);
                >>
                >// display host information
                >echo 'Host information: '.mysqli_get_ho st_info($db);
                >// close connection
                >mysqli_close($ db);
                >>
                >?>
                >>
                >I still get nothing but a blank page
                >>
                ><taofik.hidaya t@gmail.comwrot e in message
                >news:115217412 1.598411.161670 @b68g2000cwa.go oglegroups.com. ..
                >>
                >>>If Windows you've installed, please make a folder tmp, like: c:\\tmp.
                >>>
                >>>Auddog wrote:
                >>>
                >>>>I have installed php on my server and can get the phpinfo page to
                >>>>display.
                >>>>I have installed mysql 5 and I'm able to get into the database and
                >>>>create
                >>>>data. I would like to be able to get php to pull the data. I have been
                >>>>reading on the internet as to what I need to do in php and have created
                >>>>a
                >>>>couple of pages. When I go to the page all I get is a blank screen - no
                >>>>data from the database.
                >>>>
                >>>>I edited my php.ini file to allow for mysql. I copied libmysql.dll to
                >>>>my
                >>>>c:\windows\ system32 directory. Is there anything else that I need to do
                >>>>to
                >>>>make mysql and php work together?
                >>>>
                >>>>Will
                >>
                >>
                >>
                >
                If you get an error, you're throwing an exception but not catching it.
                >
                Rather, try:
                >
                error_reporting (E_ALL);
                if(!$db=mysqli_ connect('localh ost','root','pa ssword','pppe') ){
                echo 'Error connecting to host. '.mysqli_connec t_error());
                exit();
                }
                ... rest of code
                >
                (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

                  #9
                  Re: working with mysql

                  Auddog wrote:
                  thanks, I should've known to place that at the top.
                  >
                  That being said, I still get nothing but a blank page
                  >
                  A
                  >
                  >
                  >
                  "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                  news:IKydnfxTcf DetTDZnZ2dnUVZ_ sCdnZ2d@comcast .com...
                  >
                  >>Auddog wrote:
                  >>
                  >>>I have tried all of the options listed and I have even tried this code
                  >>>
                  >>><?php
                  >>>
                  >>>// example using procedural approach
                  >>>if(!$db=mysq li_connect('loc alhost','root', 'password','ppp e')){
                  >> throw new Exception('Erro r connecting to host.
                  >>>'.mysqli_con nect_error());
                  >>>}
                  >>>error_report ing(E_ALL);
                  >>>
                  >>>// display host information
                  >>>echo 'Host information: '.mysqli_get_ho st_info($db);
                  >>>// close connection
                  >>>mysqli_close ($db);
                  >>>
                  >>>?>
                  >>>
                  >>>I still get nothing but a blank page
                  >>>
                  >>><taofik.hida yat@gmail.comwr ote in message
                  >>>news:1152174 121.598411.1616 70@b68g2000cwa. googlegroups.co m...
                  >>>
                  >>>
                  >>>>If Windows you've installed, please make a folder tmp, like: c:\\tmp.
                  >>>>
                  >>>>Auddog wrote:
                  >>>>
                  >>>>
                  >>>>>I have installed php on my server and can get the phpinfo page to
                  >>>>>display.
                  >>>>>I have installed mysql 5 and I'm able to get into the database and
                  >>>>>create
                  >>>>>data. I would like to be able to get php to pull the data. I have been
                  >>>>>reading on the internet as to what I need to do in php and have created
                  >>>>>a
                  >>>>>couple of pages. When I go to the page all I get is a blank screen - no
                  >>>>>data from the database.
                  >>>>>
                  >>>>>I edited my php.ini file to allow for mysql. I copied libmysql.dll to
                  >>>>>my
                  >>>>>c:\windows \system32 directory. Is there anything else that I need to do
                  >>>>>to
                  >>>>>make mysql and php work together?
                  >>>>>
                  >>>>>Will
                  >>>
                  >>>
                  >>>
                  >>If you get an error, you're throwing an exception but not catching it.
                  >>
                  >>Rather, try:
                  >>
                  >>error_reporti ng(E_ALL);
                  >>if(!$db=mysql i_connect('loca lhost','root',' password','pppe ')){
                  > echo 'Error connecting to host. '.mysqli_connec t_error());
                  > exit();
                  >>}
                  >>... rest of code
                  >>
                  >>(P.S. Please don't top post. Thanks.).
                  >>
                  Again, please don't top post. This newsgroup uses bottom posting as a
                  standard.

                  Did you take out your throw statement and put in the echo like I asked?

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

                  Comment

                  • Auddog

                    #10
                    Re: working with mysql


                    "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                    news:AYadnQ-8XYQoojDZnZ2dnU VZ_q6dnZ2d@comc ast.com...
                    Auddog wrote:
                    >thanks, I should've known to place that at the top.
                    >>
                    >That being said, I still get nothing but a blank page
                    >>
                    >A
                    >>
                    >>
                    >>
                    >"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                    >news:IKydnfxTc fDetTDZnZ2dnUVZ _sCdnZ2d@comcas t.com...
                    >>
                    >>>Auddog wrote:
                    >>>
                    >>>>I have tried all of the options listed and I have even tried this code
                    >>>>
                    >>>><?php
                    >>>>
                    >>>>// example using procedural approach
                    >>>>if(!$db=mys qli_connect('lo calhost','root' ,'password','pp pe')){
                    >>> throw new Exception('Erro r connecting to host.
                    >>>>'.mysqli_co nnect_error());
                    >>>>}
                    >>>>error_repor ting(E_ALL);
                    >>>>
                    >>>>// display host information
                    >>>>echo 'Host information: '.mysqli_get_ho st_info($db);
                    >>>>// close connection
                    >>>>mysqli_clos e($db);
                    >>>>
                    >>>>?>
                    >>>>
                    >>>>I still get nothing but a blank page
                    >>>>
                    >>>><taofik.hid ayat@gmail.comw rote in message
                    >>>>news:115217 4121.598411.161 670@b68g2000cwa .googlegroups.c om...
                    >>>>
                    >>>>
                    >>>>>If Windows you've installed, please make a folder tmp, like: c:\\tmp.
                    >>>>>
                    >>>>>Auddog wrote:
                    >>>>>
                    >>>>>
                    >>>>>>I have installed php on my server and can get the phpinfo page to
                    >>>>>>display .
                    >>>>>>I have installed mysql 5 and I'm able to get into the database and
                    >>>>>>create
                    >>>>>>data. I would like to be able to get php to pull the data. I have
                    >>>>>>been
                    >>>>>>reading on the internet as to what I need to do in php and have
                    >>>>>>created a
                    >>>>>>couple of pages. When I go to the page all I get is a blank screen -
                    >>>>>>no
                    >>>>>>data from the database.
                    >>>>>>
                    >>>>>>I edited my php.ini file to allow for mysql. I copied libmysql.dll to
                    >>>>>>my
                    >>>>>>c:\window s\system32 directory. Is there anything else that I need to
                    >>>>>>do to
                    >>>>>>make mysql and php work together?
                    >>>>>>
                    >>>>>>Will
                    >>>>
                    >>>>
                    >>>>
                    >>>If you get an error, you're throwing an exception but not catching it.
                    >>>
                    >>>Rather, try:
                    >>>
                    >>>error_report ing(E_ALL);
                    >>>if(!$db=mysq li_connect('loc alhost','root', 'password','ppp e')){
                    >> echo 'Error connecting to host. '.mysqli_connec t_error());
                    >> exit();
                    >>>}
                    >>>... rest of code
                    >>>
                    >>>(P.S. Please don't top post. Thanks.).
                    >>>
                    >
                    Again, please don't top post. This newsgroup uses bottom posting as a
                    standard.
                    >
                    Did you take out your throw statement and put in the echo like I asked?
                    >
                    --
                    =============== ===
                    Remove the "x" from my email address
                    Jerry Stuckle
                    JDS Computer Training Corp.
                    jstucklex@attgl obal.net
                    =============== ===
                    Here is my entire code:

                    <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
                    <html>
                    <head>
                    <title>Host Information</title>
                    </head>
                    <body>

                    <?php
                    error_reporting (E_ALL);

                    // example using procedural approach
                    if(!$db=mysqli_ connect('localh ost','root','pa ssword','ppe'))
                    {
                    echo 'Error connecting to host. '.mysqli_connec t_error());
                    exit();
                    }
                    // display host information
                    echo 'Host information: '.mysqli_get_ho st_info($db);

                    // close connection
                    mysqli_close($d b);

                    ?>
                    </body>
                    </html>

                    Here's something else that I find odd. If I change the title to the web
                    page and save, when I bring up the page, I does not reflect the change. I
                    just can't figure out what is wrong.

                    A

                    ps - sorry about the top posts


                    Comment

                    • Jerry Stuckle

                      #11
                      Re: working with mysql

                      Auddog wrote:
                      "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                      news:AYadnQ-8XYQoojDZnZ2dnU VZ_q6dnZ2d@comc ast.com...
                      >
                      >>Auddog wrote:
                      >>
                      >>>thanks, I should've known to place that at the top.
                      >>>
                      >>>That being said, I still get nothing but a blank page
                      >>>
                      >>>A
                      >>>
                      >>>
                      >>>
                      >>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                      >>>news:IKydnfx TcfDetTDZnZ2dnU VZ_sCdnZ2d@comc ast.com...
                      >>>
                      >>>
                      >>>>Auddog wrote:
                      >>>>
                      >>>>
                      >>>>>I have tried all of the options listed and I have even tried this code
                      >>>>>
                      >>>>><?php
                      >>>>>
                      >>>>>// example using procedural approach
                      >>>>>if(!$db=my sqli_connect('l ocalhost','root ','password','p ppe')){
                      >>>> throw new Exception('Erro r connecting to host.
                      >>>>>'.mysqli_c onnect_error()) ;
                      >>>>>}
                      >>>>>error_repo rting(E_ALL);
                      >>>>>
                      >>>>>// display host information
                      >>>>>echo 'Host information: '.mysqli_get_ho st_info($db);
                      >>>>>// close connection
                      >>>>>mysqli_clo se($db);
                      >>>>>
                      >>>>>?>
                      >>>>>
                      >>>>>I still get nothing but a blank page
                      >>>>>
                      >>>>><taofik.hi dayat@gmail.com wrote in message
                      >>>>>news:11521 74121.598411.16 1670@b68g2000cw a.googlegroups. com...
                      >>>>>
                      >>>>>
                      >>>>>
                      >>>>>>If Windows you've installed, please make a folder tmp, like: c:\\tmp.
                      >>>>>>
                      >>>>>>Auddog wrote:
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>>>I have installed php on my server and can get the phpinfo page to
                      >>>>>>>displa y.
                      >>>>>>>I have installed mysql 5 and I'm able to get into the database and
                      >>>>>>>create
                      >>>>>>>data. I would like to be able to get php to pull the data. I have
                      >>>>>>>been
                      >>>>>>>readin g on the internet as to what I need to do in php and have
                      >>>>>>>create d a
                      >>>>>>>couple of pages. When I go to the page all I get is a blank screen -
                      >>>>>>>no
                      >>>>>>>data from the database.
                      >>>>>>>
                      >>>>>>>I edited my php.ini file to allow for mysql. I copied libmysql.dll to
                      >>>>>>>my
                      >>>>>>>c:\windo ws\system32 directory. Is there anything else that I need to
                      >>>>>>>do to
                      >>>>>>>make mysql and php work together?
                      >>>>>>>
                      >>>>>>>Will
                      >>>>>
                      >>>>>
                      >>>>>
                      >>>>If you get an error, you're throwing an exception but not catching it.
                      >>>>
                      >>>>Rather, try:
                      >>>>
                      >>>>error_repor ting(E_ALL);
                      >>>>if(!$db=mys qli_connect('lo calhost','root' ,'password','pp pe')){
                      >>>echo 'Error connecting to host. '.mysqli_connec t_error());
                      >>>exit();
                      >>>>}
                      >>>>... rest of code
                      >>>>
                      >>>>(P.S. Please don't top post. Thanks.).
                      >>>>
                      >>
                      >>Again, please don't top post. This newsgroup uses bottom posting as a
                      >>standard.
                      >>
                      >>Did you take out your throw statement and put in the echo like I asked?
                      >>
                      >>--
                      >>============= =====
                      >>Remove the "x" from my email address
                      >>Jerry Stuckle
                      >>JDS Computer Training Corp.
                      >>jstucklex@att global.net
                      >>============= =====
                      >
                      >
                      Here is my entire code:
                      >
                      <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
                      <html>
                      <head>
                      <title>Host Information</title>
                      </head>
                      <body>
                      >
                      <?php
                      error_reporting (E_ALL);
                      >
                      // example using procedural approach
                      if(!$db=mysqli_ connect('localh ost','root','pa ssword','ppe'))
                      {
                      echo 'Error connecting to host. '.mysqli_connec t_error());
                      exit();
                      }
                      // display host information
                      echo 'Host information: '.mysqli_get_ho st_info($db);
                      >
                      // close connection
                      mysqli_close($d b);
                      >
                      ?>
                      </body>
                      </html>
                      >
                      Here's something else that I find odd. If I change the title to the web
                      page and save, when I bring up the page, I does not reflect the change. I
                      just can't figure out what is wrong.
                      >
                      A
                      >
                      ps - sorry about the top posts
                      >
                      >
                      OK, that's important. It means either you're loading the wrong page, or
                      the page is being cached - either by your browser or somewhere along the
                      line.

                      Try renaming your file to something you haven't used before and see what
                      happens. Also try clearing the cache in your browser.

                      And thanks for bottom posting!

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

                      Comment

                      • Auddog

                        #12
                        Re: working with mysql


                        "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                        news:7--dndlSwo3IzDDZnZ 2dnUVZ_oadnZ2d@ comcast.com...
                        Auddog wrote:
                        >"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                        >news:AYadnQ-8XYQoojDZnZ2dnU VZ_q6dnZ2d@comc ast.com...
                        >>
                        >>>Auddog wrote:
                        >>>
                        >>>>thanks, I should've known to place that at the top.
                        >>>>
                        >>>>That being said, I still get nothing but a blank page
                        >>>>
                        >>>>A
                        >>>>
                        >>>>
                        >>>>
                        >>>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                        >>>>news:IKydnf xTcfDetTDZnZ2dn UVZ_sCdnZ2d@com cast.com...
                        >>>>
                        >>>>
                        >>>>>Auddog wrote:
                        >>>>>
                        >>>>>
                        >>>>>>I have tried all of the options listed and I have even tried this code
                        >>>>>>
                        >>>>>><?php
                        >>>>>>
                        >>>>>>// example using procedural approach
                        >>>>>>if(!$db=m ysqli_connect(' localhost','roo t','password',' pppe')){
                        >>>>> throw new Exception('Erro r connecting to host.
                        >>>>>>'.mysqli_ connect_error() );
                        >>>>>>}
                        >>>>>>error_rep orting(E_ALL);
                        >>>>>>
                        >>>>>>// display host information
                        >>>>>>echo 'Host information: '.mysqli_get_ho st_info($db);
                        >>>>>>// close connection
                        >>>>>>mysqli_cl ose($db);
                        >>>>>>
                        >>>>>>?>
                        >>>>>>
                        >>>>>>I still get nothing but a blank page
                        >>>>>>
                        >>>>>><taofik.h idayat@gmail.co mwrote in message
                        >>>>>>news:1152 174121.598411.1 61670@b68g2000c wa.googlegroups .com...
                        >>>>>>
                        >>>>>>
                        >>>>>>
                        >>>>>>>If Windows you've installed, please make a folder tmp, like: c:\\tmp.
                        >>>>>>>
                        >>>>>>>Auddog wrote:
                        >>>>>>>
                        >>>>>>>
                        >>>>>>>
                        >>>>>>>>I have installed php on my server and can get the phpinfo page to
                        >>>>>>>>display .
                        >>>>>>>>I have installed mysql 5 and I'm able to get into the database and
                        >>>>>>>>creat e
                        >>>>>>>>data. I would like to be able to get php to pull the data. I have
                        >>>>>>>>been
                        >>>>>>>>readi ng on the internet as to what I need to do in php and have
                        >>>>>>>>creat ed a
                        >>>>>>>>coupl e of pages. When I go to the page all I get is a blank
                        >>>>>>>>scree n - no
                        >>>>>>>>data from the database.
                        >>>>>>>>
                        >>>>>>>>I edited my php.ini file to allow for mysql. I copied libmysql.dll
                        >>>>>>>>to my
                        >>>>>>>>c:\wind ows\system32 directory. Is there anything else that I need
                        >>>>>>>>to do to
                        >>>>>>>>make mysql and php work together?
                        >>>>>>>>
                        >>>>>>>>Will
                        >>>>>>
                        >>>>>>
                        >>>>>>
                        >>>>>If you get an error, you're throwing an exception but not catching it.
                        >>>>>
                        >>>>>Rather, try:
                        >>>>>
                        >>>>>error_repo rting(E_ALL);
                        >>>>>if(!$db=my sqli_connect('l ocalhost','root ','password','p ppe')){
                        >>>>echo 'Error connecting to host. '.mysqli_connec t_error());
                        >>>>exit();
                        >>>>>}
                        >>>>>... rest of code
                        >>>>>
                        >>>>>(P.S. Please don't top post. Thanks.).
                        >>>>>
                        >>>
                        >>>Again, please don't top post. This newsgroup uses bottom posting as a
                        >>>standard.
                        >>>
                        >>>Did you take out your throw statement and put in the echo like I asked?
                        >>>
                        >>>--
                        >>>============ ======
                        >>>Remove the "x" from my email address
                        >>>Jerry Stuckle
                        >>>JDS Computer Training Corp.
                        >>>jstucklex@at tglobal.net
                        >>>============ ======
                        >>
                        >>
                        >Here is my entire code:
                        >>
                        ><!doctype html public "-//W3C//DTD HTML 4.0 //EN">
                        ><html>
                        ><head>
                        > <title>Host Information</title>
                        ></head>
                        ><body>
                        >>
                        ><?php
                        >error_reportin g(E_ALL);
                        >>
                        >// example using procedural approach
                        >if(!$db=mysqli _connect('local host','root','p assword','ppe') )
                        >{
                        >echo 'Error connecting to host. '.mysqli_connec t_error());
                        >exit();
                        >}
                        >// display host information
                        >echo 'Host information: '.mysqli_get_ho st_info($db);
                        >>
                        >// close connection
                        >mysqli_close($ db);
                        >>
                        >?>
                        ></body>
                        ></html>
                        >>
                        >Here's something else that I find odd. If I change the title to the web
                        >page and save, when I bring up the page, I does not reflect the change.
                        >I just can't figure out what is wrong.
                        >>
                        >A
                        >>
                        >ps - sorry about the top posts
                        >>
                        >>
                        >
                        OK, that's important. It means either you're loading the wrong page, or
                        the page is being cached - either by your browser or somewhere along the
                        line.
                        >
                        Try renaming your file to something you haven't used before and see what
                        happens. Also try clearing the cache in your browser.
                        >
                        And thanks for bottom posting!
                        >
                        --
                        =============== ===
                        Remove the "x" from my email address
                        Jerry Stuckle
                        JDS Computer Training Corp.
                        jstucklex@attgl obal.net
                        =============== ===
                        When I rename the file it doesn't load the title in either IE6 or firefox.
                        If I delete all the files and history in IE6, I still have the same problem.
                        Did I miss something in the ini file or might have I not copied all the
                        files to the correct location?

                        A


                        Comment

                        • Auddog

                          #13
                          Re: working with mysql


                          "Auddog" <will_k@hotmail .comwrote in message
                          news:Xxcrg.1221 5$lk7.11876@tor nado.rdc-kc.rr.com...
                          >
                          "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                          news:7--dndlSwo3IzDDZnZ 2dnUVZ_oadnZ2d@ comcast.com...
                          >Auddog wrote:
                          >>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                          >>news:AYadnQ-8XYQoojDZnZ2dnU VZ_q6dnZ2d@comc ast.com...
                          >>>
                          >>>>Auddog wrote:
                          >>>>
                          >>>>>thanks, I should've known to place that at the top.
                          >>>>>
                          >>>>>That being said, I still get nothing but a blank page
                          >>>>>
                          >>>>>A
                          >>>>>
                          >>>>>
                          >>>>>
                          >>>>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                          >>>>>news:IKydn fxTcfDetTDZnZ2d nUVZ_sCdnZ2d@co mcast.com...
                          >>>>>
                          >>>>>
                          >>>>>>Auddog wrote:
                          >>>>>>
                          >>>>>>
                          >>>>>>>I have tried all of the options listed and I have even tried this
                          >>>>>>>code
                          >>>>>>>
                          >>>>>>><?php
                          >>>>>>>
                          >>>>>>>// example using procedural approach
                          >>>>>>>if(!$db= mysqli_connect( 'localhost','ro ot','password', 'pppe')){
                          >>>>>> throw new Exception('Erro r connecting to host.
                          >>>>>>>'.mysqli _connect_error( ));
                          >>>>>>>}
                          >>>>>>>error_re porting(E_ALL);
                          >>>>>>>
                          >>>>>>>// display host information
                          >>>>>>>echo 'Host information: '.mysqli_get_ho st_info($db);
                          >>>>>>>// close connection
                          >>>>>>>mysqli_c lose($db);
                          >>>>>>>
                          >>>>>>>?>
                          >>>>>>>
                          >>>>>>>I still get nothing but a blank page
                          >>>>>>>
                          >>>>>>><taofik. hidayat@gmail.c omwrote in message
                          >>>>>>>news:115 2174121.598411. 161670@b68g2000 cwa.googlegroup s.com...
                          >>>>>>>
                          >>>>>>>
                          >>>>>>>
                          >>>>>>>>If Windows you've installed, please make a folder tmp, like:
                          >>>>>>>>c:\\tmp .
                          >>>>>>>>
                          >>>>>>>>Auddo g wrote:
                          >>>>>>>>
                          >>>>>>>>
                          >>>>>>>>
                          >>>>>>>>>I have installed php on my server and can get the phpinfo page to
                          >>>>>>>>>displa y.
                          >>>>>>>>>I have installed mysql 5 and I'm able to get into the database and
                          >>>>>>>>>crea te
                          >>>>>>>>>data . I would like to be able to get php to pull the data. I have
                          >>>>>>>>>been
                          >>>>>>>>>readin g on the internet as to what I need to do in php and have
                          >>>>>>>>>create d a
                          >>>>>>>>>coup le of pages. When I go to the page all I get is a blank
                          >>>>>>>>>scre en - no
                          >>>>>>>>>data from the database.
                          >>>>>>>>>
                          >>>>>>>>>I edited my php.ini file to allow for mysql. I copied libmysql.dll
                          >>>>>>>>>to my
                          >>>>>>>>>c:\win dows\system32 directory. Is there anything else that I need
                          >>>>>>>>>to do to
                          >>>>>>>>>make mysql and php work together?
                          >>>>>>>>>
                          >>>>>>>>>Will
                          >>>>>>>
                          >>>>>>>
                          >>>>>>>
                          >>>>>>If you get an error, you're throwing an exception but not catching it.
                          >>>>>>
                          >>>>>>Rather, try:
                          >>>>>>
                          >>>>>>error_rep orting(E_ALL);
                          >>>>>>if(!$db=m ysqli_connect(' localhost','roo t','password',' pppe')){
                          >>>>>echo 'Error connecting to host. '.mysqli_connec t_error());
                          >>>>>exit();
                          >>>>>>}
                          >>>>>>... rest of code
                          >>>>>>
                          >>>>>>(P.S. Please don't top post. Thanks.).
                          >>>>>>
                          >>>>
                          >>>>Again, please don't top post. This newsgroup uses bottom posting as a
                          >>>>standard.
                          >>>>
                          >>>>Did you take out your throw statement and put in the echo like I asked?
                          >>>>
                          >>>>--
                          >>>>=========== =======
                          >>>>Remove the "x" from my email address
                          >>>>Jerry Stuckle
                          >>>>JDS Computer Training Corp.
                          >>>>jstucklex@a ttglobal.net
                          >>>>=========== =======
                          >>>
                          >>>
                          >>Here is my entire code:
                          >>>
                          >><!doctype html public "-//W3C//DTD HTML 4.0 //EN">
                          >><html>
                          >><head>
                          >> <title>Host Information</title>
                          >></head>
                          >><body>
                          >>>
                          >><?php
                          >>error_reporti ng(E_ALL);
                          >>>
                          >>// example using procedural approach
                          >>if(!$db=mysql i_connect('loca lhost','root',' password','ppe' ))
                          >>{
                          >>echo 'Error connecting to host. '.mysqli_connec t_error());
                          >>exit();
                          >>}
                          >>// display host information
                          >>echo 'Host information: '.mysqli_get_ho st_info($db);
                          >>>
                          >>// close connection
                          >>mysqli_close( $db);
                          >>>
                          >>?>
                          >></body>
                          >></html>
                          >>>
                          >>Here's something else that I find odd. If I change the title to the web
                          >>page and save, when I bring up the page, I does not reflect the change.
                          >>I just can't figure out what is wrong.
                          >>>
                          >>A
                          >>>
                          >>ps - sorry about the top posts
                          >>>
                          >>>
                          >>
                          >OK, that's important. It means either you're loading the wrong page, or
                          >the page is being cached - either by your browser or somewhere along the
                          >line.
                          >>
                          >Try renaming your file to something you haven't used before and see what
                          >happens. Also try clearing the cache in your browser.
                          >>
                          >And thanks for bottom posting!
                          >>
                          >--
                          >============== ====
                          >Remove the "x" from my email address
                          >Jerry Stuckle
                          >JDS Computer Training Corp.
                          >jstucklex@attgl obal.net
                          >============== ====
                          >
                          When I rename the file it doesn't load the title in either IE6 or firefox.
                          If I delete all the files and history in IE6, I still have the same
                          problem. Did I miss something in the ini file or might have I not copied
                          all the files to the correct location?
                          >
                          A
                          >
                          It has to be something to do with the database connectivity as I can create
                          different php pages, make changes and have it display without problems.

                          A


                          Comment

                          • Jerry Stuckle

                            #14
                            Re: working with mysql

                            Auddog wrote:
                            "Auddog" <will_k@hotmail .comwrote in message
                            news:Xxcrg.1221 5$lk7.11876@tor nado.rdc-kc.rr.com...
                            >
                            >>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                            >>news:7--dndlSwo3IzDDZnZ 2dnUVZ_oadnZ2d@ comcast.com...
                            >>
                            >>>Auddog wrote:
                            >>>
                            >>>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                            >>>>news:AYad nQ-8XYQoojDZnZ2dnU VZ_q6dnZ2d@comc ast.com...
                            >>>>
                            >>>>
                            >>>>>Auddog wrote:
                            >>>>>
                            >>>>>
                            >>>>>>thanks, I should've known to place that at the top.
                            >>>>>>
                            >>>>>>That being said, I still get nothing but a blank page
                            >>>>>>
                            >>>>>>A
                            >>>>>>
                            >>>>>>
                            >>>>>>
                            >>>>>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                            >>>>>>news:IKyd nfxTcfDetTDZnZ2 dnUVZ_sCdnZ2d@c omcast.com...
                            >>>>>>
                            >>>>>>
                            >>>>>>
                            >>>>>>>Auddog wrote:
                            >>>>>>>
                            >>>>>>>
                            >>>>>>>
                            >>>>>>>>I have tried all of the options listed and I have even tried this
                            >>>>>>>>code
                            >>>>>>>>
                            >>>>>>>><?php
                            >>>>>>>>
                            >>>>>>>>// example using procedural approach
                            >>>>>>>>if(!$db =mysqli_connect ('localhost','r oot','password' ,'pppe')){
                            >>>>>>> throw new Exception('Erro r connecting to host.
                            >>>>>>>>'.mysql i_connect_error ());
                            >>>>>>>>}
                            >>>>>>>>error_r eporting(E_ALL) ;
                            >>>>>>>>
                            >>>>>>>>// display host information
                            >>>>>>>>echo 'Host information: '.mysqli_get_ho st_info($db);
                            >>>>>>>>// close connection
                            >>>>>>>>mysqli_ close($db);
                            >>>>>>>>
                            >>>>>>>>?>
                            >>>>>>>>
                            >>>>>>>>I still get nothing but a blank page
                            >>>>>>>>
                            >>>>>>>><taofik .hidayat@gmail. comwrote in message
                            >>>>>>>>news:11 52174121.598411 .161670@b68g200 0cwa.googlegrou ps.com...
                            >>>>>>>>
                            >>>>>>>>
                            >>>>>>>>
                            >>>>>>>>
                            >>>>>>>>>If Windows you've installed, please make a folder tmp, like:
                            >>>>>>>>>c:\\tm p.
                            >>>>>>>>>
                            >>>>>>>>>Audd og wrote:
                            >>>>>>>>>
                            >>>>>>>>>
                            >>>>>>>>>
                            >>>>>>>>>
                            >>>>>>>>>>I have installed php on my server and can get the phpinfo page to
                            >>>>>>>>>>displ ay.
                            >>>>>>>>>>I have installed mysql 5 and I'm able to get into the database and
                            >>>>>>>>>>creat e
                            >>>>>>>>>>dat a. I would like to be able to get php to pull the data. I have
                            >>>>>>>>>>bee n
                            >>>>>>>>>>readi ng on the internet as to what I need to do in php and have
                            >>>>>>>>>>creat ed a
                            >>>>>>>>>>coupl e of pages. When I go to the page all I get is a blank
                            >>>>>>>>>>scree n - no
                            >>>>>>>>>>dat a from the database.
                            >>>>>>>>>>
                            >>>>>>>>>>I edited my php.ini file to allow for mysql. I copied libmysql.dll
                            >>>>>>>>>>to my
                            >>>>>>>>>>c:\wi ndows\system32 directory. Is there anything else that I need
                            >>>>>>>>>>to do to
                            >>>>>>>>>>mak e mysql and php work together?
                            >>>>>>>>>>
                            >>>>>>>>>>Wil l
                            >>>>>>>>
                            >>>>>>>>
                            >>>>>>>>
                            >>>>>>>If you get an error, you're throwing an exception but not catching it.
                            >>>>>>>
                            >>>>>>>Rather , try:
                            >>>>>>>
                            >>>>>>>error_re porting(E_ALL);
                            >>>>>>>if(!$db= mysqli_connect( 'localhost','ro ot','password', 'pppe')){
                            >>>>>>>echo 'Error connecting to host. '.mysqli_connec t_error());
                            >>>>>>>exit() ;
                            >>>>>>>}
                            >>>>>>>... rest of code
                            >>>>>>>
                            >>>>>>>(P.S. Please don't top post. Thanks.).
                            >>>>>>>
                            >>>>>
                            >>>>>Again, please don't top post. This newsgroup uses bottom posting as a
                            >>>>>standard .
                            >>>>>
                            >>>>>Did you take out your throw statement and put in the echo like I asked?
                            >>>>>
                            >>>>>--
                            >>>>>========== ========
                            >>>>>Remove the "x" from my email address
                            >>>>>Jerry Stuckle
                            >>>>>JDS Computer Training Corp.
                            >>>>>jstucklex@ attglobal.net
                            >>>>>========== ========
                            >>>>
                            >>>>
                            >>>>Here is my entire code:
                            >>>>
                            >>>><!doctype html public "-//W3C//DTD HTML 4.0 //EN">
                            >>>><html>
                            >>>><head>
                            >>> <title>Host Information</title>
                            >>>></head>
                            >>>><body>
                            >>>>
                            >>>><?php
                            >>>>error_repor ting(E_ALL);
                            >>>>
                            >>>>// example using procedural approach
                            >>>>if(!$db=mys qli_connect('lo calhost','root' ,'password','pp e'))
                            >>>>{
                            >>>>echo 'Error connecting to host. '.mysqli_connec t_error());
                            >>>>exit();
                            >>>>}
                            >>>>// display host information
                            >>>>echo 'Host information: '.mysqli_get_ho st_info($db);
                            >>>>
                            >>>>// close connection
                            >>>>mysqli_clos e($db);
                            >>>>
                            >>>>?>
                            >>>></body>
                            >>>></html>
                            >>>>
                            >>>>Here's something else that I find odd. If I change the title to the web
                            >>>>page and save, when I bring up the page, I does not reflect the change.
                            >>>>I just can't figure out what is wrong.
                            >>>>
                            >>>>A
                            >>>>
                            >>>>ps - sorry about the top posts
                            >>>>
                            >>>>
                            >>>
                            >>>OK, that's important. It means either you're loading the wrong page, or
                            >>>the page is being cached - either by your browser or somewhere along the
                            >>>line.
                            >>>
                            >>>Try renaming your file to something you haven't used before and see what
                            >>>happens. Also try clearing the cache in your browser.
                            >>>
                            >>>And thanks for bottom posting!
                            >>>
                            >>>--
                            >>>============ ======
                            >>>Remove the "x" from my email address
                            >>>Jerry Stuckle
                            >>>JDS Computer Training Corp.
                            >>>jstucklex@at tglobal.net
                            >>>============ ======
                            >>
                            >>When I rename the file it doesn't load the title in either IE6 or firefox.
                            >>If I delete all the files and history in IE6, I still have the same
                            >>problem. Did I miss something in the ini file or might have I not copied
                            >>all the files to the correct location?
                            >>
                            >>A
                            >>
                            >
                            >
                            It has to be something to do with the database connectivity as I can create
                            different php pages, make changes and have it display without problems.
                            >
                            A
                            >
                            >
                            No, it wouldn't have anything to do directly with database connectivity
                            - I suspect you have a problem in your code. Are you sure you have the
                            mysqli extensions loaded? Are there any messages in your error log?

                            Something else I just thought about - what's the value of display_errors
                            in your php.ini file? It needs to be on to get errors (such as missing
                            functions) to display in your browser.

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

                            Comment

                            Working...