PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:mysql connect (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:mysql connect


#411
edryan (User)
Junior Boarder
Posts: 21
graphgraph
User Offline Click here to see the profile of this user
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.

#412
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
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.

#416
edryan (User)
Junior Boarder
Posts: 21
graphgraph
User Offline Click here to see the profile of this user
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.
#418
boombasta (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
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.
#422
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
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.
#423
edryan (User)
Junior Boarder
Posts: 21
graphgraph
User Offline Click here to see the profile of this user
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.
#425
boombasta (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
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.
#426
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
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.
#491
darwish (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
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.
#556
edryan (User)
Junior Boarder
Posts: 21
graphgraph
User Offline Click here to see the profile of this user
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.



Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Links - Classes - Social Business - BPM - Web - General
Copyright © 2006-2013. kksou.com. All Rights Reserved