Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

On The Fly Contrib Admin error


Aussie Dizzy

Recommended Posts

Hi All,

 

For those who are familiar with the On The Fly contrib, hope you can help me.

 

I have a live osCommerce shopping cart and I have tried to install the On The Fly contrib, I have done everything that was mentioned in the Read Me file and have battled with this for over 5 hours now, searched everywhere but nothing seems to be available so I thought I would try the forum.

 

Basically, the site lists fine, I can get into my admin section, but once there I have the worning message of:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /****/www/catalog/admin/includes/functions/database.php on line 99.

 

After reading around I believe that the error is not actually in the database.php file at all, but where I don't know.

 

I am stuck at this point simply because I can't load any new products or do anything with the products I have because I can't see them in the admin area.

 

Any help would be appreciated.

 

Cheers

 

Dizzy

Link to comment
Share on other sites

Have to tried to echo out the contents of $db_query to the screen to see what is being passed across?

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Have to tried to echo out the contents of $db_query to the screen to see what is being passed across?

 

Hi Geoffrey,

 

Thanks for the reply mate, but as I am a novice at this I am not sure how to even think about doing that.

 

Cheers

Dizzy

Link to comment
Share on other sites

Something like

 

function tep_db_fetch_array($db_query) {

echo "the array is [".$dbquery."] and assoc is [".MYSQL_ASSOC."]<br>";

return mysql_fetch_array($db_query, MYSQL_ASSOC);

 

but I engaged fingers before brain as that will show nothing. Got to go and refuel now so will give it some thought.

 

The error is in the code that calls calls database.php.

 

What is the address/url shown in the browser address bar?

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Something like

 

function tep_db_fetch_array($db_query) {

echo "the array is [".$dbquery."] and assoc is [".MYSQL_ASSOC."]<br>";

return mysql_fetch_array($db_query, MYSQL_ASSOC);

 

but I engaged fingers before brain as that will show nothing. Got to go and refuel now so will give it some thought.

 

The error is in the code that calls calls database.php.

 

What is the address/url shown in the browser address bar?

 

The address is http://****/catalog/admin/categories.php?cPath=22_24_28

Link to comment
Share on other sites

Here's another thought, maybe I ran the SQL query wrong. I did a back up of my database before I ran the query, how do I import the previous database over the existing one and how do I run a SQL query properly. When I ran it before it did say there was an error something to do with the number 100 and it was already in use.... or something to that effect.

Link to comment
Share on other sites

Sql

 

1) Go to your ISPs admin area for your site.

 

2) Click on the icon for Mysql, then find the link for phpmyadmin, it might be hidden away at the bottom but not on all admin sites. If you can’t find this, please consult your ISP's help desk.

 

3) In some cases, you may have to choose which database your OSC tables are located on. If this is the case, please choose using the dropdown box.

 

4) Click on "SQL" on the navigation bar.

 

5) Enter/paste your SQL in the textbox provided or, if you have a file containing the sql commands, click on Import and follow the on screen prompts.

 

6) For both methods click "Go"..

 

7) If all goes well, your SQL query will run successfully

 

For another explanation see:-

 

http://www.oscommerce.com/forums/index.php?sho...dmin+mysql+code

 

Or for a contribution to allow you to run SQL Script from Admin

 

http://www.oscommerce.com/community/contributions,4567

 

Cheers!

 

Sounds like you have run the sql twice.

 

You need to see if you have inserted the records twice and remove them if you have. Open the sql file and look to see which tables were updated.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Thanks for the tip mate.

 

I opened the SQL file and it said at the top:

------------------------------

# Create the config group to hold the settings on their own admin page

INSERT INTO configuration_group SET configuration_group_id=100, configuration_group_title='Thumbnails', configuration_group_description='\'On the Fly\' Auto Thumbnailer configuration settings', sort_order='5', visible="1";

------------------------------

 

So I went to that area, deleted the file and re-ran the sql file and this time it was successful.

 

However, this has not resolved the issue of the Catalog error message, of which is still:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /XXXX/XX/XXX/XXX/public/www/catalog/admin/includes/functions/database.php on line 99

 

Any help would be appreciated.

 

Cheers

Dizzy

Link to comment
Share on other sites

May have solved the issue.

 

Because I have set up one of these sites before I thought I would take the catalog/admin/categories.php file from the other site and overwrite the one supplied in the contrib.

 

After doing this the error has now disappeared, so there was obviously something wrong with the supplied categories.php file. Not experienced enough to find the error but I am happy that this particular problem has been solved.

 

So now back to see if the contrib has actually worked.

 

Thanks to all who helped me along the way.

 

Cheers

 

Dizzy

Link to comment
Share on other sites

Geesh talk about ripping my hair out and wasting some serious hours on this contrib, albeit a really good one.

 

Now I'm faced with missing flag images and an error message of:

 

--------------------------------

Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/catalog/includes/languages/english/images/icon.gif) is not within the allowed path(s) in /XXX/XXX/XXX/XXX/public/www/catalog/admin/includes/functions/html_output.php on line 75

--------------------------------

 

Once again I have spent hours searching and tried many different remedies, but came up with nothing.

 

Any ideas anyone?

 

Cheers

 

Dizzy

Link to comment
Share on other sites

Going around and around here..... maybe I should just dump everything from the admin section and put up with the shotty looking thumbnails... all good for my sites but not my client's websites though.

 

I went back to the contrib and downloaded the very latest contrib patches and after find more problems and solving them by uploading the original OSC files I have come across another issue, when loading new products into my categories after completiting the info I get this message on preview:

 

--------------------------------------

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/php_upload/php969sig) is not within the allowed path(s) in /XXX/XXX/XXX/XXX/public/www/catalog/admin/includes/classes/upload.php on line 86.

--------------------------------------

 

Any ideas anyone?

 

Cheers

Dizzy

Link to comment
Share on other sites

Google

 

site:www.oscommerce.com/forums open_basedir restriction in effect

 

Over 1000 hits where this problem has been posted

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Hi All,

 

I have sorted my problem out.

 

For those who are having the same issue this may resolve the problem.

 

I have 2 separate OCS websites running and after talking to my host I found that they were on two different clusters that are running two different versions of PHP. The latter one that was giving me problems didn't have a tmp folder setup. So at the end of the day a tmp folder with chmod 777 permissions was set up in the public folder (on a linux server). Once the folder was set my issue went away..... food for thought.

 

Hope this helps.

 

Cheers

 

Dizzy

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...