Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

xsell Error after installation


sukarya

Recommended Posts

Hi,

 

I installed the great Xsell v2.3 contribution.

The OsCommerce is installed in a sub directory and not the top one: www.mydomain.com/shop/

 

When choosing a product that has other products connected to it <with this contibution> it shows the other products - which is VERY nice, but it shows the following as well:

 

Warning: mkdir() [function.mkdir]: No such file or directory in /home/watchit/public_html/shop/includes/modules/xsell_products.php on line 86

 

Warning: fopen(shop/includes/cache/8/1-0.php) [function.fopen]: failed to open stream: No such file or directory in /home/watchit/public_html/shop/includes/modules/xsell_products.php on line 87

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/watchit/public_html/shop/includes/modules/xsell_products.php on line 88

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/watchit/public_html/shop/includes/modules/xsell_products.php on line 89

 

can any one help solving it?

Thanks A LOT!!!

Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

Link to comment
Share on other sites

Looks like your cache directory does not exist - it appears you should have created a directory /shop/includes/cache/ and made it writeable

Sonia

 

 

 

Hi,

Played woth it a bit - worked, Thanks.

Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

Link to comment
Share on other sites

  • 5 weeks later...
Looks like your cache directory does not exist - it appears you should have created a directory /shop/includes/cache/ and made it writeable

Sonia

In the install instructions for xsell 2.3 the last step (14) has the text in French. Can someone give me the English translation.

 

STEP 14:

Add to /catalog/admin/includes/functions/general.php

 

//Cache

function rdel($path, $deldir = true) {

// $path est le chemin relatif au fichier php

// $deldir (paramètre optionel, par défaut à vrai) permet de dire si vous souhaitez supprimer le répertoire (vrai) ou le vider uniquement (faux)

 

// on vérifie d'abord que le nom du repertoire contient "/" à la fin, sinon on le lui rajoute

if ($path[strlen($path)-1] != "/")

$path .= "/";

 

if (is_dir($path)) {

$d = opendir($path);

 

while ($f = readdir($d)) {

if ($f != "." && $f != "..") {

$rf = $path . $f; // chemin relatif au fichier php

 

if (is_dir($rf)) // si c'est un répertoire on appel récursivement la fonction

rdel($rf);

else // sinon on efface le fichier

unlink($rf);

}

}

closedir($d);

 

if ($deldir) // si $deldir est vrai on efface le répertoire

rmdir($path);

}

else {

unlink($path);

}

}

 

//Fin cache

Link to comment
Share on other sites

  • 1 month later...

I get error messages in product_info page. becaus my webhotel runs sql on safe mode, I can't use this add-on?? Can somebody help me fix this problem?

 

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid/gid is 143653/143653 is not allowed to access /hsphere/local/home/myshop/myshop.se/shop/xsell/44 owned by uid/gid 398/398 in /hsphere/local/home/myshop/myshop.se/shop/includes/modules/xsell_products.php on line 87 Warning: fopen(xsell/44/4-0.php): failed to open stream: No such file or directory in /hsphere/local/home/myshop/myshop.se/shop/includes/modules/xsell_products.php on line 87 Warning: fwrite(): supplied argument is not a valid stream resource in /hsphere/local/home/myshop/myshop.se/shop/includes/modules/xsell_products.php on line 88 Warning: fclose(): supplied argument is not a valid stream resource in /hsphere/local/home/myshop/myshop.se/shop/includes/modules/xsell_products.php on line 89

Link to comment
Share on other sites

In the install instructions for xsell 2.3 the last step (14) has the text in French. Can someone give me the English translation.

 

STEP 14:

Add to /catalog/admin/includes/functions/general.php

 

//Cache

function rdel($path, $deldir = true) {

// $path est le chemin relatif au fichier php

// $deldir (paramètre optionel, par défaut à vrai) permet de dire si vous souhaitez supprimer le répertoire (vrai) ou le vider uniquement (faux)

 

// on vérifie d'abord que le nom du repertoire contient "/" à la fin, sinon on le lui rajoute

if ($path[strlen($path)-1] != "/")

$path .= "/";

 

if (is_dir($path)) {

$d = opendir($path);

 

while ($f = readdir($d)) {

if ($f != "." && $f != "..") {

$rf = $path . $f; // chemin relatif au fichier php

 

if (is_dir($rf)) // si c'est un répertoire on appel récursivement la fonction

rdel($rf);

else // sinon on efface le fichier

unlink($rf);

}

}

closedir($d);

 

if ($deldir) // si $deldir est vrai on efface le répertoire

rmdir($path);

}

else {

unlink($path);

}

}

 

//Fin cache

Link to comment
Share on other sites

A couple things regarding this great mod:

 

1. I too am curious to the translation listed above.

 

more importantly...

 

2. I'm having trouble with my cache directory from the admin section when I update the xsell products.

 

-The Database is updating correctly - no problem there

-The cache directory is catalog/cache (chmod 777)

-The catalog/configure is pointed correctly - define('DIR_FS_CACHE_XSELL', 'cache/');

-The catalog/admin/includes/configure is - define('DIR_FS_CACHE_XSELL', '../../cache/');

 

NOTE: If I delete the created directories out of the cache directory - I did verify it is reading out of the database correctly.

 

I'm thinking this is something very small and when staring at code all day - it's always the obvious that is wrong most of the time.

 

Any help is much appreciated!!!!

 

-A

Link to comment
Share on other sites

  • 1 month later...
Hi,

 

I installed the great Xsell v2.3 contribution.

The OsCommerce is installed in a sub directory and not the top one: www.mydomain.com/shop/

 

When choosing a product that has other products connected to it <with this contibution> it shows the other products - which is VERY nice, but it shows the following as well:

 

Warning: mkdir() [function.mkdir]: No such file or directory in /home/watchit/public_html/shop/includes/modules/xsell_products.php on line 86

 

Warning: fopen(shop/includes/cache/8/1-0.php) [function.fopen]: failed to open stream: No such file or directory in /home/watchit/public_html/shop/includes/modules/xsell_products.php on line 87

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/watchit/public_html/shop/includes/modules/xsell_products.php on line 88

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/watchit/public_html/shop/includes/modules/xsell_products.php on line 89

 

can any one help solving it?

Thanks A LOT!!!

 

 

Dear sukarya,

 

I have encounter the same series of error messages. Did you ever figure out what was causing yours? Any advice gratefully received.

 

Kind regards,

 

Anthony

Link to comment
Share on other sites

Hi, I just installed X-Sell version 2.3 and have problems as well

 

In Catalog everything seems to work OK. The box appears and some products are recommened. In Admin however I get an errormessage in the field where the productimage should be:

 

Warning: is_file(): open_basedir restriction in effect. File(/images//hewlett_packard/lj1100xi.gif) is not within the allowed path(s): (/home/httpd/vhosts/slimcomputers.nl/httpdocs:/tmp) in /home/httpd/vhosts/slimcomputers.nl/httpdocs/admin/xsell.php on line 243

 

No Image

 

Also when I make some changes and press 'update' the next error is showen:

 

Warning: is_dir(): open_basedir restriction in effect. File(/cache/25) is not within the allowed path(s): (/home/httpd/vhosts/slimcomputers.nl/httpdocs:/tmp) in /home/httpd/vhosts/slimcomputers.nl/httpdocs/admin/xsell.php on line 40

 

 

I've made no changes to the code supplied in the contri and i falllowed the instructions by the letter...

 

Could anyone help me solve this problem and maybe explain what the messgae 'is not within the allowed path(s)' means.

thx a lot!

Link to comment
Share on other sites

Hi, I just installed X-Sell version 2.3 and have problems as well

 

In Catalog everything seems to work OK. The box appears and some products are recommened. In Admin however I get an errormessage in the field where the productimage should be:

 

Warning: is_file(): open_basedir restriction in effect. File(/images//hewlett_packard/lj1100xi.gif) is not within the allowed path(s): (/home/httpd/vhosts/slimcomputers.nl/httpdocs:/tmp) in /home/httpd/vhosts/slimcomputers.nl/httpdocs/admin/xsell.php on line 243

 

No Image

 

Also when I make some changes and press 'update' the next error is showen:

 

Warning: is_dir(): open_basedir restriction in effect. File(/cache/25) is not within the allowed path(s): (/home/httpd/vhosts/slimcomputers.nl/httpdocs:/tmp) in /home/httpd/vhosts/slimcomputers.nl/httpdocs/admin/xsell.php on line 40

I've made no changes to the code supplied in the contri and i falllowed the instructions by the letter...

 

Could anyone help me solve this problem and maybe explain what the messgae 'is not within the allowed path(s)' means.

thx a lot!

 

"Warning: is_file(): open_basedir restriction in effect." This is a PHP security feature. This is what I did to get around it.

 

(BACKUP files before attempting this just in case it does not work for you!!!)

 

Open admin/xsell.php

 

Find on line 243

<td class="dataTableContent" align="center"> <?php echo ((is_file(DIR_WS_CATALOG_IMAGES . '/'.$products['products_image'])) ?  tep_image(DIR_WS_CATALOG_IMAGES . '/'.$products['products_image'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) : '<br>No Image<br>');?> </td>

 

Replace with

<td class="dataTableContent" align="center"> <?php echo ((tep_image(DIR_WS_CATALOG_IMAGES . '/'.$products['products_image'])) ?  tep_image(DIR_WS_CATALOG_IMAGES . '/'.$products['products_image'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) : '<br>No Image<br>');?> </td>

 

Find on line 302

<td class="dataTableContent" align="center"> <?php echo ((is_file(DIR_WS_CATALOG_IMAGES . '/'.$products['products_image'])) ?  tep_image(DIR_WS_CATALOG_IMAGES . '/'.$products['products_image'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) : '<br>'.TEXT_NO_IMAGE.'<br>');?> </td>

 

Replace With

 <td class="dataTableContent" align="center"> <?php echo ((tep_image(DIR_WS_CATALOG_IMAGES . '/'.$products['products_image'])) ?  tep_image(DIR_WS_CATALOG_IMAGES . '/'.$products['products_image'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) : '<br>'.TEXT_NO_IMAGE.'<br>');?> </td>

 

I also had errors a mentioned in above post. Turned out that my configure.php file was set to read only (444) so the new version of the file wasn't uploading. To fix it I set the permissions back to (777) uploaded the edited file and then set the file back to (444).

Link to comment
Share on other sites

  • 2 weeks later...
In the install instructions for xsell 2.3 the last step (14) has the text in French. Can someone give me the English translation.

 

STEP 14:

Add to /catalog/admin/includes/functions/general.php

 

//Cache

function rdel($path, $deldir = true) {

// $path est le chemin relatif au fichier php

// $deldir (paramètre optionel, par défaut à vrai) permet de dire si vous souhaitez supprimer le répertoire (vrai) ou le vider uniquement (faux)

 

// on vérifie d'abord que le nom du repertoire contient "/" à la fin, sinon on le lui rajoute

if ($path[strlen($path)-1] != "/")

$path .= "/";

 

if (is_dir($path)) {

$d = opendir($path);

 

while ($f = readdir($d)) {

if ($f != "." && $f != "..") {

$rf = $path . $f; // chemin relatif au fichier php

 

if (is_dir($rf)) // si c'est un répertoire on appel récursivement la fonction

rdel($rf);

else // sinon on efface le fichier

unlink($rf);

}

}

closedir($d);

 

if ($deldir) // si $deldir est vrai on efface le répertoire

rmdir($path);

}

else {

unlink($path);

}

}

 

//Fin cache

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...