Jump to content

problems updating picture at categories not showing at front office ,show warning edit a product


Recommended Posts

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.

post-671565-0-65999400-1376701443_thumb.png

Link to comment
Share on other sites

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:

  1. change the open_basedir path (to "/" for example)
  2. add semicolon before open_basedir:

;open_basedir =

 

 

then restart your local server and try again

Link to comment
Share on other sites

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

,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

  • 8 months later...

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

  • 3 years later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...