Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
MySQL/localhost problems

Posted by Simon (Simon), 1 March 2003
Hi

I'm trying to setup my computer as a server.

OS: XP Pro
IIS: installed
mysql-3.23.55-win
php-4.3.1-Win32

When I ran "winmysqladmin" I received an ODBC error saying that 3.51 drive hadn't been found. I didn't find the 3.51 driver straight away but found the "myodbc-2.50.39-nt" which I installed, error still there! (obviously!). I have since installed the 3.51 driver which has cured that error.

Do I need to remove the 2.50 driver? If so how?

I've used a test.php (located in "c:/Inetpub/wwwroot") from "PHP & MySQL for DUMMIES" (like me) and I get the following error:

Error " . mysql_errno() . ": " . mysql_error() . ""); elseif (mysql_num_rows($result) == 0) echo("Query executed successfully!"); else { ?> Variable_name Value
"); $row_array = mysql_fetch_row($result); for ($j = 0; $j < mysql_num_fields($result); $j++) { echo(" " . $row_array[$j] . " "); } echo("
"); } ?>  

I set the following as:
$host="localhost";
$user="root";
$password="";

I've since tried the same "test.php" on a commercial web host and it ran fine.

Can some one please point me in the right direction?

Thanks

Simon


Posted by admin (Graham Ellis), 1 March 2003
Hi, Simon ... welcome the forum.  I don't know the answer off the top of my head to this one, and I'm out of the office at present so away from my books (and my XP system too); back there in a couple of days, and I'll see if I can come up with some better guidance though ... goodness ... this one is a bit out of my norm as I'm much more apache than IIS.

Questions that may help me / other readers help you  

1. Are you able to talk directly from your PHP web pages to your MySQL?

2. Are you able to use a mysql client to talk directly to your database?

If the answers to the above are "yes", then good; if not, then you have a more fundamental problem with your database installation; go check that out or let us know the problems at that level ... these tests will at least halve the area that you're looking in for the problem.

Posted by waygood (waygood), 1 July 2003
I would suggest you re-install mysql, and try a more up to date version (4+).

I would emulate as much as you can on your local machine as your hosting server. That is, use Apache and not IIS (switch servers if not apache). You get added functionality in apache, which you may want to use later, but then cant test locally.

I do use IIS in work and have come to a point where I now have to section off a piece of the server for development because I cant run the code locally.
I can either install apache or PAY FOR an addon for IIS, but I am doing some coding at home so its easier to have the code in one place.


p.s. try the test script of <?php phpinfo(); ?>
This show you what is loaded

Posted by admin (Graham Ellis), 2 July 2003
Excellent suggestions there, Waygood.  The original post on this one was a while back; at that stage MySQL 4 hadn't gone production .... but now it has; I have it running on our systems - we're no longer using 3.23 on courses or our own systems, though we do still use an ISP machine with the older version.

Posted by waygood (waygood), 2 July 2003
Luckily the upgrade (beta) came a day before I needed the extra functions that version 4 has.

I needed to do updates on one tables based on values from another table, which was unsupported in version 3.



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho