Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
New to PHP and MySQL - Help required
Old 04-02-2005, 02:27 PM New to PHP and MySQL - Help required
Junior Talker

Posts: 2
Trades: 0
I am new to PHP and MySQL and really need some help
I have a winXP pro SP2 PC
using Apache 1.3.33, PHP 5.04 and MySQL4.1.1

I have configured everythin as per the PHP.net instructions
Apache works ok
and PHP works ok - phpinfo works OK - but I cant get php to connect with MySQL

I have added C:/php to the path statement
extension_dir points to c:\php\ext\ (I have also tried c:\php\ with no sucess)

I have set up

extension=php_mysql.dll



I have used the code below to check for a connection to MySQL I connect to this page I get the error message

<?php
$connection = mysql_connect ('localhost', 'root','')
or die( "Sorry - Unable to connect" );
echo( "Congratulations you are connected to MySQL" );
?>


I connect to this page I get the error message

Fatal error: Call to undefined function mysql_connect() in c:\Apache\htdocs\mysqltest.php on line 7

what is going on?
where have I gone wrong?
cirrus42 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-02-2005, 02:57 PM
amw_drizz's Avatar
Ultra Talker

Posts: 340
Name: Jon
Location: New York
Trades: 0
Okay did you copy the CORRECT .DLL file for MySQL support. (php_mysqli.dll) for php4.1 and later. from your /php/ext dir to /php/ then removed the comment form your php.ini file inform of extension=php_mysqli.dll
of you did that and it still does not work read on and remove php5


The other thing in your MySQL folder there should be a program called mysql_admin or something you NEED TO SET a password for mysql to work and accept incoming connections. or your will not be able to connect.!


i had the same probs with php5 sucks that they did not incoperate mysql in to it. remove php5 and get the latest version of php4 which has the mysql setup in it. so no screwing around. just need to edit you httpd.conf file in you apache setup. plu not alot of servers offer php5 yet. they still run php4....
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Old 04-03-2005, 11:28 AM
Junior Talker

Posts: 2
Trades: 0
Thanks

I tried everything I could to get php5 to connect to MySQL - nothing I have tried has worked
I have taken your advice and used php4 this works perfectly

I will use this set up for the time being..........

Is this issue going to be addressed by the php development team because there is obviously a problem
cirrus42 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to New to PHP and MySQL - Help required
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11756 seconds with 12 queries