Reply
php mysql connection problems
Old 06-20-2008, 07:38 PM php mysql connection problems
Junior Talker

Posts: 1
Name: aLOK
I am using php5.2.6 and mysql5 on winxp and IIS server.I am having problems getting php to talk to mysql.I have enabled php_mysql.dll,php_mysqli.dll in php.ini. I have copied libmysql.dll to system 32 folder.But all it does is gives me a blank page with no error messege.I tried using PEAR but the same result.Please help I am stuck!!.I checked the include_path it is pointing to c:/php/pear.My php.ini file is in c:\php.I have checked the system path and it has the path.I cant seem to think of anything more.
alokp99 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-20-2008, 07:56 PM Re: php mysql connection problems
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 995
Name: Jeremy Miller
Location: Reno, NV
Have you checked for your error log? I'm not sure where it'd be on your particular server, but sometimes errors are written to it instead of being echoed out to the screen. You could manually echo a connection error out to the screen with something like

PHP Code:
echo '['.__line__.'] '.mysql_error(); 
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 06-21-2008, 12:50 PM Re: php mysql connection problems
wayfarer07's Avatar
$frontend->developer

Posts: 1,283
Name: Abel Mohler
Location: Asheville, North Carolina USA
This is how I handle mysql errors(if they exist):
PHP Code:
$sql "SELECT * FROM example";
if (!
$result mysql_query($sql)) {
    die(
"Error: ".mysql_error());

__________________
<!--if a signature drops in the forest, and no one is there to see it, does it make a link?-->
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php mysql connection problems
 

Thread Tools

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

vB 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.13422 seconds with 12 queries