{"id":1322,"date":"2010-01-13T08:51:43","date_gmt":"2010-01-13T13:51:43","guid":{"rendered":"http:\/\/www.plastibots.com\/?p=1322"},"modified":"2014-12-21T06:32:33","modified_gmt":"2014-12-21T11:32:33","slug":"fun-with-php-mysql-on-windows-2000-advanced-server","status":"publish","type":"post","link":"https:\/\/www.plastibots.com\/index.php\/2010\/01\/13\/fun-with-php-mysql-on-windows-2000-advanced-server\/","title":{"rendered":"Fun with PHP, MySQL on Windows 2000 Advanced Server"},"content":{"rendered":"<div><span style=\"font-size: x-small; font-family: Arial;\">I recently decided that it is about time to replace my old P4 server in the interest of speed, space and power reductions. Even with a P4, this sever is heavily underused.\u00a0 <a title=\"PHP\" href=\"http:\/\/www.php.net\/\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-1323\" title=\"PHP Logo\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2009\/01\/php-logo.gif\" alt=\"\" width=\"170\" height=\"102\" \/><\/a> My choice was a mini-ITX form factor system running the Intel Atom N330 Dual Core processor.\u00a0 Although there is little improvement over CPU speed, I also migrated to an OCZ Indilinx SSD.\u00a0 That&#8217;s a little background for you.\u00a0 Now, my existing machine is my web\/db server and is running Windows 2000 (yes, I realize its a 10yr old OS, but its working just fine for my purposes), SQL Server, MySQL, IIS5 and PHP. <\/span><\/div>\n<div><\/div>\n<p><!--more--><\/p>\n<div><span style=\"font-size: x-small; font-family: Arial;\">The reason why I am writing this is to help others try to avoid a very small item I missed with my PHP install that caused me hours of delay. From what I have seen in the numerous searches I did out there, others have the same problem, and some may not have even discovered it.\u00a0 The funny part is that it is obvious once you figure it out!\u00a0 Read on for more info and details of the issue&#8230;<\/span><\/div>\n<div><\/div>\n<p>[ad name=&#8221;GoogleAS728x90&#8243;]<\/p>\n<div><span style=\"font-size: x-small; font-family: Arial;\">Before I got the new machine, I wanted to do a test run of the OS and software on my Asus EEE 901 &#8211; just for fun!\u00a0 For the most part, I wanted to test the operation of this wordpress site (plastibots.com), PHP and MySQL.\u00a0\u00a0\u00a0 The 901 has a dual boot and my second drive (4GB SSD) was the one I chose to put W2K Advanced Server on.\u00a0 So, I went through the routine to install the server OS, get IIS up and running etc.\u00a0 I also went through a fresh install of MySQL.\u00a0 So that all went fine.\u00a0 I decided that since PHP does not really need to be installed &#8211; I copied it over to the 901, setup the ISAPI redirector in IIS, and added the path entry C:\\PHP to the PATH variable.\u00a0 All is good right?\u00a0 Well, when I ran my test PHP page, it showed that all was fine, I got all the PHP config and info bits, so I thought I was good.\u00a0 (Important Note &#8211; I had the <strong>php_mysql<\/strong>.<strong>dll <\/strong>extenstion enabled in php.ini &#8211; but I did not notice MySQL was not showing in the config page.\u00a0 I also recall in the past that the config page would complain about missing extensions with a PHP error instead of the config=ok page). <\/span><\/div>\n<div><\/div>\n<div><span style=\"font-size: x-small; font-family: Arial;\">In order to get my WordPress site db up and running, I installed PHPMyAdmin.\u00a0 This is when the trouble started.\u00a0 When I first tried to run this, I got an error pointing me to php mysql (something along the lines of it not being configured or running).\u00a0 This is when the clock started ticking and I tried to make friends with Google search (as I do many times a day).\u00a0 Most (if not all) the searches I came up with pointed me to all the normal things to check with a PHP install.\u00a0 Which I verified and confirmed.\u00a0 What kept throwing me off is that with all my past PHP installs, I seem to recall the phpinfo test page always failing if extensions could not load.\u00a0 What makes this all worse was that I had a terminal window open all during combing through my current P4 server config to see what I was missing &#8211; and I did not notice it.<\/span><\/div>\n<div><\/div>\n<div><span style=\"font-size: x-small; font-family: Arial;\">After many searches and pulling my hair out, it hit me as I was looking at my P4 server environment variables.\u00a0\u00a0 <strong>A variable in the list of System Variables (same location as the PATH var) there it was.\u00a0 A variable called PHPRC that points to the PHP path (c:\\PHP in my case). <\/strong> <strong>I created this variable on the 901 and BAM! PhpMySQL came alive.<\/strong> When I ran my php test page (phpinfo) I then noticed the MySQL header and details section (something I forgot about in the past and did not take notice of).\u00a0 I think part of my problem was that I was hung up (and convinced) that phpinfo should have been failing if an extension could not load &#8211; and I knew that the purpose of the PATH environment variable was so that PHP could find the extension directory.\u00a0\u00a0I also\u00a0just decided to go check the PHP manual installation documentation, and although it mentions the PATH variable,\u00a0the PHPRC variable was not\u00a0pointed out that obviously in the steps. So, if you did not know you needed it, you would not know what to look for.\u00a0 (I did find it in the user comment postings further down the page after specifically searching for PHPRC) \u00a0Because of this, I was focused in finding the solution in other places and in other parts of either PHP, the dll itself (its version) as well as seeing what files where in the \/WINNT\/System32 folder.\u00a0 I&#8217;ll also add that I have NO PHP or MySQL dll files in the \/System32 folder (as I have seen many solutions out there that indicate that this is the solution). My system works with all PHP files in the \/PHP directory (ditto for MySQL).<\/span><\/div>\n<div><\/div>\n<p>[ad name=&#8221;GoogleAS728x90&#8243;]<\/p>\n<div><span style=\"font-size: x-small; font-family: Arial;\">Needless to say, I documented this install as I will have to do it all again in a few weeks.\u00a0 I am posting this to help all those out there that may find themselves in a similar bind that I was in.<\/span><\/div>\n<div><span style=\"font-size: x-small; font-family: Arial;\"> <\/span><\/div>\n<div><span style=\"font-size: x-small; font-family: Arial;\">Rate This Post:\u00a0 <span id=\"post-ratings-1322\" class=\"post-ratings\" data-nonce=\"5a7fa28496\"><img decoding=\"async\" id=\"rating_1322_1\" src=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"1 Star\" title=\"1 Star\" onmouseover=\"current_rating(1322, 1, '1 Star');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_1322_2\" src=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"2 Stars\" title=\"2 Stars\" onmouseover=\"current_rating(1322, 2, '2 Stars');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_1322_3\" src=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"3 Stars\" title=\"3 Stars\" onmouseover=\"current_rating(1322, 3, '3 Stars');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_1322_4\" src=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"4 Stars\" title=\"4 Stars\" onmouseover=\"current_rating(1322, 4, '4 Stars');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_1322_5\" src=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"5 Stars\" title=\"5 Stars\" onmouseover=\"current_rating(1322, 5, '5 Stars');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/> (No Ratings Yet)<br \/><span class=\"post-ratings-text\" id=\"ratings_1322_text\"><\/span><\/span><span id=\"post-ratings-1322-loading\" class=\"post-ratings-loading\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/plugins\/wp-postratings\/images\/loading.gif\" width=\"16\" height=\"16\" class=\"post-ratings-image\" \/>Loading...<\/span><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I recently decided that it is about time to replace my old P4 server in the interest of speed, space and power reductions. Even with a P4, this sever is heavily underused.\u00a0 My choice was a mini-ITX form factor system running the Intel Atom N330 Dual Core processor.\u00a0 Although there is little improvement over CPU speed, I also migrated to an OCZ Indilinx SSD.\u00a0 That&#8217;s a little background for you.\u00a0 Now, my existing machine is &hellip; <a href=\"https:\/\/www.plastibots.com\/index.php\/2010\/01\/13\/fun-with-php-mysql-on-windows-2000-advanced-server\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1322","post","type-post","status-publish","format-standard","hentry","category-uncategorized","has_no_thumb"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pK41j-lk","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/1322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/comments?post=1322"}],"version-history":[{"count":0,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/1322\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/media?parent=1322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/categories?post=1322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/tags?post=1322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}