|
|
|
Pentium
   
Group: Forum Members
Last Login: Yesterday @ 22:01:34
Posts: 5,536,
Visits: 29,229
|
|
Ok so all of my expertise is exhausted I need your help. A mate of mine has Apache, PHP and Mysql (latest versions except apache which is 1.1). I know it all works because I installed it!
Mysql can be accessed form the console easy enough but not from the PHP code - I think the problem is at the PHP end because it brings up the usual:
Fatal error: Call to undefined function mysql_connect() in c:\program files\apache group\Apache\htdocs\4.php on line 2
That is if connecting via mysql_connect() or mysqli_connect() etc.
The strangest thing is that after the mysql function it stops parsing the document!!!! So no other code works1
Any Ideas cos I am getting pretty annoyed at the moment!
Cheers,
Tom
My Crime is that of curiosity, my crime is that of outsmarting you

|
|
|
|
|
Root
   
Group: Moderators
Last Login: 04/01/2009 14:35:06
Posts: 610,
Visits: 2,563
|
|
His PHP has no MySQL support. I've no idea how you enable this under Windows - possibly you need to download the appropriate extension from somewhere.
--
David Johnson
Micro Mart Writer & Forum Moderator
|
|
|
|
|
Pentium
   
Group: Forum Members
Last Login: Yesterday @ 22:01:34
Posts: 5,536,
Visits: 29,229
|
|
Yeah it has Mysql set up as a service, and it works but thats all - no PHP connection 2 it!!!
Cheers,
Tom
My Crime is that of curiosity, my crime is that of outsmarting you

|
|
|
|
|
Root
   
Group: Moderators
Last Login: 04/01/2009 14:35:06
Posts: 610,
Visits: 2,563
|
|
MySQL support needs to be enabled within PHP else PHP will not be able to access MySQL.
--
David Johnson
Micro Mart Writer & Forum Moderator
|
|
|
|
|
Pentium
   
Group: Forum Members
Last Login: Yesterday @ 22:01:34
Posts: 5,536,
Visits: 29,229
|
|
In the PHP.ini file - I did check all the extensions are there - actually all of them are edited in hmmmmmmm could be a clash problem - too many extensions!
Cheers,
Tom
My Crime is that of curiosity, my crime is that of outsmarting you

|
|
|
|
|
Root
   
Group: Moderators
Last Login: 04/01/2009 14:35:06
Posts: 610,
Visits: 2,563
|
|
Did you restart Apache after enabling MySQL support in PHP? You'll need to do this else it won't reload the configuration.
If you still can't get anywhere, create a PHP file with the following in it:
<?php
phpinfo();
?>
This will give you pages of data - if MySQL support is there you'll see a whole section about it.
--
David Johnson
Micro Mart Writer & Forum Moderator
|
|
|
|
|
286
   
Group: Forum Members
Last Login: 10/02/2008 16:21:18
Posts: 487,
Visits: 370
|
|
|
|
|
|
Pentium
   
Group: Forum Members
Last Login: Yesterday @ 22:01:34
Posts: 5,536,
Visits: 29,229
|
|
Yeah thats an good idea - the server is apache and it is set up on his computer - I installed it so i kno they are in the right place.....
I suppose the firewall could be blocking the port - Ikno you connect to the localhost server through port 80 and that works fine. Does it connect to Mysql through a different port because teh Firewall could well be blocking that, hmmm.........
Thanks for the ideas guys keep it coming!!!!!
Cheers,
Tom
My Crime is that of curiosity, my crime is that of outsmarting you

|
|
|
|
|
|
| | |