Page 1 of 2
Fatal error: unidentified function mysql_connect()...?
Posted: Fri Jan 26, 2007 4:28 pm
by boo_lolly
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: Select all
Fatal error: Call to undefined function mysql_connect() in D:\Htdocs\rockdaleisd.net\azureadmin\lib\db.php on line 11
PHP Warning: PHP Startup: Unable to load dynamic library './php_mysql.dll' - Invalid access to memory location. in Unknown on line 0
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: Select all
<?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");
?>
Posted: Fri Jan 26, 2007 4:30 pm
by Luke
it means php can't find your mysql dll file...
Posted: Fri Jan 26, 2007 4:38 pm
by boo_lolly
The Ninja Space Goat wrote:it means php can't find your mysql dll file...
right, well what's that lib file? where do i get one? did it not install when i compiled php or mysql? why didn't it get installed?
Posted: Fri Jan 26, 2007 4:47 pm
by feyd
You compiled PHP?
Posted: Fri Jan 26, 2007 4:51 pm
by boo_lolly
feyd wrote:You compiled PHP?
installed. you know what i mean

Posted: Fri Jan 26, 2007 4:59 pm
by boo_lolly
i ran a search and i found php_mysql.dll in the following directories:
Code: Select all
C:\PHP
C:\WINDOWS\system32
PHP/ext
D:\rockdaleisd.net\risd\restore\MySQL\MySQL Server 5.0\bin
D:\Htdocs\rockdaleisd.net\risd\restore\MySQL\MySQL Server 5.0\bin
Inetpub/wwwroot/rist/restore/MySQL/MySQL Server 5.0/bin
D:\Htdocs\rockdaleisd.net\rockdaleisd.net\risd\restore\MySQL\MySQL Server 5.0\bin
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.
Posted: Fri Jan 26, 2007 8:18 pm
by Jenk
have you checked to ensure the php_mysql extension is uncommented in php.ini?
Posted: Sat Jan 27, 2007 12:28 pm
by boo_lolly
Jenk wrote:have you checked to ensure the php_mysql extension is uncommented in php.ini?
yes i have... it is...
Posted: Sat Jan 27, 2007 1:07 pm
by volka
I suggest re-installing php completely.
Posted: Sat Jan 27, 2007 3:00 pm
by feyd
volka wrote:I suggest re-installing php completely.
To continue this thought: .... from the zip, no installer, just the zip.
Posted: Sat Jan 27, 2007 3:09 pm
by volka
previously on battlestar devnet...
feyd wrote:volka wrote:I suggest re-installing php completely.
To continue this thought: .... from the zip, no installer, just the zip.
and now the continuation:
or if it must be an installer use the
xampp installer
.oO( although the new php/win32 installer from php.net really is an improvment compared to previous versions )
Posted: Sat Jan 27, 2007 5:48 pm
by feyd
I don't know if I'll every try the "new" installer considering how useless the older ones were..

Posted: Mon Jan 29, 2007 11:25 am
by boo_lolly
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 windows. 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.
Posted: Mon Jan 29, 2007 11:37 am
by boo_lolly
i downloaded all the extensions and added them to my C:\PHP folder from a zip file, then i restarted IIS server, and NOW.... it gives me the following error:
Code: Select all
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.
...?
Posted: Mon Jan 29, 2007 11:38 am
by Kieran Huggins
Have you considered trying Uniform Server? It comes with php 5.1.1, but most of the PECL libs are there... and you can drop in the latest php version if you want.
Oh, and no installer, just a zip and a "start.bat".