Frens Posted April 7, 2012 Share Posted April 7, 2012 Hello, I have the following warning when I try to translate the email templates in de BO (translations) Warning : file_exists() [ function.file-exists ]: open_basedir restriction in effect. File(/home/deb0000n2/domains/site.nl/public_html/modules/index.php/mails) is not within the allowed path(s): (/home/deb0000n2/:/tmp:/var/tmp:/usr/local/lib/php/) in /home/deb0000n2/domains/site.nl/public_html/iadmin/tabs/AdminTranslations.php on line 1476 Someone an idea ?? edit The email to admin are in English must in Dutch , but not posible Link to comment Share on other sites More sharing options...
cedricfontaine Posted April 7, 2012 Share Posted April 7, 2012 It seems to be a restriction within your hosting provider. Did you try to contact them ? Link to comment Share on other sites More sharing options...
Frens Posted April 7, 2012 Author Share Posted April 7, 2012 Hello , thanks for comment No contact with the hosting provider (weekend) at the moment i try to find out, i think its come with a upgrade 1470 >1472 Link to comment Share on other sites More sharing options...
El Patron Posted April 7, 2012 Share Posted April 7, 2012 here is a good explanation of this problem including some fixes... http://www.mydigitallife.info/php-scripts-open_basedir-restriction-in-effect-error/ 1 Link to comment Share on other sites More sharing options...
Frens Posted April 7, 2012 Author Share Posted April 7, 2012 Both thanks for comment, it looks that my provider must solve the problem Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 Hello, I still have no solution for the error, my host-provider knows no solution; Warning : file_exists() [function.file-exists ]: open_basedir restriction in effect. File(/home/deb0000n2/domains/site.nl/public_html/modules/index.php/mails) is not within the allowed path(s): (/home/deb0000n2/:/tmp:/var/tmp:/usr/local/lib/php/) in /home/deb0000n2/domains/site.nl/public_html/iadmin/tabs/AdminTranslations.php it has something to do with the modules e-mails translations: Link to comment Share on other sites More sharing options...
El Patron Posted April 21, 2012 Share Posted April 21, 2012 here is a good explanation of this problem including some fixes... http://www.mydigital...n-effect-error/ Sorry to hear yo are still having problems, did you take a look at this link? Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 Thanks for comments, I have looked but my English is not so good Link to comment Share on other sites More sharing options...
El Patron Posted April 21, 2012 Share Posted April 21, 2012 create a test.php file and upload to your site root with the following code: <?php // Show all information, defaults to INFO_ALL phpinfo(); ?> then navigate to test.php. Find safe_mode, what are the two values (local/master)? Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 The values are both off Link to comment Share on other sites More sharing options...
El Patron Posted April 21, 2012 Share Posted April 21, 2012 what values if any are in open_basedir? Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 open_basedir local; /home/dexxxxxxxxn2/:/tmp:/var/tmp:/usr/local/lib/php/ master; no value Link to comment Share on other sites More sharing options...
El Patron Posted April 21, 2012 Share Posted April 21, 2012 do you have access to your php.ini file? Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 I do not know, on weekends I can not reach host. Link to comment Share on other sites More sharing options...
El Patron Posted April 21, 2012 Share Posted April 21, 2012 ok, if you can tell me your host and hosting package I'll do some searches to see if any other similar problems. Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 they have just one package ,, also take the question put on their forum,hopefully someone responds Link to comment Share on other sites More sharing options...
El Patron Posted April 21, 2012 Share Posted April 21, 2012 paste this search in your browser, your hosting provider has a forum and this has been discussed: My dutch is much worse than you english. https://www.google.com.co/search?q=antagonist.nl+open_basedir&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a 1 Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 My dutch is much worse than you english. https://www.google.c...lient=firefox-a I thought so will try to see if I can find................ 1 Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 other part, I look at another site of mine and there are two values; open_basedir; no value no value Link to comment Share on other sites More sharing options...
El Patron Posted April 21, 2012 Share Posted April 21, 2012 other part, I look at another site of mine and there are two values; open_basedir; no value no value hopefully you have enough information so you can resolve your problem wiith your hosting company on Monday. Link to comment Share on other sites More sharing options...
Frens Posted April 21, 2012 Author Share Posted April 21, 2012 hello I read a lot ..example Not the open_basedir settings, but the path that you with the setup of this program is specified to be adapted. If your path starts with '/', this refers to the root, the root directory. You should refer to the root of your account, so / usr / home / debXXXXX / domains / xxxxx.nl / public_html @hopefully you have enough information so you can resolve your problem wiith your hosting company on Monday. I thinks so , Thanks for the help ...let you now , when i now more ! Link to comment Share on other sites More sharing options...
Frens Posted April 23, 2012 Author Share Posted April 23, 2012 Hello, My hoster answer; (hope you can read it) As shown in the error message, try to write in the PrestaShop folder /home/debxxxxn2/domains/xxx.nl/public_html/modules/index.php/mails. This is not a valid directory, but the open_base-dir restriction gives you full access to the folder /home/deb23380n2 / '. The error is perhaps somewhat misleading, that the folder is not accessible is not by open_basedir. It is our unfortunately not clear why the file 'AdminTranslations.php' refers to the folder'mail' and think 'index.php' is a directory. Could you maybe able to go after any reference to the said rule 1476 is used and whether there might be something to adjust it? ------------------------------------------------------------------------------------------------------------------- as I (example) AdminTranslations.php rule 1476 if ($ module_dir [0]! = '.' AND file_exists ($ _PS_MODULE_DIR_. module_dir. '/ mail')) change in if ($ module_dir [0]! = '.' AND file_exists ($ _PS_MODULE_DIR_. module_dir. /.. / mail ')) the error is gone, but I can not translate more mails module in my translations / mails, because they are no longer visible Link to comment Share on other sites More sharing options...
El Patron Posted April 24, 2012 Share Posted April 24, 2012 Hello, My hoster answer; (hope you can read it) As shown in the error message, try to write in the PrestaShop folder /home/debxxxxn2/domains/xxx.nl/public_html/modules/index.php/mails. This is not a valid directory, but the open_base-dir restriction gives you full access to the folder /home/deb23380n2 / '. The error is perhaps somewhat misleading, that the folder is not accessible is not by open_basedir. It is our unfortunately not clear why the file 'AdminTranslations.php' refers to the folder'mail' and think 'index.php' is a directory. Could you maybe able to go after any reference to the said rule 1476 is used and whether there might be something to adjust it? ------------------------------------------------------------------------------------------------------------------- as I (example) AdminTranslations.php rule 1476 if ($ module_dir [0]! = '.' AND file_exists ($ _PS_MODULE_DIR_. module_dir. '/ mail')) change in if ($ module_dir [0]! = '.' AND file_exists ($ _PS_MODULE_DIR_. module_dir. /.. / mail ')) the error is gone, but I can not translate more mails module in my translations / mails, because they are no longer visible $_PS_MODULE_DIR_ is a constant, and should not be coded with a preceding $, i.e. _PS_MODULE_DIR_ Link to comment Share on other sites More sharing options...
Frens Posted April 24, 2012 Author Share Posted April 24, 2012 Hello Thanks for comment I copied and pasted the code before yesterday it is a mystery to me why it was $_PS....., which I now see no more the error remains this is my code at the moment $arr_modules = array(); foreach (scandir(_PS_MODULE_DIR_) AS $module_dir) { if ($module_dir[0] != '.' AND file_exists(_PS_MODULE_DIR_.module_dir.'/mails')) { $arr_modules[$module_dir] = _PS_MODULE_DIR_.$module_dir; } } Link to comment Share on other sites More sharing options...
El Patron Posted April 24, 2012 Share Posted April 24, 2012 make sure to turn off cache and smarty compile, via performance...and MAKE sure to scroll down and turn off memcache or file system cache if you have it active...then clear your browser cache...and try again...having the $ at some point makes sense with your problem. maybe just re-upload a prestashop AdminTranslate... Link to comment Share on other sites More sharing options...
Frens Posted April 24, 2012 Author Share Posted April 24, 2012 I tried everything, nothing seeming to help, delete admin-translate etc... Link to comment Share on other sites More sharing options...
El Patron Posted April 24, 2012 Share Posted April 24, 2012 most times it's best to walk away from problems like this, then the answer will present itself...I don't mid looking at it further since all my other 'guesses' proved futile...pm me ftp credentials if you would like me to look at your run-time code.. Link to comment Share on other sites More sharing options...
stetom Posted November 10, 2012 Share Posted November 10, 2012 I had the same problem that it was solved removing the slash before "mails" in the path. I think it's not the best solution, but while waiting... Link to comment Share on other sites More sharing options...
waldemar [pl] Posted March 18, 2013 Share Posted March 18, 2013 (edited) Warning : file_exists() [ function.file-exists ]: open_basedir restriction in effect. File(/home/deb0000n2/domains/site.nl/public_html/modules/index.php/mails) is not within the allowed path(s): (/home/deb0000n2/:/tmp:/var/tmp:/usr/local/lib/php/) in /home/deb0000n2/domains/site.nl/public_html/iadmin/tabs/AdminTranslations.php Hello! The problem is in: open_basedir restriction in effect -> in this case, instead of trying to open the file index.php (like folder) and looking /mails. It is known that it will return an error and you have warning. Make a test and delete the moment index.php from /modules. Warning not be displayed. edit: sorry for my woodish english Edited March 18, 2013 by waldemar [pl] (see edit history) Link to comment Share on other sites More sharing options...
SweetPeas Posted March 21, 2013 Share Posted March 21, 2013 The problem is in the method getModulesHasMails in AdminTranslations.php. The line if ($module_dir[0] != '.' AND file_exists(_PS_MODULE_DIR_.$module_dir.'/mails')) is prefectly valid but the php function scandir in the previous line returns files as well in its result, not only valid directories. This means that the "file_exists" function will be executed for all files and directories in the modules directory. This is what generates the error. The solution: Simply prepend the "files_exists" with an @ and the errors will go away. This is how the line should have looked: if ($module_dir[0] != '.' AND @file_exists(_PS_MODULE_DIR_.$module_dir.'/mails')) Try it, it'll work. Link to comment Share on other sites More sharing options...
hellovelo Posted March 22, 2013 Share Posted March 22, 2013 (edited) Hello, I updated my prestashop a new version 1.4.8.2. When I go to the BO tools>translation and try to translate name fields this doesn't work. it does not show me the fields for translations. While with all other types of translations everything works perfectly. Could you help me what is my problem? Thank you! Edited March 22, 2013 by hellovelo (see edit history) Link to comment Share on other sites More sharing options...
SweetPeas Posted March 22, 2013 Share Posted March 22, 2013 What happens exactly ? Any error messages ? Link to comment Share on other sites More sharing options...
hellovelo Posted March 22, 2013 Share Posted March 22, 2013 I don't have error message. This is not make. Other translate is good. I attach print screen. Link to comment Share on other sites More sharing options...
SweetPeas Posted March 22, 2013 Share Posted March 22, 2013 Sorry, I have no idea. Someone else might know. 1 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