Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: "Inventory" for HTML RPG  (Read 43478 times)

0 Members and 1 Guest are viewing this topic.

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: "Inventory" for HTML RPG
« Reply #45 on: March 30, 2006, 12:48:14 AM »
No.  The error you're reporting indicates that the mysql function library is not loaded, for some reason.  You would get a different error if you were having a DB authentication problem.

I'm afraid that all I can suggest at this point is to remove PHP and reinstall, following the Win installation instructions as carefully as possible, and then repeating the steps in this thread.  Perhaps you missed something along the way?

I haven't given up though and will keep thinking!
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos

Dilbert

    Topic Starter
  • Moderator


  • Egghead

  • Welcome to ComputerHope!
  • Thanked: 44
    Re: "Inventory" for HTML RPG
    « Reply #46 on: March 30, 2006, 09:19:06 AM »
    I am attaching screenshots of my C:\PHP and subfolders. I am also attaching copies of my php.ini and httpd.conf. Let me know if you want the Apache directories as well.

    ...

    apparently, I'm NOT uploading screenshots. (Stupid **** file limit) But I can upload the text files.

    ...

    WHAT!!! HOW CAN 26 KB EXCEED THE ****ING 250 KB LIMIT!!! AAAAAHHH!
    "The geek shall inherit the Earth."

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: "Inventory" for HTML RPG
    « Reply #47 on: March 30, 2006, 11:42:22 AM »
    Drop me a line via the "contact" page of my web site; I'll email you back, then you can email screenshots etc. to me.
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    Dilbert

      Topic Starter
    • Moderator


    • Egghead

    • Welcome to ComputerHope!
    • Thanked: 44
      Re: "Inventory" for HTML RPG
      « Reply #48 on: March 30, 2006, 11:46:10 AM »
      Consider it done. ;D The total pics and text so far, when zipped, is about 400 KB. (I tried JPG instead of PNG, but it was even larger)

      Oh, by the way, my writing QA0014 got me a job. My mother has decided SHE wants to build a site, and she needs help to do it. One of my negotiating points is that I get to put up my own site when this is done. So, after we get this problem fixed and I get the pages written, I'll finally have the green light to put this baby on the web. ;D

      And I get $100 all for knowing CSS and a little JavaScript and using it.
      « Last Edit: March 30, 2006, 07:37:42 PM by Timothy_Bennett »
      "The geek shall inherit the Earth."

      Rob Pomeroy



        Prodigy

      • Systems Architect
      • Thanked: 124
        • Me
      • Experience: Expert
      • OS: Other
      Re: "Inventory" for HTML RPG
      « Reply #49 on: March 31, 2006, 03:16:40 AM »
      Quote
      Consider it done.
      Haven't heard from you... try PM?

      Congratulations on getting the 'job'!
      Only able to visit the forums sporadically, sorry.

      Geek & Dummy - honest news, reviews and howtos

      Dilbert

        Topic Starter
      • Moderator


      • Egghead

      • Welcome to ComputerHope!
      • Thanked: 44
        Re: "Inventory" for HTML RPG
        « Reply #50 on: April 02, 2006, 03:13:31 PM »
        Hello, rob! Excellent news! I was browsing my services list and say MySQL disabled. I set it to manual and enabled it. Well, that solved that error...

        ...but now I get a different one:

        Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root@localhost'@'localhost' (using password: YES) in C:\Program Files\Apache Group\Apache2\htdocs\test.php on line 9
        Could not connect: Access denied for user 'root@localhost'@'localhost' (using password: YES)
        "The geek shall inherit the Earth."

        Rob Pomeroy



          Prodigy

        • Systems Architect
        • Thanked: 124
          • Me
        • Experience: Expert
        • OS: Other
        Re: "Inventory" for HTML RPG
        « Reply #51 on: April 03, 2006, 03:31:23 AM »
        Ah.  That's somewhat easier to resolve.  :)

        You should not be sending 'root@localhost'@'localhost' verification credentials.  In this case, you should be sending just 'root@localhost'.  Can you please post a code snippet of your connection attempt?  (Or refer me to it if you've already posted it.  ;) )  Blank out the password, naturally.
        Only able to visit the forums sporadically, sorry.

        Geek & Dummy - honest news, reviews and howtos

        Dilbert

          Topic Starter
        • Moderator


        • Egghead

        • Welcome to ComputerHope!
        • Thanked: 44
          Re: "Inventory" for HTML RPG
          « Reply #52 on: April 03, 2006, 10:02:53 AM »
          Code: [Select]
          $link = mysql_connect('localhost', 'root@localhost', '*******')
          or die('Could not connect: ' . mysql_error());

          I did that because I thought it said to log in with the host, the user, and the PW. :-/

          At least, that was the idea I got from the first example here.

          [edit]On a whim, I removed the @localhost from the username. I got this error:

          Quote
          Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in C:\Program Files\Apache Group\Apache2\htdocs\test.php on line 9
          Could not connect: Can't connect to MySQL server on 'localhost' (10061)

          Putting the @localhost back in gave me the same error. :-?[/edit]
          « Last Edit: April 03, 2006, 12:19:52 PM by Timothy_Bennett »
          "The geek shall inherit the Earth."

          Rob Pomeroy



            Prodigy

          • Systems Architect
          • Thanked: 124
            • Me
          • Experience: Expert
          • OS: Other
          Re: "Inventory" for HTML RPG
          « Reply #53 on: April 03, 2006, 01:34:44 PM »
          Like I said, code snippet please.  Until I see what you're doing, I can only speculate how to fix it.
          Only able to visit the forums sporadically, sorry.

          Geek & Dummy - honest news, reviews and howtos

          Dilbert

            Topic Starter
          • Moderator


          • Egghead

          • Welcome to ComputerHope!
          • Thanked: 44
            Re: "Inventory" for HTML RPG
            « Reply #54 on: April 03, 2006, 01:51:24 PM »
            That code at the top of my last post isn't it? The whole code for that page is

            Code: [Select]
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

            <html>
            <head>
            <title>Untitled</title>
            </head>
            <body>
            <?php
            $link 
            mysql_connect('localhost''root@localhost''******')
            or die(
            'Could not connect: ' mysql_error());
            ?>

            <p>Connected successfully</p>
            <?php
            mysql_select_db
            ('inventory') or die('Could not select database');

            $query 'SELECT * FROM items';
            $result mysql_query($query) or die('Query failed: ' mysql_error());
            ?>

            <table>
            <?php
            while ($line mysql_fetch_array($resultMYSQL_ASSOC)) {
            ?>

              <tr>
            <?php
               
            foreach ($line as $col_value) {
            ?>

                <td><?php echo ($col_value != '' $col_value '&nbsp;'); ?></td>
            <?php
               
            }
            ?>

              <tr>
            <?php
            }
            ?>

            </table>
            <?php
            mysql_free_result
            ($result);
            mysql_close($link);
            ?>

            </body>
            </html>
            "The geek shall inherit the Earth."

            Rob Pomeroy



              Prodigy

            • Systems Architect
            • Thanked: 124
              • Me
            • Experience: Expert
            • OS: Other
            Re: "Inventory" for HTML RPG
            « Reply #55 on: April 04, 2006, 02:48:10 AM »
            I'm so sorry - I've no idea how I missed that before!

            Right, now your connection syntax should be as follows:
            $link = mysql_connect('localhost', 'root', '********') or die ('Could not connect: ' . mysql_error());

            i.e. leave out the '@localhost" bit.

            MySQL permissions are specific to the host from which you're connectiing (and this is detected automatically), so you can only connect from localhost as root, if you have already given yourself this permission.  The error you're seeing could be due to a permissions error, or it could be due to a non-listening MySQL server.

            Double-check that the MySQL server is running.  I'm assuming you didn't change the default port when you installed it.  Ensure that your firewall is not blocking connections on that port (3306).

            The MySQL installation on Windows comes with some GUI clients; you can try using them to connect to the server.  You can also try the tests on this page.  I recommend bookmarking the MySQL reference pages, if you haven't already done so.  I refer to them all the time.

            Report back, and do bear with me if I appear to be blind or stupid...  :-[
            Only able to visit the forums sporadically, sorry.

            Geek & Dummy - honest news, reviews and howtos

            Dilbert

              Topic Starter
            • Moderator


            • Egghead

            • Welcome to ComputerHope!
            • Thanked: 44
              Re: "Inventory" for HTML RPG
              « Reply #56 on: April 04, 2006, 08:15:35 AM »
              Hey, missing a piece of a post is a common, everyday mistake. I do it all the time, as is evident with my Linux thread. The line

              Quote
              do bear with me if I appear to be blind or stupid...

              Ought to be coming from me! ;)

              I'll do this after school, but right now I'm just checking the forums and modifying my mental "to do list".

              Or am I just mental?
              « Last Edit: April 04, 2006, 08:17:52 AM by Timothy_Bennett »
              "The geek shall inherit the Earth."