1.

Solve : "Inventory" for HTML RPG?

Answer»

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!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!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.Consider it done. 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.

And I get $100 all for knowing CSS and a little JavaScript and using it. Quote

Consider it done.
Haven't heard from you... try PM?

Congratulations on getting the 'job'!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 '[email protected]''localhost' (using password: YES) in C:\Program Files\Apache Group\Apache2\htdocs\test.php on line 9
Could not connect: Access denied for user '[email protected]''localhost' (using password: YES)Ah.  That's somewhat easier to resolve.  

You should not be sending '[email protected]''localhost' verification credentials.  In this case, you should be sending just '[email protected]'.  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. Code: [Select]$link = mysql_connect('localhost', '[email protected]', '*******')
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]Like I said, code snippet please.  Until I see what you're doing, I can only speculate how to fix it.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', '[email protected]', '******')
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($result, MYSQL_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>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...  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?


Discussion

No Comment Found