boo_lolly Posted January 26, 2007 Share Posted January 26, 2007 I've tried google, and i've searched the forums... but i can't find an answer to why i'm getting this error? what does it mean?[code]Fatal error: Call to undefined function mysql_connect() in D:\Htdocs\rockdaleisd.net\azureadmin\lib\db.php on line 11PHP Warning: PHP Startup: Unable to load dynamic library './php_mysql.dll' - Invalid access to memory location. in Unknown on line 0[/code]basically, i've been given the task to re-assemble a client's directory structure. so i've installed php and mysql, and copied the contents of their database, and copied their directory structure over to a test environment. it's on a windows 2003 server, by the way. can i get any help?here's index.php[code]<?php $inPreview = "1"; include_once("config/settings.php"); include_once("azureadmin/lib/db.php"); include_once("azureadmin/lib/sessions.php"); $dbh=DBConnect();// $config=LoadConfig(); $session=getSession(SESSION_NAME); $id=$session['MEMBER_ID']; $id="137"; $memData=SQLSelect("SELECT NICKNAME from members WHERE ID='$id'"); $nickname=$memData[0]['NICKNAME']; include_once("azureadmin/lib/templates.php"); include ("usersites/$nickname/content.php");?>[/code] Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 26, 2007 Share Posted January 26, 2007 Fatal error: Call to undefined function mysql_connect() in D:\Htdocs\rockdaleisd.net\azureadmin\lib\db.phpNormally, we'd need to see the file the error is occuring in, not the one in which you include the problem file.However it looks like PHP was not set up with the mysql library. Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 26, 2007 Author Share Posted January 26, 2007 [quote author=jesirose link=topic=124220.msg514388#msg514388 date=1169850906]Fatal error: Call to undefined function mysql_connect() in D:\Htdocs\rockdaleisd.net\azureadmin\lib\db.phpNormally, we'd need to see the file the error is occuring in, not the one in which you include the problem file.However it looks like PHP was not set up with the mysql library.[/quote]i just noticed that, i'm sorry. why didn't it compile with the lib file? what did i do wrong during install? where do i get this lib file? is as simple as placing it in a certain directory and then BOOM all my problems are solved? Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 26, 2007 Author Share Posted January 26, 2007 i ran a search and i found php_mysql.dll in the following directories:[code]C:\PHPC:\WINDOWS\system32PHP/extD:\rockdaleisd.net\risd\restore\MySQL\MySQL Server 5.0\binD:\Htdocs\rockdaleisd.net\risd\restore\MySQL\MySQL Server 5.0\binInetpub/wwwroot/rist/restore/MySQL/MySQL Server 5.0/binD:\Htdocs\rockdaleisd.net\rockdaleisd.net\risd\restore\MySQL\MySQL Server 5.0\bin[/code]so it's there.... maybe it's in the wrong place?? i tried opening it in the Vim file editor but it comes up just a bunch of random characters. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 27, 2007 Share Posted January 27, 2007 If you used the forums search feature you should of come across [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]this FAQ[/url]. It should help you.the mysql library (and mysql improved library (php_mysqli.dll)) depend upon another file called libmysql.dll - this file should be located in the root of your PHP folder (C:\php). It is best to add PHP to the Windows PATH variable. This saves having to move PHP's files around the file system. If you don't add PHP to the Windows PATH then copy libmysql.dll to C:/WINDOWSRestart Apache (or whatever your server is). The MySQL library should now be loaded*.* Make sure you have enabled the extension in the php.ini and that you have setup the extension_dir directive correctly too. Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 29, 2007 Author Share Posted January 29, 2007 thank you so much wildteen. it turns out that the simulated environment i'm working on had php 5.1.2. i upgraded and installed 5.2.0 on it, made the necessary revisions to php.ini, and i restarted IIS (Windows 2003 Server). now, when i go to the index.php page... it says it can't find it... i don't get any mysql or php errors (which is awesome), but now it says Error 404, page cannot be found. i have no idea why. i don't work with windblows. i'm a linux user, our technician put this server together (and he is very good at windows stuff). but, i'm the developer, so i'm supposed to figure this stuff out... i have no idea where to start. please help. your advice has worked so far =)i don't know if this makes a difference, but everything PHP related is in C:\PHP but my i have D:\Htdocs in the D-drive. Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 29, 2007 Author Share Posted January 29, 2007 soooo, now... i decided to download all the extensions and added them to my C:\PHP folder from a zip file that wildteen had recommended in a related topic, then i restarted IIS server, and NOW.... it gives me the following error:[code]CGI ErrorThe specified CGI application misbehaved by not returning a complete set of HTTP headers.[/code]...? where do i go from here? Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 29, 2007 Author Share Posted January 29, 2007 so, now, i've learned that there must have been something wrong with the IIS configuration. after further review i found that, for some reason, IIS was calling the executable 'php-cgi.exe' instead of 'php.exe'... after i changed that... it now gives me the following error:[code]Service Unavailable[/code]however, this is only when i add what's called 'ISAPI Filters'. it is a part of IIS configuration (by right clicking the folder your websites are in using the IIS Manager application). this is what it looks like in the little windblows config window...[code]+---------+----------------+--------------+| STATUS | Filter Name | Priority |+---------+----------------+--------------+| \/ | php | * Unknown * |+---------+----------------+--------------+| \/ | .php | * Unknown * |+---------+----------------+--------------+[/code]the \/ is in place of a red 'downward arrow'. i assume that if it were working correctly it would be a green upward arrow...when i remove these 'filters'... the page takes over 2 minutes to load... and then brings me this error:[code]CGI TimeoutThe specified CGI application exceeded the allowed time for processing. The server has deleted the process.[/code]so, it still doesn't work... and i'm trying effortlessly to figure it out. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 29, 2007 Share Posted January 29, 2007 I have no idea how IIS works. So I cant really help you sorry. However I what I can do is send you to the manual on configuring IIS. [url=http://www.php.net/manual/en/install.windows.iis.php]clicky[/url] Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 29, 2007 Author Share Posted January 29, 2007 [quote author=wildteen88 link=topic=124220.msg516420#msg516420 date=1170104841]I have no idea how IIS works. So I cant really help you sorry. However I what I can do is send you to the manual on configuring IIS. [url=http://www.php.net/manual/en/install.windows.iis.php]clicky[/url][/quote]that's ok wildteen... i don't know anything about IIS either, that's why i'm having so much trouble. i am/have been reading the manual in hopes of shedding some light on my situation. if i figure it out, i'll post it in this topic. thanks again bud! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.