Jump to content


Photo

PHP Final Year Degree Project help??


  • Please log in to reply
13 replies to this topic

#1 php_in_use

php_in_use
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 October 2006 - 11:07 AM

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 "mysql_send.php" (mysqli version) (http://janet.valade....nloads_fd2.html) which you can download (to save typing it out from the book). It loads up in my browser no problem but i'm getting "Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mysql_send.php on line 16"

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?

#2 ozzles2006

ozzles2006
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 25 October 2006 - 11:19 AM

Hmm, shouldn't it be mysql_connect() ?

#3 php_in_use

php_in_use
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 October 2006 - 11:21 AM

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

#4 xsist10

xsist10
  • Members
  • PipPipPip
  • Advanced Member
  • 114 posts

Posted 25 October 2006 - 12:07 PM

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
<?php

phpinfo();

?>

If it doesn't list MySQL somewhere in the result, then you know what your problem is.
SA PHP Archives - www.phparchives.za.org

#5 php_in_use

php_in_use
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 October 2006 - 12:43 PM

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

#6 heckenschutze

heckenschutze
  • Members
  • PipPipPip
  • Advanced Member
  • 257 posts
  • LocationAustralia

Posted 25 October 2006 - 12:45 PM

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


Notepad2

#7 php_in_use

php_in_use
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 October 2006 - 12:46 PM

Cheers, I'll have a look into that now!

Ste

#8 php_in_use

php_in_use
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 October 2006 - 02:48 PM

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

#9 gmwebs

gmwebs
  • Members
  • PipPipPip
  • Advanced Member
  • 174 posts
  • LocationLondon

Posted 25 October 2006 - 06:21 PM

So does phpinfo(); now show MySQL and MySQLi sections?

Here is a great article describing a resolution to this specific issue - http://forge.mysql.com/wiki/PHP_FAQ

Oh and try NotePad++ for a great little editor. http://notepad-plus.sourceforge.net

#10 mschrank99

mschrank99
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 25 October 2006 - 06:26 PM

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.

#11 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 25 October 2006 - 07:19 PM

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


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.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#12 gmwebs

gmwebs
  • Members
  • PipPipPip
  • Advanced Member
  • 174 posts
  • LocationLondon

Posted 25 October 2006 - 07:37 PM

mmmm.... well spotted Barand. I didn't even notice that little bit of info - glanced right over it.

#13 php_in_use

php_in_use
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 October 2006 - 09:49 PM

So does phpinfo(); now show MySQL and MySQLi sections?

Here is a great article describing a resolution to this specific issue - http://forge.mysql.com/wiki/PHP_FAQ

Oh and try NotePad++ for a great little editor. http://notepad-plus.sourceforge.net


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

#14 php_in_use

php_in_use
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 October 2006 - 10:26 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users