Jump to content

Archived

This topic is now archived and is closed to further replies.

php_in_use

PHP Final Year Degree Project help??

Recommended Posts

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!!  :D

Many thanks  ;D

Ste

P.S. Can you recemmend a good PHP editor with line numbers please?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]
<?php

phpinfo();

?>
[/code]

If it doesn't list MySQL somewhere in the result, then you know what your problem is.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
[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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
did you make sure the module is set to load in apache's config file? (httpd.conf?)

Look for "loadmodule mysql"...(something) in httpd.conf

If it is "commented out", meaning it looks like:

;loadmodule mysql...

Then remove the semicolon, then restart apache.

Share this post


Link to post
Share on other sites
[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.

Share this post


Link to post
Share on other sites
mmmm.... well spotted Barand. I didn't even notice that little bit of info - glanced right over it.

Share this post


Link to post
Share on other sites
[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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.