Page 1 of 1

problems setting up ubuntu linux laravel 5.3

Posted: 24 Sep 2016, 20:28
by stu3881
hi,
i have tried repeatedly but cannot get this package successfully installed following the readme at: https://aimeos.org/Laravel

i am running
ubuntu 14.04
apache web server
php 5.6.26
aimeos 2016.07
laravel 5.3.10
laravel/homestead vm
database mysql
my project is named aimeos and my database is also named aimeos
i used
composer create-project laravel/laravel aimeos --prefer-dist
to create the project
i made the changes to composer.json
...
"license": "MIT",
"type": "project",
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"aimeos/aimeos-laravel": "~2016.07",
"php": ">=5.6.4",
"laravel/framework": "5.3.*"
and
...
"post-update-cmd": [
"php artisan vendor:publish --tag=public --force",
"php artisan vendor:publish",
"php artisan migrate",
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
i moved to the vm
vagrant ssh
cd code/aimeos
composer update
all seemed to go fine
modified config/database.php to use my credentials
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'aimeos'),
'username' => env('DB_USERNAME', 'homestead'),
'password' => env('DB_PASSWORD', 'secret'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
did the same with .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=aimeos
DB_USERNAME=homestead
DB_PASSWORD=secret
and finally... added
Aimeos\Shop\ShopServiceProvider::class,
to the providers array in config/app.php
i went back to the vm and executed the following commands
~/code/aimeos$ php artisan vendor:publish
~/code/aimeos$ php artisan migrate
~/code/aimeos$ php artisan aimeos:setup --option=setup/default/demo:1
~/code/aimeos$ php artisan aimeos:cache

There are 47 tables in my database. All appears to have worked normally.
mysql> use aimeos;show tables;
Database changed
+-------------------------------+
| Tables_in_aimeos |
+-------------------------------+
| madmin_cache |
| madmin_cache_tag |
| madmin_job |
| madmin_log |
| madmin_queue |
...

i have followed the instructions as closely as i can but I can't get past
http://127.0.0.1:8000/index.php/list
http://aimeos.dev:8000/index.php/list // my project is defined to the vm and this works for several other projects
Both of those get me
NotFoundHttpException in RouteCollection.php line 161
These next two get me the laravel welcome page.
http://127.0.0.1:8000/index.php
I notice that routes/web.php contains
Route::get('/', function () {
return view('welcome');
});
I also notice that lots of lines are commented out in config/shop.php but I'm not second guessing anyone.
I don't know what else to try. Seems like many are past this. Can someone see what I'm doing wrong?
thanks

Re: problems setting up ubuntu linux laravel 5.3

Posted: 25 Sep 2016, 09:35
by aimeos
stu3881 wrote: There are 47 tables in my database. All appears to have worked normally.
It must be 74 but I think you only twisted the numbers :-)
stu3881 wrote: Both of those get me
NotFoundHttpException in RouteCollection.php line 161
These next two get me the laravel welcome page.
http://127.0.0.1:8000/index.php
I notice that routes/web.php contains
Route::get('/', function () {
return view('welcome');
});
The Laravel 5.3 upgrade guide doesn't state any relevant changes in the upgrade guide:
https://laravel.com/docs/5.3/upgrade#upgrade-5.3.0

The match() method in the RouteCollection class throws a "NotFoundHttpException" if no matching route is found. Can you add a leading slash ("/") to the route definitions in the ./src/route.php file of the Aimeos Laravel package (https://github.com/aimeos/aimeos-larave ... routes.php)? Maybe there was a subtle change that causes the routes to don't match any more and now requires "/list" instead of only "list"

Re: problems setting up ubuntu linux laravel 5.3

Posted: 25 Sep 2016, 20:44
by stu3881
hi
(yes, 74)

You want me to go thru
~/Homestead/projects/aimeos/vendor/aimeos/aimeos-laravel/src/routes.php
and modify the code such that:

Route::match( array( 'GET' ), 'extadm', array(
...
Route::match( array( 'GET' ), 'extadm/file', array(
...
Route::match( array( 'POST' ), 'extadm/do', array(
...
become
Route::match( array( 'GET' ), '/extadm', array(
...
Route::match( array( 'GET' ), '/extadm/file', array(
...
Route::match( array( 'POST' ), '/extadm/do', array(
...
Do i have to reload anything to pick up changes to the vendor stuff?
thanks. It didn't work.

Re: problems setting up ubuntu linux laravel 5.3

Posted: 26 Sep 2016, 07:56
by aimeos
Can you check if the Aimeos routes are registered at all?

Code: Select all

./artisan route:list

Re: problems setting up ubuntu linux laravel 5.3

Posted: 26 Sep 2016, 12:52
by stu3881
Here's my route list:

vagrant@homestead:~/code/aimeos$ php artisan route:list
+--------+---------------+---------------------------------------------------------------------------+------------------------------+---------------------------------------------------------+--------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+---------------+---------------------------------------------------------------------------+------------------------------+---------------------------------------------------------+--------------+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | admin | aimeos_shop_admin | Aimeos\Shop\Controller\AdminController@indexAction | web |
| | GET|HEAD | api/user | | Closure | api,auth:api |
| | GET|POST|HEAD | basket | aimeos_shop_basket | Aimeos\Shop\Controller\BasketController@indexAction | web |
| | GET|POST|HEAD | checkout/{c_step?} | aimeos_shop_checkout | Aimeos\Shop\Controller\CheckoutController@indexAction | web |
| | GET|POST|HEAD | confirm | aimeos_shop_confirm | Aimeos\Shop\Controller\CheckoutController@confirmAction | web |
| | GET|POST|HEAD | count | aimeos_shop_count | Aimeos\Shop\Controller\CatalogController@countAction | web |
| | GET|POST|HEAD | detail/pin/{pin_action?}/{pin_id?}/{d_prodid?}/{d_name?}/{l_pos?} | aimeos_shop_session_pinned | Aimeos\Shop\Controller\CatalogController@detailAction | web |
| | GET|POST|HEAD | detail/{d_prodid}/{d_name?}/{l_pos?} | aimeos_shop_detail | Aimeos\Shop\Controller\CatalogController@detailAction | web |
| | GET|HEAD | extadm | aimeos_shop_extadm | Aimeos\Shop\Controller\ExtadmController@indexAction | web,auth |
| | POST | extadm/do | aimeos_shop_extadm_json | Aimeos\Shop\Controller\ExtadmController@doAction | web,auth |
| | GET|HEAD | extadm/file | aimeos_shop_extadm_file | Aimeos\Shop\Controller\ExtadmController@fileAction | web,auth |
| | GET|POST|HEAD | jqadm/copy/{resource}/{id} | aimeos_shop_jqadm_copy | Aimeos\Shop\Controller\JqadmController@copyAction | web,auth |
| | GET|POST|HEAD | jqadm/create/{resource} | aimeos_shop_jqadm_create | Aimeos\Shop\Controller\JqadmController@createAction | web,auth |
| | GET|POST|HEAD | jqadm/delete/{resource}/{id} | aimeos_shop_jqadm_delete | Aimeos\Shop\Controller\JqadmController@deleteAction | web,auth |
| | GET|HEAD | jqadm/file/{type} | aimeos_shop_jqadm_file | Aimeos\Shop\Controller\JqadmController@fileAction | web,auth |
| | GET|HEAD | jqadm/get/{resource}/{id} | aimeos_shop_jqadm_get | Aimeos\Shop\Controller\JqadmController@getAction | web,auth |
| | POST | jqadm/save/{resource}/{id?} | aimeos_shop_jqadm_save | Aimeos\Shop\Controller\JqadmController@saveAction | web,auth |
| | GET|POST|HEAD | jqadm/search/{resource} | aimeos_shop_jqadm_search | Aimeos\Shop\Controller\JqadmController@searchAction | web,auth |
| | OPTIONS | jsonadm/{resource?} | aimeos_shop_jsonadm_options | Aimeos\Shop\Controller\JsonadmController@optionsAction | web,auth |
| | GET|HEAD | jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_get | Aimeos\Shop\Controller\JsonadmController@getAction | web,auth |
| | DELETE | jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_delete | Aimeos\Shop\Controller\JsonadmController@deleteAction | web,auth |
| | PUT | jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_put | Aimeos\Shop\Controller\JsonadmController@putAction | web,auth |
| | PATCH | jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_patch | Aimeos\Shop\Controller\JsonadmController@patchAction | web,auth |
| | POST | jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_post | Aimeos\Shop\Controller\JsonadmController@postAction | web,auth |
| | GET|POST|HEAD | list | aimeos_shop_list | Aimeos\Shop\Controller\CatalogController@listAction | web |
| | GET|POST|HEAD | myaccount | aimeos_shop_account | Aimeos\Shop\Controller\AccountController@indexAction | web,auth |
| | GET|POST|HEAD | myaccount/download/{dl_id} | aimeos_shop_account_download | Aimeos\Shop\Controller\AccountController@downloadAction | web,auth |
| | GET|POST|HEAD | myaccount/favorite/{fav_action?}/{fav_id?}/{d_prodid?}/{d_name?}/{l_pos?} | aimeos_shop_account_favorite | Aimeos\Shop\Controller\AccountController@indexAction | web,auth |
| | GET|POST|HEAD | myaccount/watch/{wat_action?}/{wat_id?}/{d_prodid?}/{d_name?}/{l_pos?} | aimeos_shop_account_watch | Aimeos\Shop\Controller\AccountController@indexAction | web,auth |
| | GET|HEAD | privacy | aimeos_shop_privacy | Aimeos\Shop\Controller\PageController@privacyAction | |
| | GET|POST|HEAD | stock | aimeos_shop_stock | Aimeos\Shop\Controller\CatalogController@stockAction | web |
| | GET|POST|HEAD | suggest | aimeos_shop_suggest | Aimeos\Shop\Controller\CatalogController@suggestAction | web |
| | GET|HEAD | terms | aimeos_shop_terms | Aimeos\Shop\Controller\PageController@termsAction | |
| | GET|POST|HEAD | update | aimeos_shop_update | Aimeos\Shop\Controller\CheckoutController@updateAction | |
+--------+---------------+---------------------------------------------------------------------------+------------------------------+---------------------------------------------------------+--------------+

Re: problems setting up ubuntu linux laravel 5.3

Posted: 26 Sep 2016, 13:05
by aimeos
The routes seem to be OK and I've found not hint in the docs or the internet for any routing problems in Laravel 5.3.
Could you please ask in the Laravel forums what could be the problem here?

Re: problems setting up ubuntu linux laravel 5.3

Posted: 26 Sep 2016, 15:36
by stu3881
hi,
Both Laravel and Aimeos are choices i'm very happy with and it appears many are using that configuration successfully. Your instructions are both clear and simple. (They were an education in themselves) But, I have installed it many times and can never get the first test (list the categories) to work. While so much of this is new to me, i got my laravel vm up and running and can easily refresh both the project and the database. I think i posess the necessary skillset to get your product up and running.

So, with all humility, may i prevail upon you to create your own project and step through the installation yourselves and see if it works for you when you're done. Of course i'd like you to install comparable versions of php, laravel and aimeos from whatever the closest thing you've got to the Ubuntu desktop is. (Yes, I'm hoping there's some little thing that got overlooked in the documentation). The instructions are pre-5.3 Maybe it's a problem with Ubuntu. I'm sure you could perform this test for me in less time than I can.

The Laravel support people don't want to get into issues with vendor software. But, if you'll perform the test above, I'll be able to go back to them with the results... or maybe it's Ubuntu?

thanks.

Re: problems setting up ubuntu linux laravel 5.3

Posted: 26 Sep 2016, 15:49
by aimeos
I think the problem is Laravel 5.3 and it would work out of the box if you use Laravel 5.1 or 5.2 instead.

Re: problems setting up ubuntu linux laravel 5.3

Posted: 26 Sep 2016, 16:04
by stu3881
Uh, me too. I thought composer was supposed to avoid stuff like this. Anyhow, I'll see what I can do about installing and testing 5.2 instead and get back to you.
thx