Access Denied

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
anil14353
Posts: 4
Joined: 11 May 2015, 16:38

Access Denied

Post by anil14353 » 11 May 2015, 16:41

Hi,
I'm trying to setup aimeos on my local system and i'm getting this error.
[MW_DB_Exception]
SQLSTATE[28000] [1045] Access denied for user 'anil'@'localhost' (using password: NO)
My Environment is
PHP 5.4 - ubuntu
Laravel 5
please help me to solve this.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Access Denied

Post by aimeos » 11 May 2015, 17:13

Hi Anil
anil14353 wrote: I'm trying to setup aimeos on my local system and i'm getting this error.
[MW_DB_Exception]
SQLSTATE[28000] [1045] Access denied for user 'anil'@'localhost' (using password: NO)
Did you adapt your .env file in the base directory of your Laravel application and changed your database credentials accordingly?

anil14353
Posts: 4
Joined: 11 May 2015, 16:38

Re: Access Denied

Post by anil14353 » 12 May 2015, 05:55

My .env is

Code: Select all

APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString

DB_HOST=localhost
DB_DATABASE=shop
DB_USERNAME=root
DB_PASSWORD=root

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Access Denied

Post by aimeos » 12 May 2015, 10:11

Hi Anil

Could you please try the following: Open your config/shop.php and replace the "resource" section with these lines:

Code: Select all

	'resource' => array(
		'db' => array(
			'adapter' => 'mysql',
			'host' => env('DB_HOST', 'localhost'),
			'port' => env('DB_PORT', ''),
			'database' => env('DB_DATABASE', 'laravel'),
			'username' => env('DB_USERNAME', 'root'),
			'password' => env('DB_PASSWORD', ''),
			'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ),
			'opt-persistent' => 0,
			'limit' => 2,
		),
	),
It seems that Laravel has sometimes problems to get the configuration from another config file.

anil14353
Posts: 4
Joined: 11 May 2015, 16:38

Re: Access Denied

Post by anil14353 » 12 May 2015, 10:41

Hey it works!! and installed successfully..
but how can i access the site i tried http://127.0.0.1:8000/index.php/list and http://localhost/shop/public/ both its not opening . The first link was not working means its just showing loading icon and Second link is just displaying the empty page.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Access Denied

Post by aimeos » 12 May 2015, 13:12

anil14353 wrote:Hey it works!! and installed successfully..
Great! We will change this in the config file so others won't stumble upon the same problem.
anil14353 wrote: but how can i access the site i tried http://127.0.0.1:8000/index.php/list and http://localhost/shop/public/ both its not opening . The first link was not working means its just showing loading icon and Second link is just displaying the empty page.
For being able to access the URL (http://127.0.0.1:8000/index.php/list), you need to fire up the integrated PHP web server first from your Laravel base application directory:

Code: Select all

php -S 127.0.0.1:8000 -t public
You can find this in the manual too: http://aimeos.org/docs/Laravel/Test_installation

anil14353
Posts: 4
Joined: 11 May 2015, 16:38

Re: Access Denied

Post by anil14353 » 13 May 2015, 01:21

I executed that command too but didn't work its just loading the page :(

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Access Denied

Post by aimeos » 13 May 2015, 10:16

anil14353 wrote:I executed that command too but didn't work its just loading the page :(
Did you executed the command in the base directory of your Laravel application? You should get an output like this:

Code: Select all

/Aimeos/src/laravel5.0$ php -S 127.0.0.1:8000 -t public/
PHP 5.5.9-1ubuntu4.9 Development Server started at Wed May 13 12:02:11 2015
Listening on http://127.0.0.1:8000
Document root is /Aimeos/src/laravel5.0/public
Press Ctrl-C to quit.
Don't quit the running server! Afterwards, your can open the list page using http://127.0.0.1:8000/index.php/list. If there's something wrong, you will get error messages in that terminal.

Post Reply