close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQLi rs Query

Thread began 1/13/2016 2:10 pm by TonyE | Last modified 1/18/2016 11:29 am by Ray Borduin | 763 views | 5 replies |

TonyE

MySQLi rs Query

I'm running into a problem with MySQLi code that works perfectly when testing with Wampserver using PHP 5.2.5 and MySQL 5.0.37. However, when I FTP the same exact code to my hosting provider I get a SQL error in the MySQLi code between lines 25-28 of my attached program. My hosting provider is using PHP 5.4 and MySQL 5.1.73. I called my provider for help and I'm not feeling good about their support.

Sign in to reply to this post

Ray BorduinWebAssist

My best guess is that the connection information is wrong for the live database. There is no reason why it wouldn't work on that server version.

Make sure the connection information is correct for your live database... you can add this code before the error after line 23:

<?php
var_dump($localhost);
die();
?>

That will tell you if the connection is working.

Sign in to reply to this post
Did this help? Tips are appreciated...

TonyE

Originally Said By: Ray Borduin
  My best guess is that the connection information is wrong for the live database. There is no reason why it wouldn't work on that server version.

Make sure the connection information is correct for your live database... you can add this code before the error after line 23:

<?php
var_dump($localhost);
die();
?>

That will tell you if the connection is working.  


Ray, I tried you suggestion and received the following: stage 1... stage 2...object(mysqli)#1 (19) { ["affected_rows"]=> NULL ["client_info"]=> NULL ["client_version"]=> int(50542) ["connect_errno"]=> int(1045) ["connect_error"]=> string(95) "Access denied for user 'dreamweaver@tenniscare.com'@'box279.bluehost.com' (using password: YES)" ["errno"]=> NULL ["error"]=> NULL ["error_list"]=> NULL ["field_count"]=> NULL ["host_info"]=> NULL ["info"]=> NULL ["insert_id"]=> NULL ["server_info"]=> NULL ["server_version"]=> NULL ["stat"]=> NULL ["sqlstate"]=> NULL ["protocol_version"]=> NULL ["thread_id"]=> NULL ["warning_count"]=> NULL }

I'm very confused on "Access denied for user 'dreamweaver@tenniscare.com' error. I looked at one of my recordsets and it looks like Webassist may have generated an additional connection since I didn't set it up (see attached images of primary & additional connections). It's very odd that I can do a query directly to the database on my home page and am able to access the database with no problems (not using WebAssist). The MySQL Server Name of fp.tenniscare, User name of dreamweaver@tenniscare.com are wrong. If I delete the additional connection it still does not work with the primary connection. I know my user name, password and database name are correct!

Sign in to reply to this post

Ray BorduinWebAssist

That additional connection is clearly wrong.... the mysql server would never start with "ftp." and I'm not sure about the other settings.

Update the additional connection page to reflect the correct connection information for your remote database and it should start working properly.

Your other connection isn't using this wrong information, so that explains why it works differently.

Do you have a separate remote and testing server and database? If not, then removing the additional connection should work.

Sign in to reply to this post
Did this help? Tips are appreciated...

TonyE

MySQLi rs Query

Originally Said By: Ray Borduin
  That additional connection is clearly wrong.... the mysql server would never start with "ftp." and I'm not sure about the other settings.

Update the additional connection page to reflect the correct connection information for your remote database and it should start working properly.

Your other connection isn't using this wrong information, so that explains why it works differently.

Do you have a separate remote and testing server and database? If not, then removing the additional connection should work.  


Ray, thanks so much for you assistance. I made the incorrect connection the same as the one that worked on my testing server and it worked on my remote server. My concern is why did MySQLi server behaviors add the incorrect connection parameters? There is no way I typed in those values!

Sign in to reply to this post

Ray BorduinWebAssist

I've never seen that happen before and it hasn't been reported by anyone else that I know of.

I really can't be sure how the wrong connection got there but I'm glad it is fixed.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...