Shopping Cart Forum

Go Back   eShop Forums - eCommerce Help Forum for Shopping Cart Owners. > Shopping Cart Software > Zen Cart & osCommerce
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Zen Cart & osCommerce Tips, advice and help on how to use the most popular free E-commerce shopping carts available.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 19-11-2007, 01:54 PM
Anthony Anthony is offline
Member
 
Join Date: Nov 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Import an XML Feed in to an Oscommerce Website

Hi

I need some help setting up an XML feed in to my website I did find another post about this but it didn't work for me keep getting some errors

http://www.webdeveloper.com/forum/sh...ad.php?t=93943

http://www.thewatch4u.co.uk/curl.php

Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in /home/hitech99/public_html/thewatch4u/curl.php on line 8

Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in /home/hitech99/public_html/thewatch4u/curl.php on line 10

Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in /home/hitech99/public_html/thewatch4u/curl.php on line 12

Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in /home/hitech99/public_html/thewatch4u/curl.php on line 14

Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in /home/hitech99/public_html/thewatch4u/curl.php on line 16

Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in /home/hitech99/public_html/thewatch4u/curl.php on line 18

Warning: curl_exec(): supplied argument is not a valid cURL handle resource in /home/hitech99/public_html/thewatch4u/curl.php on line 20

Warning: curl_close(): supplied argument is not a valid cURL handle resource in /home/hitech99/public_html/thewatch4u/curl.php on line 22

Fatal error: Call to a member function on a non-object in /home/hitech99/public_html/thewatch4u/curl.php on line 44

I'm sure its an easy fix but i can't see it

thanks Anthony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 19-11-2007, 03:38 PM
Lawrence Lawrence is online now
Forum Admin
 
Join Date: Aug 2007
Location: Kenley, Surrey, UK
Posts: 1,188
Thanks: 1
Thanked 73 Times in 73 Posts
Default Re: Import an XML Feed in to an Oscommerce Website

That error occurs when a handle hasn't been defined for the cURL functions.

There should be a statement such as

PHP Code:
$my_variable curl_init('www.website_to_download_from.com'); 
Which sets the handle (contained within $my_variable in this example) that the cURL functions will use to identify the resource to be used.

For some reason, the handle isn't being defined. It is possibly occurring because the URL for the XML feed hasn't been defined somewhere in the script's configuration.

I suggest you double check the configuration for the plug-in, in particular where you define the URL for the XML feed.
__________________
Lawrence
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 19-11-2007, 03:55 PM
Anthony Anthony is offline
Member
 
Join Date: Nov 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Import an XML Feed in to an Oscommerce Website

I will double check this expect your right lol just missed some thing Anthony
__________________
BABYKIDSCLOTHINGONLINE.COM
BEAUTYEXPRESSONLINE.COM
HI-TECH99.CO.UK
HI-TECH99.COM
STOPSPAMMAIL.CO.UK
THEWATCH4U.CO.UK
UKCLASSIFIEDADS.NET
UKONLINE-DIRECTORY.COM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 19-11-2007, 04:16 PM
Anthony Anthony is offline
Member
 
Join Date: Nov 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Import an XML Feed in to an Oscommerce Website

Hi i have solved those errors problem had a space were there shouldn't have been one but have another error??

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/hitech99/public_html/thewatch4u/curl.php on line 16

Array()
__________________
BABYKIDSCLOTHINGONLINE.COM
BEAUTYEXPRESSONLINE.COM
HI-TECH99.CO.UK
HI-TECH99.COM
STOPSPAMMAIL.CO.UK
THEWATCH4U.CO.UK
UKCLASSIFIEDADS.NET
UKONLINE-DIRECTORY.COM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 19-11-2007, 05:24 PM
Lawrence Lawrence is online now
Forum Admin
 
Join Date: Aug 2007
Location: Kenley, Surrey, UK
Posts: 1,188
Thanks: 1
Thanked 73 Times in 73 Posts
Default Re: Import an XML Feed in to an Oscommerce Website

Your host is probably running PHP in safe mode. To check the configuration of your PHP installation, create a file called phpinfo.php or similar then put the following in it.

PHP Code:
<?php
phpinfo
();
?>
Then open the file in your browser. If you scan down the list displayed, you will see whether Safe Mode is switched on or off as well as if open_basedir is set.

The only way to change these parameters is to ask your host to edit the php.ini file which they are very unlikely to do.

What CURLOPT_FOLLOWLOCATION does, is tell the script to follow any page redirections that are on the page you are trying to download. The chance are that there won't be so it should be safe to comment out line 16 with "//".

Line 16 will now look similar to this

PHP Code:
// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 
This "should" solve the problem.
__________________
Lawrence
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 19-11-2007, 05:57 PM
Anthony Anthony is offline
Member
 
Join Date: Nov 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Re: Import an XML Feed in to an Oscommerce Website

They are set to

Safemode is set to off
open_basedir/home/hitech99:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmpno value
Anthony
__________________
BABYKIDSCLOTHINGONLINE.COM
BEAUTYEXPRESSONLINE.COM
HI-TECH99.CO.UK
HI-TECH99.COM
STOPSPAMMAIL.CO.UK
THEWATCH4U.CO.UK
UKCLASSIFIEDADS.NET
UKONLINE-DIRECTORY.COM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 19-11-2007, 06:18 PM
Lawrence Lawrence is online now
Forum Admin
 
Join Date: Aug 2007
Location: Kenley, Surrey, UK
Posts: 1,188
Thanks: 1
Thanked 73 Times in 73 Posts
Default Re: Import an XML Feed in to an Oscommerce Website

It'll be because open_basedir is set. This is set for security reasons to prevent injection of malicious code on to your server via log files etc. It's very unlikely that your host will change this for you so I suggest you comment out line 16 as shown in my previous post. That line will only have an effect if the URL you are downloading from uses a page redirect, if it doesn't, then the line will do absolutely nothing anyway.
__________________
Lawrence
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to import Data base Cushtydeals Zen Cart & osCommerce 3 07-10-2007 04:27 PM
osCommerce v3 download Lawrence Zen Cart & osCommerce 0 22-09-2007 12:03 PM
Will OsCommerce v3 support Oracle XE lmariocd Zen Cart & osCommerce 1 13-09-2007 07:21 PM
Oscommerce v3 - anyone know anything about this? PeterC Zen Cart & osCommerce 1 05-09-2007 11:18 AM
how to add a news feed? Tinkerbell The Water Cooler 3 21-08-2007 12:10 PM

Google

Edible Graphics, Affordable E-Commerce, Web Shops & Custom Form Scripts
Vista Print
tech news, product reviews, the latest home and business technology, the latest in digital imaging


Content Relevant URLs by vBSEO 3.0.0