php_in_use Posted October 25, 2006 Share Posted October 25, 2006 I am very new to php and i am trying to work my way through "PHP for Dummies".I have got to a program called [b]"mysql_send.php"[/b] ([i]mysqli[/i] version) ([url=http://janet.valade.com/downloads_fd2.html]http://janet.valade.com/downloads_fd2.html[/url]) which you can download (to save typing it out from the book). It loads up in my browser no problem but i'm getting [b]"Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mysql_send.php on line 16"[/b]The main function is to query my MySQL databases.Can anyone help me please? ???This is pretty important as its for my final year project for my degree, if I can get this working I can get my project working!! :DMany thanks ;DSteP.S. Can you recemmend a good PHP editor with line numbers please? Quote Link to comment Share on other sites More sharing options...
ozzles2006 Posted October 25, 2006 Share Posted October 25, 2006 Hmm, shouldn't it be [b]mysql_connect()[/b] ? Quote Link to comment Share on other sites More sharing options...
php_in_use Posted October 25, 2006 Author Share Posted October 25, 2006 Please remember, I'm working from the book!!It says that if I'm using PHP version 4.1 or later that I need to use "mysqli" instead of "mysql"Ste Quote Link to comment Share on other sites More sharing options...
xsist10 Posted October 25, 2006 Share Posted October 25, 2006 You'll probably find (if you're working in win32) that your mysql modules isn't loaded.Save this in a file and load it[code]<?phpphpinfo();?>[/code]If it doesn't list MySQL somewhere in the result, then you know what your problem is. Quote Link to comment Share on other sites More sharing options...
php_in_use Posted October 25, 2006 Author Share Posted October 25, 2006 Your right, I can't see MySQL in the list! Can you tell me how I can solve this! ???I think this (until I start programming my project) is going to solve the last of my problems!This is really important!! :-[Ste Quote Link to comment Share on other sites More sharing options...
heckenschutze Posted October 25, 2006 Share Posted October 25, 2006 [quote]P.S. Can you recemmend a good PHP editor with line numbers please?[/quote][url=http://www.flos-freeware.ch/notepad2.html]Notepad2[/url] Quote Link to comment Share on other sites More sharing options...
php_in_use Posted October 25, 2006 Author Share Posted October 25, 2006 Cheers, I'll have a look into that now!Ste Quote Link to comment Share on other sites More sharing options...
php_in_use Posted October 25, 2006 Author Share Posted October 25, 2006 Can anyone please help me get PHP and Apache talking to each other?I have checked my PHP folder (C:\php) and the MySQLi.dll recognises that its used for PHP even the version number is diplayed.Please, this is really important!! :'(Ste Quote Link to comment Share on other sites More sharing options...
gmwebs Posted October 25, 2006 Share Posted October 25, 2006 So does phpinfo(); now show MySQL and MySQLi sections?Here is a great article describing a resolution to this specific issue - [url=http://forge.mysql.com/wiki/PHP_FAQ]http://forge.mysql.com/wiki/PHP_FAQ[/url]Oh and try NotePad++ for a great little editor. [url=http://notepad-plus.sourceforge.net]http://notepad-plus.sourceforge.net[/url] Quote Link to comment Share on other sites More sharing options...
mschrank99 Posted October 25, 2006 Share Posted October 25, 2006 did you make sure the module is set to load in apache's config file? (httpd.conf?)Look for "loadmodule mysql"...(something) in httpd.confIf it is "commented out", meaning it looks like:;loadmodule mysql...Then remove the semicolon, then restart apache. Quote Link to comment Share on other sites More sharing options...
Barand Posted October 25, 2006 Share Posted October 25, 2006 [quote author=php_in_use link=topic=112654.msg457311#msg457311 date=1161775291]Please remember, I'm working from the book!!It says that if I'm using PHP version 4.1 or later that I need to use "mysqli" instead of "mysql"Ste[/quote]I don't normally believe in book-burning but i'd make an exception for that one.MySQLi requires PHP 5 and it's not a case of must then use MySQLi; you still have the choice of the MySQL functions or the MySQLi ones. Quote Link to comment Share on other sites More sharing options...
gmwebs Posted October 25, 2006 Share Posted October 25, 2006 mmmm.... well spotted Barand. I didn't even notice that little bit of info - glanced right over it. Quote Link to comment Share on other sites More sharing options...
php_in_use Posted October 25, 2006 Author Share Posted October 25, 2006 [quote author=gmwebs link=topic=112654.msg457541#msg457541 date=1161800505]So does phpinfo(); now show MySQL and MySQLi sections?Here is a great article describing a resolution to this specific issue - [url=http://forge.mysql.com/wiki/PHP_FAQ]http://forge.mysql.com/wiki/PHP_FAQ[/url]Oh and try NotePad++ for a great little editor. [url=http://notepad-plus.sourceforge.net]http://notepad-plus.sourceforge.net[/url][/quote]phpinfo(); doesn't show anything regarding mysql of mysqli!will have a look at that article!thank-you for all your help...its most appreciated!! this is my final year and i can get my degree up a lot with this!!Ste Quote Link to comment Share on other sites More sharing options...
php_in_use Posted October 25, 2006 Author Share Posted October 25, 2006 I've just had a look in the httpd.conf file and there's no mention of mysql or mysqli at all!Is this a bad thing??I'm sorry for all the questions!Ste 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.