Forum Archive - [solved] edit translations problem

[solved] edit translations problem
Dec 15, 2011 10:05 pm by slweb2
To edit the translations you need to go to the language you want to edit and then add ?language_edit=1 That's ok. I modify the words and then when I want to save, it ask me USER and PASSWORD. I enter the user and password defined in config.php file but nothing! What's the problem? Regards
Re: edit translations problem
Dec 17, 2011 4:08 pm by Edvard
After you enter your user and password does it ask for user/password again?
Re: edit translations problem
Dec 23, 2011 5:25 pm by slweb2
Yes, it ask for user/password again, again and again... Have you the solution for this problem? Regards
Re: edit translations problem
Dec 25, 2011 3:51 pm by Edvard
Hi, Can you please check with your hosting provider in which mode PHP functions: CGI, fastCGI, Apache module?
Re: edit translations problem
Dec 27, 2011 4:08 pm by slweb2
CGI/FastCGI
Re: edit translations problem
Dec 29, 2011 1:34 pm by Edvard
Hi, Please read this: post4644.html?hilit=http_authorization#p4644 If the solution is little bit complicated for you I can do that for you myself. I'll need a temporary FTP access.
Re: edit translations problem
Jan 2, 2012 10:36 am by slweb2
Hi, I've added the line below to my .htaccess file SetEnvIfNoCase Authorization "Basic ([a-z0-9=]+)" REDIRECT_REMOTE_AUTHORIZATION=$1 I 've modified the edit_translation.php: <?php require_once 'config.php'; if (isset($_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]) && $_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]!='') { $d = base64_decode($_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]); list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', $d); } else { $file_name = 'cache/' . $_POST['lang'] . '/' . $_POST['md5']; if(file_exists($file_name)) { $result = json_decode(file_get_contents($file_name)); $old = isset($result->data->translations[0]->translatedText) ? $result->data->translations[0]->translatedText : null; $old = isset($result->TranslateResult) ? $result->TranslateResult : $old; $result->TranslateResult = $_POST['new']; $result->TranslateResultOld = $old; unset($result->data->translations[0]->translatedText); unset($result->data->translations[0]->translatedTextOld); file_put_contents($file_name.'.human', json_encode($result)); } else { $result = new stdClass; $result->TranslateResult = $_POST['new']; file_put_contents($file_name.'.human', json_encode($result)); } echo 'success'; exit; } #print_r($_POST); echo 'fail'; Now I can edit translation with success but the system doesn't ask me any USER and PASSWORD... Everyone can change the translatin of my website pages! What's the issue?
Re: edit translations problem
Jan 4, 2012 12:19 pm by Edvard
Hi, You just need to add the described part right after require_once statement without modifying the rest of code.
Re: edit translations problem
Jan 4, 2012 2:43 pm by jotamito
Hello, what should be the "described part" ... can you put please the entire code as it should be?
Re: edit translations problem
Jan 4, 2012 3:08 pm by slweb2
I've done what you said me... <?php require_once 'config.php'; if (isset($_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]) && $_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]!='') { $d = base64_decode($_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]); list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', $d); } if(!isset($_SERVER['PHP_AUTH_USER']) or !isset($_SERVER['PHP_AUTH_PW']) or !($_SERVER['PHP_AUTH_USER'] == USER and $_SERVER['PHP_AUTH_PW'] == PASS)) { header('WWW-Authenticate: Basic realm="Restricted area"'); header('HTTP/1.0 401 Unauthorized'); echo 'fail'; exit; } else { $file_name = 'cache/' . $_POST['lang'] . '/' . $_POST['md5']; if(file_exists($file_name)) { $result = json_decode(file_get_contents($file_name)); $old = isset($result->data->translations[0]->translatedText) ? $result->data->translations[0]->translatedText : null; $old = isset($result->TranslateResult) ? $result->TranslateResult : $old; $result->TranslateResult = $_POST['new']; $result->TranslateResultOld = $old; unset($result->data->translations[0]->translatedText); unset($result->data->translations[0]->translatedTextOld); file_put_contents($file_name.'.human', json_encode($result)); } else { $result = new stdClass; $result->TranslateResult = $_POST['new']; file_put_contents($file_name.'.human', json_encode($result)); } echo 'success'; exit; } #print_r($_POST); echo 'fail'; But so the system answer me USER and PASS again and again without saving...
Re: edit translations problem
Jan 4, 2012 10:25 pm by Edvard
Hi, If you can give me temporary FTP access, I can look into for you. BTW. As a temporary solution you can use the previous script to not ask for password and when you are done with editing you can replace it back.
Re: edit translations problem
Jan 5, 2012 10:04 am by slweb2
Ok I've send it to you with private message. Regards
Re: edit translations problem
Jan 10, 2012 11:37 am by slweb2
News?
Re: edit translations problem
Jan 16, 2012 12:56 pm by Edvard
Hi, I have checked and it seems that your server is misconfigured. During the auth request, the server responds with: php 4.4 server software and it is very strange... Please contact your hosting provider and ask them to update your PHP version to the latest one. Currently you use 5.2.6 and the last one is 5.2.17. Also, ask them to fix the problem with HTTP_AUTHORIZATION php $_SERVER variable is not being set. Currently in .htaccess joomla uses this, which has no effect at all RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Re: edit translations problem
Oct 19, 2016 10:47 am by casagesa
Hello i have the same propblem i add the codes already my php version is 5.4 Please can somehelp ??? I send already the support an message but no response!!!
Re: edit translations problem
Oct 19, 2016 12:35 pm by Yana
Hi, Please post your domain name, so we can check it.
Re: edit translations problem
Jan 10, 2017 2:44 pm by wpclinic
I have exactly the same problem too. The domain is http://sacomites.org.au/it/" rel="nofollow" target="_blank Any help will be appreciated. Steve
Re: edit translations problem
Jan 10, 2017 7:00 pm by Edvard
Hi, I have checked your website and was able to save translations. You need to use the login/password we have sent to you when you have subscribed. You should have it in your email. Thanks!
Re: edit translations problem
Jan 11, 2017 1:05 am by wpclinic
OMG I totally forgot about that, so sorry for wasting your time :) I just did the edits and used the username and pasword you sent me. Thankyou again Edvard Steve PS. please ignore my other Topic
Re: edit translations problem
Jan 11, 2017 8:39 am by Yana
You are welcome!

SIMILAR TOPICS

Joomshaper Pagebuilder buttons Link edit problemJan 11, 2019 10:04 amReplies: 1Post by: kumatest
Problem with pluginDec 30, 2018 11:59 pmReplies: 1Post by: Iyari
Problem of translation in my websiteDec 8, 2018 12:15 pmReplies: 1Post by: Ibrahim
Problem with qTranslate-x, please help!Aug 22, 2018 9:14 amReplies: 1Post by: sadammkhan
Export all custom translationsJul 5, 2018 11:50 amReplies: 1Post by: sadashiv

Try GTranslate with a free 15 day trial