jenny123 Posted August 17, 2013 Share Posted August 17, 2013 hello, need everybody's help,its very urgent. Here we met some problems at our back office: when we edit new product at our back office then it shows: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/js/tiny_mce/langs/en.js) is not within the allowed path(s): (C:\Inetpub\vhosts\netzuper.com\httpdocs\) in C:\Inetpub\vhosts\netzuper.com\httpdocs\controllers\admin\AdminProductsController.php on line 3478 And we still cant add photo at subcategories,it will shows update successfully but not show at front office.what the solution and whats the problem? very urgent. If here is anyone knows,please offer your kindly help! Thanks. Link to comment Share on other sites More sharing options...
vekia Posted August 17, 2013 Share Posted August 17, 2013 it's issue related to the server restrictions (related to the safety) that you've got defined in your local server. in this case you have to configure your php configuration file. so open the php.ini file and search for: open_basedir = now you have two solutions: change the open_basedir path (to "/" for example) add semicolon before open_basedir: ;open_basedir = then restart your local server and try again Link to comment Share on other sites More sharing options...
PascalVG Posted August 17, 2013 Share Posted August 17, 2013 In case you cannot edit your php.ini file (some hosts don't allow it), here are some alternative solutions. http://stackoverflow...e-allowed-paths My 2 cents, pascal Link to comment Share on other sites More sharing options...
jenny123 Posted August 19, 2013 Author Share Posted August 19, 2013 hello,thanks for your reply,here we checked,all is correct. And now when we add an image under category save it,then it will shows 500 internal server error. but it can be update successfully with pictures. and also creat new products under sub-category.http://netzuper.com/en/11-tenga here at subcategory,we can not add image at back office. is there any solution ? we all get stuck at this problem and in trouble. Link to comment Share on other sites More sharing options...
vekia Posted August 19, 2013 Share Posted August 19, 2013 ,then it will shows 500 internal server error if you have internal server error, you need to turn on error reporting in your store, after that you will see additional information where the problem occur (this is first step in the debug process) open file: config/defines.inc.php find this line define('_PS_MODE_DEV_', false); change it to: define('_PS_MODE_DEV_', true); Link to comment Share on other sites More sharing options...
vansrv7 Posted May 17, 2014 Share Posted May 17, 2014 it's issue related to the server restrictions (related to the safety) that you've got defined in your local server. in this case you have to configure your php configuration file. so open the php.ini file and search for: open_basedir =now you have two solutions:change the open_basedir path (to "/" for example) add semicolon before open_basedir: ;open_basedir = then restart your local server and try again I have the same problem. In my php.ini I already have the line: ;open_basedir= Other solutions? Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2014 Share Posted May 17, 2014 if you're on localhost and use xampp or other software make sure that you edit corredt php.ini file usually you can find there (in software directory) several php.ini files... it's confusing :/ Link to comment Share on other sites More sharing options...
vansrv7 Posted May 18, 2014 Share Posted May 18, 2014 Hi Vekia, now I'm on remote server and I'm sure I edited the correct php.ini Link to comment Share on other sites More sharing options...
vansrv7 Posted May 20, 2014 Share Posted May 20, 2014 Solved. The open_basedir was set in the httpd.include file, commented the line and now the error is gone. Link to comment Share on other sites More sharing options...
nanobyt3 Posted August 10, 2017 Share Posted August 10, 2017 It seems you have open_basedir config value set in php.ini which is limiting the access. As a quick fix, If you disable open_basedir setting in php.ini, all would work well. But, that being said, my understanding is that the code itself might not be correct for windows environment. _PS_JS_DIR_ should contain an absolute path path of local filesystem which in-turn would require __PS_BASE_URI__ to have local path. So, you could either not use file_exist in this manner or make adjustment to the code to use correctly built path so as to not conflict with open_basedir setting. An approach would be to edit 'controllers/admin/AdminProductsController.php' and replace the line (which appears twice in the file) $iso_tiny_mce = (file_exists(_PS_JS_DIR_.'tiny_mce/langs/'.$iso_tiny_mce.'.js') ? $iso_tiny_mce : 'en'); with $iso_tiny_mce = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso_tiny_mce.'.js') ? $iso_tiny_mce : 'en'); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now