edevuk Posted February 26, 2009 Share Posted February 26, 2009 Hi all. I'm using PrestaShop 1.1 for the first time at the moment and certainly do not classify myself as a coder!However, I've been getting this error on the Admin Login page and could not find an easy solution to remove it: Path is not the same between your browser and you server : The below solution does not stop the error, but 'hides' it so it does not look unsightly on the login page.I would first ensure the following and only use this solution if these points are all checked:1. You can still log in fine and everything else works ok2. You've entered all subdomains for your site under Tools > Subdomains 3. You've checked your file/folder permissions are all correctThen, if you are still getting the error it can be hidden by commenting out lines 24, 25, 26 and 27 on login.php (in your admin folder) so it looks like this, with // at the beginning of each line: // if (strcmp($pathServer, $pathUser)) // $errors[] = Tools::displayError('Path is not the same between your browser and you server:').' '. // Tools::displayError('- Server:').' '.htmlentities($pathServer).' '. // Tools::displayError('- Browser:').' '.htmlentities($pathUser); If one of the team members can confirm this is ok to do that would be great as I'm quite a novice but it seems to work ok. And sorry if this has been addressed somewhere else, though I've not been able to find an answer in the forums.PS. I am using clustered/grid based hosting, not sure if this makes a difference or not? Link to comment Share on other sites More sharing options...
TropischBruin Posted February 26, 2009 Share Posted February 26, 2009 Thanks for pointing this out, eventhough it is a work-arround.It only happens when using a sub-domain (for as far I can see). Link to comment Share on other sites More sharing options...
edevuk Posted February 26, 2009 Author Share Posted February 26, 2009 No problem. Hope it helps people. I can confirm that this was happening on our installation with no subdomain. The clustered hosting may or may be a factor in this but has caused a few similar issues relating to paths and IP addresses before. Link to comment Share on other sites More sharing options...
amanuensis Posted March 27, 2009 Share Posted March 27, 2009 In my login.php file in admin the lines 24 through to 27 isn't the same as in your example (see below){ case 'fr': $l = array( 'Administration panel' => 'Panneau d\'administration',as I am getting this error could you point me in the right direction.Many thanks Link to comment Share on other sites More sharing options...
edevuk Posted March 27, 2009 Author Share Posted March 27, 2009 Hi amanuensis. I'm not too sure what's going on there. I can't see that code anywhere in my version. It is version 1.1 you are using isn't it?If it helps, the 3 lines immediately above the ones I commented out (lines 21-23) look like this... // Checking path $pathServer = ereg_replace('^/', '', $_SERVER['PHP_SELF']); $pathUser = ereg_replace('^/', '', str_replace($_SERVER['DOCUMENT_ROOT'], '', $_SERVER['SCRIPT_FILENAME'])); In other words, it is the 'Checking path' section you are looking for.Hope this helps. Link to comment Share on other sites More sharing options...
lemon Posted June 2, 2009 Share Posted June 2, 2009 this is not a way to solve the problem !!!!!!!!!!!!!!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
Patric Posted June 3, 2009 Share Posted June 3, 2009 If one of the team members can confirm this is ok to do that would be great I don't think they would say so. If they wrote these lines of code, they must have had a good reason...this is not a way to solve the problem !!!!!!!!!!!!!!!!!!!!!!!!! I agree. Hidding error messages is not a solution at all... Link to comment Share on other sites More sharing options...
Damien Metzger Posted June 3, 2009 Share Posted June 3, 2009 If you've got this error and everything works fine, then it's allright.But some cookie problems are bound to this path and we need to know it if we are to debug. Link to comment Share on other sites More sharing options...
Tibor Posted July 7, 2009 Share Posted July 7, 2009 Thanks :-) Link to comment Share on other sites More sharing options...
ArSui Posted July 7, 2009 Share Posted July 7, 2009 Il y a 1 erreurPath is not the same between your browser and you server :- Server:adminbonzai/login.php- Browser:usr/vhome/b/o/n/bonzaico.com/www/adminbonzai/login.php how should i do, if like erro that.???make me crazy.and how can i do if the sql server is version()4.0.27-log amazing that when i see the phpinfo(), mysql Client API version 5.0.45 some one can tell me? Link to comment Share on other sites More sharing options...
CorreoHS Posted September 23, 2009 Share Posted September 23, 2009 My Database in production server is NOT a set as localhost.Back OfficePath is not the same between your browser and you serverDuring the last couple of days I was researching the web looking for the correct answer to this issue, and I couldn’t found it yet. I can use it and I updated the entire site, always with this message every-time that I logged in.Front Office.Everything looks ok, until a new user visit the site again an try to log in again, it didn’t work at all.New user works until the user log out. When this new user become in an existing user this user can not log in again.I re-install the system around 5 times, and I went over each file and folder permission. Finally I decide to install the system in another Internet Provider with also Linux Server.PrestaShop worked GREAT and smooth, everything! No error at all. What the difference between my real Production Server and the Server that I use as a test is?The difference is: the test server has DATABASE is SET as a LOCALHOST.So.How can I fix the problem on the my real server, where the Path is not the same between your browser and you server is not the same????In Somewhere, should be able to set those variables. Thanks. Link to comment Share on other sites More sharing options...
tomashw Posted October 12, 2009 Share Posted October 12, 2009 Hi all. I'm using PrestaShop 1.1 for the first time at the moment and Then, if you are still getting the error it can be hidden by commenting out lines 24, 25, 26 and 27 on login.php (in your admin folder) so it looks like this, with // at the beginning of each line: // if (strcmp($pathServer, $pathUser)) // $errors[] = Tools::displayError('Path is not the same between your browser and you server:').' '. // Tools::displayError('- Server:').' '.htmlentities($pathServer).' '. // Tools::displayError('- Browser:').' '.htmlentities($pathUser); THX,function Link to comment Share on other sites More sharing options...
mpspringer Posted November 9, 2009 Share Posted November 9, 2009 Same issue for me!Error: Path is not the same between your browser and you server :- Server: admin/login.php- Browser: custompartyfavor.com/admin/login.phpURL: custompartyfavors.comHosting: GoDaddy- clustered hosting- /custompartyfavor.com is a folder off of the main root /- main root account is postal-zipcodes.comFYI- I installed PS on postal-zipcodes.com and no errors occurred.I have not found a solution to this issue..~~~~~~~~~~~~~~~~~~~~Update: i contacted GoDaddy and confirmed their hosting is setup as an "Alias" hosting account.Possible Resolution: PS needs a way to during setup (and within Admin) to point PS to the correct folder location on the server. Currently, PS is assuming that it's files are residing at the root. However, in my instance, the files are located within /custompartyfavor.com folder off of the root. Link to comment Share on other sites More sharing options...
nicolas-consulting Posted December 22, 2009 Share Posted December 22, 2009 Were you able to login to backoffice ?I have this error too but what is annying is that I cannot login to backoffice ...Any ideas ? I read the whoel forum and tied what was suggested and I have still the issue Link to comment Share on other sites More sharing options...
[email protected] Posted March 2, 2010 Share Posted March 2, 2010 I had the same problem today => impossible to login to the backoffice, but there was also a message about a token error.=> clear cookies and cache of your browser, and it works again. Link to comment Share on other sites More sharing options...
Technogod Posted April 12, 2010 Share Posted April 12, 2010 Hi,This problem causes another problems. Be careful. This error message not for fun.I found a problem when installing language pack to prestashop.it's causes internal server errror 500. When selected installed language.I'm feairng its also affect module uploads and other uploads.Pro's please interest with this error message.İf you want to hide error, this is more easy:find and replace this in login.phpif (strcmp($pathServer, $pathServer))And dont think to change Preferences -> PS directory--But it's no solve problem.--- 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