Tag Archives: featured

Solved Cubecart MemCached error Open_BaseDir Restriction

Upon first install of CubeCart 6.0.6 on windows with apache and zpanel, you may receive the following warnings and errors at the beginning of the install and at the top of every cart/html page, as well as admin panel, following the install:

Warning: file_exists(): open_basedir restriction in effect. File(C:\php\pear/memcached.class.php) is not within the allowed path(s): (c:/zpanel/hostdata/username/public_html/your_domain;c:/windows/temp) in C:\zpanel\hostdata\username\public_html\your_domain\classes\autoloader.class.php on line 89 Warning: file_exists(): open_basedir restriction in effect. File(C:\php\pear/memcached.php) is not within the allowed path(s): (c:/zpanel/hostdata/username/public_html/your_domain;c:/windows/temp) in C:\zpanel\hostdata\username\public_html\your_domain\classes\autoloader.class.php on line 92 Warning: file_exists(): open_basedir restriction in effect. File(C:\php\pear/memcache.class.php) is not within the allowed path(s): (c:/zpanel/hostdata/username/public_html/your_domain;c:/windows/temp) in C:\zpanel\hostdata\username\public_html\your_domain\classes\autoloader.class.php on line 89 Warning: file_exists(): open_basedir restriction in effect. File(C:\php\pear/Memcache.php) is not within the allowed path(s): (c:/zpanel/hostdata/username/public_html/your_domain;c:/windows/temp) in C:\zpanel\hostdata\username\public_html\your_domain\classes\autoloader.class.php on line 92

Solution.  If memcached is not installed on your server, force “file” cache by adding the following line to the includes/global, inc:

$glob[‘cache’] = ‘file’;

That should be your solution.  I restarted apache, cleared my cache under maintenance in the admin dashboard, and then reloaded my website homepage.  Surprise, no warning or errors:

2015-07-26-CubeCart

ALSO SEE: https://forums.cubecart.com/topic/49962-warning-memcacheconnect-cant-connect-to-12700111211-connection-refused-111-in-classescachememcacheclassphp/  in case Memcached is not being properly accessed.

Open-Source SilverStripe CMS

SilverStripe CMS is an open source web content management system. It is a powerful tool for professional web development teams.  Web content authors rave about how easy it is to use.

Before installing, make sure to do the following:

  • Properly set the date.timezone in php.ini
    For example:
    date.timezone = “America/New_York”
  • Enable “Tidy” support library of code to clean up your html. SilverStripe should operate fine without Tidy, but HTMLCleaner will not be effective. For example, in php.ini you should enable – remove the leading semicolon in the following line:
    ;extension=php_tidy.dll
  • Find /framework/thirdparty/Zend/Loader.php and comment out as follows:

Go to: framework/thirdparty/Zend/Loader.php
at about line 190 you will find this foreach statement:

foreach (self::explodeIncludePath() as $path) {
if ($path == ‘.’) {
if (is_readable($filename)) {
return true;
}
continue;
}
/* COMMENT THIS OUT
$file = $path . ‘/’ . $filename;
if (is_readable($file)) {
return true;
}
*/
}

Hope it helps

[Warning] is_readable(): open_basedir restriction in effect. File(C:\php\pear/Zend/Translate/Adapter/I18nRailsYamlAdapter.php) is not within the allowed path(s): (c:/zpanel/hostdata/client/public_html/yourdomain_com;c:/windows/temp)

GET /

Line 198 in C:\zpanel\hostdata\client\public_html\yourdomain_com\framework\thirdparty\Zend\Loader.php

Source

189 
190         foreach (self::explodeIncludePath() as $path) {
191             if ($path == '.') {
192                 if (is_readable($filename)) {
193                     return true;
194                 }
195                 continue;
196             }
197             $file = $path . '/' . $filename;
198             if (is_readable($file)) {
199                 return true;
200             }
201         }
202         return false;
203     }
204

Bread Recipe

wpid-20150701_085659.jpg

  • 1 Cup Warm – Hot (Tepid) Water
  • 1 Package Fleishman’s Dry Active Yeast
  • 1/2 Teaspoon Sugar
  • 2 Tablespoons of melted real butter
  • 1 Teaspoon Salt
  • 2 1/2 Cups of All Purpose Unbleached Flour
  • Olive Oil

In a large bowl, empty package of dry yeast and 1/2 teaspoon of sugar.  Add 1 Cup hot tap water.  Stir to dissolve the yeast.  Cover the bowl loosely with plastic wrap and let sit for 10 to 15 minutes to allow yeast to foam and activate.

Add 2 1/2 cups of flour and 2 tablespoons melted butter.  Stir the mixture with a fork until it forms a loose ball of dough. Remove and hand knead (turn out the dough) for about 3 or 4 minutes until smooth but slightly sticky.  Form into a dough ball.

Wash the bowl and towel dry it.  Add a small amount of olive oil to lightly grease the entire interior of the bowl.  Place the dough ball in the bowl and briefly roll it around inside the bowl to lightly grease the surface of the dough.  Cover the bowl loosely with the plastic wrap and a dry dish towel on top, and let the dough rise for 1 or 2 hours, or until doubled in size.

Preheat an oven to 450 F.

Punch down the dough and knead it again for 3 or 4 minutes.  Place the dough in a butter greased or olive oil greased 8 x 4″ or 9 x 5″ metal bread baking pan and lightly press and spread the dough level and into the corners of the baking pan.  Lightly coat the surface of the bread with some olive oil.  Score the bread one or two quick swipes with a sharp knife.

Place the baking pan and dough on the middle over rack and bake at 450 F. for 15 minutes.  (Do not open the over door for the first 30 minutes of baking).  Then, after the first 15 minutes of baking,  lower the oven heat to 350 F. and continue to bake for another 25 to 35 minutes.  The bread is finished baking when the top of the bread is a golden brown.

Remove  the baking pan and bread, and allow to sit and cool for 10 minutes.  Carefully remove the bread from the baking pan so that the bread will not become soggy, and place the loaf on a cooling rack.

Slice and serve warm or cool with real butter.  Enjoy!

wpid-20150701_094759.jpg