Advertisement:
NameCheap

Author Topic: Warning: mysql_fetch_array():  (Read 14470 times)

Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Warning: mysql_fetch_array():
« on: April 26, 2008, 09:27:53 AM »
Hi,

when attempting to configure the bridge I get

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sites/estima-motoring.co.uk/public_html/test/mjltigger/administrator/components/com_smf/admin.smf.php on line 152

any idea what my mistake is please?

Offline smoothound

  • Semi-Newbie
  • *
  • Posts: 24
  • Gender: Male
Re: Warning: mysql_fetch_array():
« Reply #1 on: April 26, 2008, 09:51:08 AM »
Hi mjltigger

If you are using two different databases, then you have to use your CPanel mySQL setup to grant each database user rights to the other database.

I had a similar error message some time ago, check out this tread.

http://www.simplemachines.org/community/index.php?topic=226399.0

Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Re: Warning: mysql_fetch_array():
« Reply #2 on: April 26, 2008, 09:54:46 AM »
right thank you... I went to the readme and looked that up a bit more and it says

Quote
Separate Databases:
If you have installed Mambo and SMF with Fantastico, or you installed them in separate databases intentionally, you will need to grant permission to the database users to access each others' databases. If you have your forum and CMS installed in separate databases, and you have not granted access properly, you will most likely run into the "_LOGIN_INCOMPLETE" error in Mambo.

Here's how to grant database permissions:

1) Go to your site's cPanel. Click on MySQL databases. (Do not Proceed to PhpMyAdmin!)

2) Near the bottom of the page, you will find two dropdown menus side-by-side. One is labelled "User:" and the other "Db:".

3) In the first dropdown, select your SMF database user, and in the second dropdown, select the Mambo database. Click the button that is labelled "Add User to Db".

4) Now go back to the same page again, and do the same, adding your Mambo User to your SMF database.

Now you are set up to run your forum and CMS in separate databases.

however my cpanel doesn't have these dropdown menus... I really don't want to install into a single database as the SMF backup files are already huge.

Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Re: Warning: mysql_fetch_array():
« Reply #3 on: April 26, 2008, 09:58:56 AM »
it does however offer this:

Quote
Create a Stand-alone MySQL User (advanced only)
If you want to set up an extra user without a corresponding database and set up its permissions manually (via phpMyAdmin for the database you want to grant privileges on) please fill in the details below.

so presumably there is another way to grant access...

Offline smoothound

  • Semi-Newbie
  • *
  • Posts: 24
  • Gender: Male
Re: Warning: mysql_fetch_array():
« Reply #4 on: April 26, 2008, 10:15:40 AM »
In MySQL Databases you should find

Add User To Database
User: (Dropdown menu)
Database: (Dropdown menu)

with an "Add" button underneath
This is normally near the bottom of the page.

This is the same item as mentioned in the Bridge setup just in a different format.

Note When you click the add button you will be taken to another page where you select the privileges, I selected All Privileges.

   


Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Re: Warning: mysql_fetch_array():
« Reply #5 on: April 26, 2008, 10:35:32 AM »
thank you again... that option isn't there, all there is:

Create a MySQL Database
Create a Stand-alone MySQL User (advanced only)
Manage MySQL Databases


that last one is the one that shows user names and passwords but the only options are manage, backup or delete.. manage goes straight to php_myadmin..

Offline Kindred

  • The Mean One
  • Local Moderator
  • SMF Master
  • *
  • Posts: 41,584
  • Gender: Male
    • wagner999 on Facebook
    • Kindred-999 on GitHub
    • www.linkedin.com/in/wdwagner/ on LinkedIn
    • @Kindred_999 on Twitter
Re: Warning: mysql_fetch_array():
« Reply #6 on: April 26, 2008, 10:37:42 AM »
mjl...

what control panel does your host use?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support forums.  Thank you.

Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Re: Warning: mysql_fetch_array():
« Reply #7 on: April 26, 2008, 10:47:04 AM »
it is co-branded between the host and eXtend so I guess that is it..

Orstio

  • Guest
Re: Warning: mysql_fetch_array():
« Reply #8 on: April 26, 2008, 10:50:31 AM »
If you create a stand alone user, can you assign permissions to that user?

Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Re: Warning: mysql_fetch_array():
« Reply #9 on: April 26, 2008, 10:57:30 AM »
it says I can do this in mysql however that is outside of my scope of knowledge.... there is nothing obvious in mysql that allows me to do it.

Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Re: Warning: mysql_fetch_array():
« Reply #10 on: April 26, 2008, 11:33:44 AM »
update - have logged this with the host who say it needs shell access to be done. i have activated this and it will take an hour or so...

I am a little worried about messing with shell access for something that seems to be controllable via the cpanel so comments welcome...

Quote
Hi Mark,

Thanks for contacting us. Granting user permissions needs to be done on the SSH command line, so you will need to activate SSH on your hosting package.

The use of MySQL users should only be used by advanced users only.

Please note that we do not get involved in development type support as it it is beyond the level of support we can offer. You may find the following link useful regarding this subject.

http://dev.mysql.com/doc/refman/5.0/en/grant.html [nofollow]

Orstio

  • Guest
Re: Warning: mysql_fetch_array():
« Reply #11 on: April 26, 2008, 11:49:30 AM »
Once you are in, GooseMoose has given instructions how to grant access via SSH here:

http://www.simplemachines.org/community/index.php?topic=175375.msg1118221#msg1118221

Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Re: Warning: mysql_fetch_array():
« Reply #12 on: April 26, 2008, 12:15:37 PM »
thank you that is useful, far simpler than the gobbledegook the host sent me :)

Offline mjltigger

  • Semi-Newbie
  • *
  • Posts: 22
Re: Warning: mysql_fetch_array():
« Reply #13 on: April 26, 2008, 04:37:59 PM »
doesn't work though... gobbledegook time