Jump to content

Can't login to back office after fresh install


Recommended Posts

Hello, i've installed my presta shop locally but i can't login to back office.

My employee data is ok.

 

My server configuration:

 

ii  nginx						   1.0.5-1				  small, but very powerful and efficient web server and mail proxy
ii  nginx-common						   1.0.5-1								 small, but very powerful and efficient web server (common files)
ii  nginx-full							 1.0.5-1								 nginx web server with full set of core modules

ii  php-apc								3.1.7-1								 APC (Alternative PHP Cache) module for PHP 5
ii  php-auth-sasl						  1.0.4-1								 Abstraction of various SASL mechanism responses
ii  php-http-request					   1.4.4-3								 provides an easy way to perform HTTP requests
ii  php-mail							   1.2.0-2								 PHP PEAR module for sending email
ii  php-mail-mime						  1.8.0-2								 PHP PEAR module for creating MIME messages
ii  php-mail-mimedecode					1.5.5-1								 PHP PEAR module to decode MIME messages
ii  php-net-dime						   0.3-3								   class that implements DIME encoding
ii  php-net-smtp						   1.6.0-1								 PHP PEAR module implementing SMTP protocol
ii  php-net-socket						 1.0.9-2								 PHP PEAR Network Socket Interface module
ii  php-net-url							1.0.15-2								easy parsing of Urls
ii  php-pear							   5.3.6-13ubuntu3.3					   PEAR - PHP Extension and Application Repository
ii  php-soap							   0.12.0-2								a SOAP Client/Server class for PHP
ii  php5								   5.3.6-13ubuntu3.3					   server-side, HTML-embedded scripting language (metapackage)
ii  php5-cli							   5.3.6-13ubuntu3.3					   command-line interpreter for the php5 scripting language
ii  php5-common							5.3.6-13ubuntu3.3					   Common files for packages built from the php5 source
ii  php5-curl							  5.3.6-13ubuntu3.3					   CURL module for php5
ii  php5-dev							   5.3.6-13ubuntu3.3					   Files for PHP5 module development
ii  php5-fpm							   5.3.6-13ubuntu3.3					   server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php5-gd								5.3.6-13ubuntu3.3					   GD module for php5
ii  php5-intl							  5.3.6-13ubuntu3.3					   internationalisation module for php5
ii  php5-mcrypt							5.3.5-0ubuntu1						  MCrypt module for php5
ii  php5-memcache						  3.0.5-1								 memcache extension module for PHP5
ii  php5-mysql							 5.3.6-13ubuntu3.3					   MySQL module for php5
ii  php5-sqlite							5.3.6-13ubuntu3.3					   SQLite module for php5
ii  phpmyadmin							 4:3.4.5-1							   MySQL web administration tool
ii  libdbd-mysql-perl					  4.019-1								 Perl5 database interface to the MySQL database
ii  libmysqlclient16					   5.1.58-1ubuntu1						 MySQL database client library
ii  libqt4-sql-mysql					   4:4.7.4-0ubuntu8						Qt 4 MySQL database driver
ii  mysql-admin							5.0r14+openSUSE-2.2ubuntu2			  GUI tool for intuitive MySQL administration
ii  mysql-client						   5.1.58-1ubuntu1						 MySQL database client (metapackage depending on the latest version)
ii  mysql-client-5.1					   5.1.58-1ubuntu1						 MySQL database client binaries
ii  mysql-client-core-5.1				  5.1.58-1ubuntu1						 MySQL database core client binaries
ii  mysql-common						   5.1.58-1ubuntu1						 MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-gui-tools-common				 5.0r14+openSUSE-2.2ubuntu2			  Architecture independent files for MySQL GUI Tools
ii  mysql-query-browser					5.0r14+openSUSE-2.2ubuntu2			  Official GUI tool to query MySQL database
ii  mysql-server						   5.1.58-1ubuntu1						 MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.1					   5.1.58-1ubuntu1						 MySQL database server binaries and system database setup
ii  mysql-server-core-5.1				  5.1.58-1ubuntu1						 MySQL database server binaries
ii  mysql-workbench-gpl					5.2.36-1ubu1104						 MySQL Workbench
ii  php5-mysql							 5.3.6-13ubuntu3.3					   MySQL module for php5

 

 

Authorization method: Cookie::isLoggedBack() returns false, cookie isn't valid, in method body: $this->id_employee equals false :/

 

What is the problem? Thx.

Link to comment
Share on other sites

Are you using Safari as your browser?

I too cannot login - but only when using Safari.

 

try using internet explorer.

 

But don't expect any help getting presta shop to work with safari - I have asked several time and even submitted support requests and never got a single reply back.

Link to comment
Share on other sites

Hello, i've installed my presta shop locally but i can't login to back office.

My employee data is ok.

 

My server configuration:

 

ii  nginx								  1.0.5-1								 small, but very powerful and efficient web server and mail proxy
ii  nginx-common						   1.0.5-1								 small, but very powerful and efficient web server (common files)
ii  nginx-full							 1.0.5-1								 nginx web server with full set of core modules

ii  php-apc								3.1.7-1								 APC (Alternative PHP Cache) module for PHP 5
ii  php-auth-sasl						  1.0.4-1								 Abstraction of various SASL mechanism responses
ii  php-http-request					   1.4.4-3								 provides an easy way to perform HTTP requests
ii  php-mail							   1.2.0-2								 PHP PEAR module for sending email
ii  php-mail-mime						  1.8.0-2								 PHP PEAR module for creating MIME messages
ii  php-mail-mimedecode					1.5.5-1								 PHP PEAR module to decode MIME messages
ii  php-net-dime						   0.3-3								   class that implements DIME encoding
ii  php-net-smtp						   1.6.0-1								 PHP PEAR module implementing SMTP protocol
ii  php-net-socket						 1.0.9-2								 PHP PEAR Network Socket Interface module
ii  php-net-url							1.0.15-2								easy parsing of Urls
ii  php-pear							   5.3.6-13ubuntu3.3					   PEAR - PHP Extension and Application Repository
ii  php-soap							   0.12.0-2								a SOAP Client/Server class for PHP
ii  php5								   5.3.6-13ubuntu3.3					   server-side, HTML-embedded scripting language (metapackage)
ii  php5-cli							   5.3.6-13ubuntu3.3					   command-line interpreter for the php5 scripting language
ii  php5-common							5.3.6-13ubuntu3.3					   Common files for packages built from the php5 source
ii  php5-curl							  5.3.6-13ubuntu3.3					   CURL module for php5
ii  php5-dev							   5.3.6-13ubuntu3.3					   Files for PHP5 module development
ii  php5-fpm							   5.3.6-13ubuntu3.3					   server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php5-gd								5.3.6-13ubuntu3.3					   GD module for php5
ii  php5-intl							  5.3.6-13ubuntu3.3					   internationalisation module for php5
ii  php5-mcrypt							5.3.5-0ubuntu1						  MCrypt module for php5
ii  php5-memcache						  3.0.5-1								 memcache extension module for PHP5
ii  php5-mysql							 5.3.6-13ubuntu3.3					   MySQL module for php5
ii  php5-sqlite							5.3.6-13ubuntu3.3					   SQLite module for php5
ii  phpmyadmin							 4:3.4.5-1							   MySQL web administration tool
ii  libdbd-mysql-perl					  4.019-1								 Perl5 database interface to the MySQL database
ii  libmysqlclient16					   5.1.58-1ubuntu1						 MySQL database client library
ii  libqt4-sql-mysql					   4:4.7.4-0ubuntu8						Qt 4 MySQL database driver
ii  mysql-admin							5.0r14+openSUSE-2.2ubuntu2			  GUI tool for intuitive MySQL administration
ii  mysql-client						   5.1.58-1ubuntu1						 MySQL database client (metapackage depending on the latest version)
ii  mysql-client-5.1					   5.1.58-1ubuntu1						 MySQL database client binaries
ii  mysql-client-core-5.1				  5.1.58-1ubuntu1						 MySQL database core client binaries
ii  mysql-common						   5.1.58-1ubuntu1						 MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-gui-tools-common				 5.0r14+openSUSE-2.2ubuntu2			  Architecture independent files for MySQL GUI Tools
ii  mysql-query-browser					5.0r14+openSUSE-2.2ubuntu2			  Official GUI tool to query MySQL database
ii  mysql-server						   5.1.58-1ubuntu1						 MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.1					   5.1.58-1ubuntu1						 MySQL database server binaries and system database setup
ii  mysql-server-core-5.1				  5.1.58-1ubuntu1						 MySQL database server binaries
ii  mysql-workbench-gpl					5.2.36-1ubu1104						 MySQL Workbench
ii  php5-mysql							 5.3.6-13ubuntu3.3					   MySQL module for php5

 

 

Authorization method: Cookie::isLoggedBack() returns false, cookie isn't valid, in method body: $this->id_employee equals false :/

 

What is the problem? Thx.

 

Amazingly no one even the prestashop master answer this I have more weird problem with 1.4. latest

 

Hi

I just trying your good looking prestashop everything seem right until I try to login backend system

1. I already delete install folder 2. rename admin folder to admin230

what I got is internal error 500

I tried set display error on and it showed

 

 

 

Warning: require_once(/home/save2bid/domains/save2bid.com/public_html/shop/admin/init.php) [function.require-once]: failed to open stream: No such file or directory in /home/save2bid/domains/save2bid.com/public_html/shop/admin/header.inc.php on line 34

 

Fatal error: require_once() [function.require]: Failed opening required '/home/save2bid/domains/save2bid.com/public_html/shop/admin/init.php' (include_path='.:/usr/local/lib/php') in /home/save2bid/domains/save2bid.com/public_html/shop/admin/header.inc.php on line 34

the folder of prestashop is under <myydomain>/shop/ and in config inc is right

 

but the error seem to remember as admin name anyway

and when I check by writing a script with getcwd it work right return admin230

so I need your advice now

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

I'm having the same problem with this on a fresh install on a development server.

 

Running Ubuntu 10.04, PHP-FPM, and nginx 0.7.65.

 

Installed fine, and front-end working with default installation, however when i rename /admin/ to something else and go to that URL I get a 500 error.

 

The error.log gives the following:

2012/02/12 23:38:19 [error] 28710#0: *10165 FastCGI sent in stderr: "PHP Warning:  require_once(/var/www/example.com/public_html/1462/admin/init.php): failed to open stream: No such file or directory in /var/www/example.com/public_html/1462/admin/header.inc.php on line 34
PHP Fatal error:  require_once(): Failed opening required '/var/www/example.com/public_html/1462/admin/init.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/example.com/public_html/1462/admin/header.inc.php on line 34" while reading response header from upstream, client: 94.193.54.144, server: example.com, request: "GET /1462/admin2057/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "example.com"
2012/02/12 23:38:20 [error] 28710#0: *10165 FastCGI sent in stderr: "PHP Warning:  require_once(/var/www/example.com/public_html/1462/admin/init.php): failed to open stream: No such file or directory in /var/www/example.com/public_html/1462/admin/header.inc.php on line 34
PHP Fatal error:  require_once(): Failed opening required '/var/www/example.com/public_html/1462/admin/init.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/example.com/public_html/1462/admin/header.inc.php on line 34" while reading response header from upstream, client: 94.193.54.144, server: example.com, request: "GET /1462/admin2057/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "example.com"

 

I've seen a few threads on this, that are marked as solved but no solution was actually given. Has anyone figured this out?

 

Mark

Link to comment
Share on other sites

Hi Bellini,

 

Yes unfortunately I've been restarting nginx while trying different configurations.

 

I have a hunch its to do with header sizes, maybe cookies and it timing out. It references the old /admin/ folder and says file not found which is confusing.

 

I want to avoid editing the core files for obvious reasons reasons, however never had this problem on the apache servers though.

 

Thanks

 

Mark

Link to comment
Share on other sites

i would suggest changing this line of code in /admin/index.php. replace getcwd() with an alternate way of defining the fullpath to that directory. that will atleast get you past your issue for the time being. it also gives you a place to start as to why nginx is not working. it still sounds like a file reference caching issue.

 

define('_PS_ADMIN_DIR_', getcwd());

Link to comment
Share on other sites

Hi Bellini,

 

Manually setting _PS_ADMIN_DIR_ worked fine, but then I re-read your post and realised you'd suggested restarting the whole webserver, not just nginx as I had been doing.

 

I did this and its now all working, sorry for missing that and thanks for you help!

 

The trusty 'turn it off and on again' fix seems to be the answer yet again!

 

Mark

Link to comment
Share on other sites

I had problems too when trying to log into the storefront with a customer account, getting a 502 error.

 

The error log showed:

2012/02/17 16:33:20 [error] 1955#0: *6840 upstream sent too big header while reading response header from upstream...

 

This was easily fixed by adding the following to my PHP config, inside the website settings in my /etc/nginx//sites-available/ folder. This could also be included within the http {} brackets of your /etc/nginx/nginx.conf file.

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

 

So in full my /etc/nginx/sites-available/example.com/ file looked like this:

server {
listen 80;
server_name example.com;
access_log /var/www/example.com/logs/access.log;
error_log /var/www/example.com/logs/error.log;
root /var/www/example.com/public_html;
location / {
	index index.php;

	# serve static files directly
	if (-f $request_filename) {
	  access_log		off;
	  expires		   30d;
	  break;
	}

	## Add trailing slash
	rewrite ^(.*[^/])$ $1/ permanent;

}  
location ~ \.php {
	try_files $uri =404;
	include /etc/nginx/fastcgi_params;
	fastcgi_pass 127.0.0.1:9000;
	fastcgi_buffers 8 16k;
	fastcgi_buffer_size 32k;
	fastcgi_index index.php;
	fastcgi_param SCRIPT_FILENAME /var/www/example.com/public_html$fastcgi_script_name;
}
}

 

Your set up may be different, so make changes as appropriate.

 

Once you're done, save/upload/overwrite the file and reload your nginx config with the SSH command:

/etc/init.d/nginx reload

 

Hopefully that'll help anyone that has this problem.

 

Mark

Link to comment
Share on other sites

It doesn't work for me.

I've changed getcwd() to real path of admin directory, chaned also nginx config:

server {
	server_name_in_redirect on;
	server_name presta;
	listen		  *:80;
	root			/home/kamil/Projekty/presta;
	index		   index.php;
	location / {
			index index.php;
			# serve static files directly
			if (-f $request_filename) {
			  access_log			off;
			  expires				  30d;
			  break;
			}
			## Add trailing slash
			rewrite ^(.*[^/])$ $1/ permanent;
	}
	location ~ \.php($|/) {
			set  $script	 $uri;
			set  $path_info  $request_uri;
			if ($uri ~ "^(.+\.php)(/.+)") {
				set  $script	 $1;
				set  $path_info  $2;
			}
			fastcgi_pass		 127.0.0.1:9000;
			include		  /etc/nginx/fastcgi_params;
			fastcgi_buffers 8 16k;
			fastcgi_buffer_size 32k;
			fastcgi_param  SCRIPT_FILENAME  /home/kamil/Projekty/presta/$script;
			fastcgi_param  PATH_INFO		$path_info;
			fastcgi_param  SCRIPT_NAME	  $script;
			fastcgi_param  SERVER_NAME	  $host;
	}

}

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...
  • 6 months later...

Unfortunately they used 2 differents way to set the admin cookie path :

 

In login.php file :

substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__), -10)

 

But in the init.php file :

substr($_SERVER['SCRIPT_NAME'], strlen(__PS_BASE_URI__), -strlen($currentFileName['0'])

 

Look like 2 differents person are worked on it ! Just replace PHP_SELF by SCRIPT_NAME in login.php ....

Edited by Prestadget (see edit history)
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...