Re:mysql connect (1 viewing) (1) Guest
Favoured: 0
|
|
|
TOPIC: Re:mysql connect
|
edryan (User)
Junior Boarder
Posts: 21
|
|
mysql connect 4 Years, 11 Months ago
|
Karma: 0
|
|
got problem with mysql connection
what should be the right method to connect my app to mysql database??
i got here some codes..i did this,is it wrong??
$conn = msyql_connect(host,user,pass);
if(!$conn){
echo "some error msg!";
}
else{
mysql_select_db(mydatabase);
}
it made an error on line with mysql_connect..any help is appreciated..thank u so much
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
kksou (Admin)
Admin
Posts: 1680
|
|
Re:mysql connect 4 Years, 11 Months ago
|
Karma: 27
|
|
The syntax looks ok.
What's the error message that you get? Without seeing the error message, it's difficult to guess what might be the problem.
Also, which version of PHP-GTK are youu running?
Regards,
/kksou
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
edryan (User)
Junior Boarder
Posts: 21
|
|
Re:mysql connect 4 Years, 11 Months ago
|
Karma: 0
|
|
i cant remember the whole error message..but
i think its..
Fatal error undefine function mysql_connect...
i put "@" (AT sign) before the start of mysql_connect function...
so...
$conn = @mysql_connect(host,user,pass);
it do not display error but nothing happens to it..it just quit..
i used PHP-GTK2 with PHP5..
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
Re:mysql connect 4 Years, 11 Months ago
|
Karma: 0
|
|
maybe php-gtk\ext\php_mysql.dll need
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
kksou (Admin)
Admin
Posts: 1680
|
|
Re:mysql connect 4 Years, 11 Months ago
|
Karma: 27
|
|
edryan wrote:
i cant remember the whole error message..but
i think its..
Fatal error undefine function mysql_connect...
i put "@" (AT sign) before the start of mysql_connect function...
so...
$conn = @mysql_connect(host,user,pass);
it do not display error but nothing happens to it..it just quit..
i used PHP-GTK2 with PHP5..
Could you please remove that "@" (AT sign) so that you can see what's the error message?
Regards,
/kksou
p.s. by the way, are you running on linux or windows? Also, which version of PHP-GTK2 are you using? alpha? beta? v2.0? v2.0.1?
|
|
|
|
|
|
|
Last Edit: 2008/07/16 18:55 By kksou.
|
|
|
The administrator has disabled public write access.
|
edryan (User)
Junior Boarder
Posts: 21
|
|
Re:mysql connect 4 Years, 11 Months ago
|
Karma: 0
|
|
im running it on windows..im using PHP-GTK 2.0.1...i already remove the "@" sign...
THE ERROR MESSAGE IS:
Fatal error: Call to undefined function mysql_connect() in C:\PHP\gtk\sample.php on line 18
i already enable the php_msyql.dll in my php.ini file...
i need a quick reply plsssss....thank u.
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
Re:mysql connect 4 Years, 11 Months ago
|
Karma: 0
|
|
try non-thread safe version php_msyql.dllhttp://ua2.php.net/get/php-5.2.5-nts-Win32.zip/from/a/mirror
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
kksou (Admin)
Admin
Posts: 1680
|
|
Re:mysql connect 4 Years, 11 Months ago
|
Karma: 27
|
edryan wrote:
THE ERROR MESSAGE IS:
Fatal error: Call to undefined function mysql_connect() in C:\PHP\gtk\sample.php on line 18
i already enable the php_msyql.dll in my php.ini file...
The error message shows that your mysql.dll is not loaded at all. Hence the error message "Call to undefined function mysql_connect()".
Do try what Boombasta suggests:
try non-thread safe version php_msyql.dll
http://ua2.php.net/get/php-5.2.5-nts-Win32.zip/from/a/mirror
Regards,
/kksou
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
darwish (User)
Fresh Boarder
Posts: 1
|
|
Re:mysql connect 4 Years, 10 Months ago
|
Karma: 0
|
hello everyone,
I'm new to this forum, i had connection problems with MySql also, i found this site
http://www.fixya.com/support/t840466-mysql_connect_error
They have very useful solutions for different mysql problmems.
I hope that i helped,
Darwish.
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
edryan (User)
Junior Boarder
Posts: 21
|
|
Re:mysql connect 4 Years, 10 Months ago
|
Karma: 0
|
|
that was not the one im talking about darwish, but it still offers me knowledge...thank u so much.i think the problem are my extensions...i enabled all extensions from php.ini and i ddn't found the dll's for mysql...i already downloaded the binary packs but still don't know what to do...thank you all guyz....i'll go over this after i solved it..tnx, god bless!!..
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
|