Closed mikeyapina closed 5 years ago
@mikeyapina
try running in these order
php artisan migrate:fresh
php artisan avored:install
sadly just more issues ... sadly. After I ran that without erros adn added a admin account I tried to go to the /admin and this is the error
ErrorException (E_WARNING) Illegal offset type in isset or empty
http://store.regenics.com/admin
a tad frustrating but appreciate your guidance.
@mikeyapina
honestly, I never had any of these error in the past. (i would still say it's nice to have a bug that you can fixed it so it helps to improve the application).
I am not sure what these error is but my best guess
i would say that config/auth
it not merging properly which is very weired. It should happen in AvoRedProvider
file.
have you run composer update
command?
i understand .. i can only describe what is happening here i just ran it all again. One error prior siad i had to generster a key so i did that as another step.
But when i go to the url http://store.regenics.com/ same error
ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ php artisan key:generate Application key set successfully. ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ php artisan config:cache Configuration cache cleared! Configuration cached successfully! ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo run composer update sudo: run: command not found ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo composer update Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi Discovered Package: avored/framework Discovered Package: beyondcode/laravel-dump-server Discovered Package: fideloper/proxy Discovered Package: laravel/passport Discovered Package: laravel/tinker Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Package manifest generated successfully. ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ php artisan migrate:fresh Dropped all tables successfully. Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_000000_create_users_table (0.14 seconds) Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table (0.14 seconds) Migrating: 2016_06_01_000001_create_oauth_auth_codes_table Migrated: 2016_06_01_000001_create_oauth_auth_codes_table (0.19 seconds) Migrating: 2016_06_01_000002_create_oauth_access_tokens_table Migrated: 2016_06_01_000002_create_oauth_access_tokens_table (0.25 seconds) Migrating: 2016_06_01_000003_create_oauth_refresh_tokens_table Migrated: 2016_06_01_000003_create_oauth_refresh_tokens_table (0.25 seconds) Migrating: 2016_06_01_000004_create_oauth_clients_table Migrated: 2016_06_01_000004_create_oauth_clients_table (0.14 seconds) Migrating: 2016_06_01_000005_create_oauth_personal_access_clients_table Migrated: 2016_06_01_000005_create_oauth_personal_access_clients_table (0.14 seconds) Migrating: 2017_03_29_000000_avored_framework_schema Migrated: 2017_03_29_000000_avored_framework_schema (14.17 seconds) ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ php artisan avored:install Nothing to migrate. AvoRed Install Successfully!
so as a practice i went thru every step again .. the only error i get is the error we talked about at the beginning that you said not to worry about. But still the same issue happens again so i repeated everything with the same result.
ubuntu@ip-172-31-1-145:/var/www/html/store$ sudo rm -R laravel-ecommerce ubuntu@ip-172-31-1-145:/var/www/html/store$ sudo composer create-project avored/laravel-ecommerce:3.0.0-beta-3 Do not run Composer as root/super user! See https://getcomposer.org/root for details Installing avored/laravel-ecommerce (3.0.0-beta-3) As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension. This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost. Installing 'unzip' may remediate them.
@php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. Package operations: 107 installs, 0 updates, 0 removals
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi
In AppServiceProvider.php line 33:
Call to undefined method AvoRed\Framework\Menu\MenuItem::type()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 ubuntu@ip-172-31-1-145:/var/www/html/store$ sudo vi laravel-ecommerce/.env ubuntu@ip-172-31-1-145:/var/www/html/store$ php artisan migrate:fresh
UnexpectedValueException : The stream or file "/var/www/html/store/storage/logs/laravel-2019-08-30.log" could not be opened: failed to open stream: Permission denied
at /var/www/html/store/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107 103| } 104| restore_error_handler(); 105| if (!is_resource($this->stream)) { 106| $this->stream = null;
107| throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url)); 108| } 109| } 110| 111| if ($this->useLocking) {
Exception trace:
1 Monolog\Handler\StreamHandler::write() /var/www/html/store/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:119
2 Monolog\Handler\RotatingFileHandler::write() /var/www/html/store/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:39
Please use the argument -v to see more details. ubuntu@ip-172-31-1-145:/var/www/html/store$ cd la* ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ php artisan migrate:fresh
In StreamHandler.php line 107:
The stream or file "/var/www/html/store/laravel-ecommerce/storage/logs/laravel-2019-08-30.log" could not be opened: failed to open stream: Permission denied
ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo php artisan migrate:fresh
In AppServiceProvider.php line 33:
Call to undefined method AvoRed\Framework\Menu\MenuItem::type()
ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ cd .. ubuntu@ip-172-31-1-145:/var/www/html/store$ sudo chown -R www-data:www-data /laravel-ecommerc chown: cannot access '/laravel-ecommerc': No such file or directory ubuntu@ip-172-31-1-145:/var/www/html/store$ sudo chown -R www-data:www-data /laravel-ecommerce chown: cannot access '/laravel-ecommerce': No such file or directory ubuntu@ip-172-31-1-145:/var/www/html/store$ sudo chown -R www-data:www-data laravel-ecommerce ubuntu@ip-172-31-1-145:/var/www/html/store$ sudo chmod o+w storage ubuntu@ip-172-31-1-145:/var/www/html/store$ sudo chmod -R 770 laravel-ecommerce ubuntu@ip-172-31-1-145:/var/www/html/store$ cd lar* ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo php artisan migrate:fresh
In AppServiceProvider.php line 33:
Call to undefined method AvoRed\Framework\Menu\MenuItem::type()
ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo usermod -a -G www-data ubuntu ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo php artisan migrate:fresh
In AppServiceProvider.php line 33:
Call to undefined method AvoRed\Framework\Menu\MenuItem::type()
ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo chgrp -R www-data storage bootstrap/cache ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo chmod -R ug+rwx storage bootstrap/cache ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo php artisan migrate:fresh
In AppServiceProvider.php line 33:
Call to undefined method AvoRed\Framework\Menu\MenuItem::type()
ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ composer update Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 0 installs, 46 updates, 10 removals
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi Discovered Package: avored/framework Discovered Package: beyondcode/laravel-dump-server Discovered Package: fideloper/proxy Discovered Package: laravel/passport Discovered Package: laravel/tinker Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Package manifest generated successfully. ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo php artisan migrate:fresh Dropped all tables successfully. Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_000000_create_users_table (0.15 seconds) Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table (0.15 seconds) Migrating: 2016_06_01_000001_create_oauth_auth_codes_table Migrated: 2016_06_01_000001_create_oauth_auth_codes_table (0.19 seconds) Migrating: 2016_06_01_000002_create_oauth_access_tokens_table Migrated: 2016_06_01_000002_create_oauth_access_tokens_table (0.25 seconds) Migrating: 2016_06_01_000003_create_oauth_refresh_tokens_table Migrated: 2016_06_01_000003_create_oauth_refresh_tokens_table (0.26 seconds) Migrating: 2016_06_01_000004_create_oauth_clients_table Migrated: 2016_06_01_000004_create_oauth_clients_table (0.14 seconds) Migrating: 2016_06_01_000005_create_oauth_personal_access_clients_table Migrated: 2016_06_01_000005_create_oauth_personal_access_clients_table (0.14 seconds) Migrating: 2017_03_29_000000_avored_framework_schema Migrated: 2017_03_29_000000_avored_framework_schema (13.96 seconds) ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ php artisan avored:install Nothing to migrate. AvoRed Install Successfully! ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$
I know why frontend error is happening because you have no products available. In my local I always install demo data so I never have that bug. I will fix that bug.
But I am not sure why your admin auth
Illegal Offset type
error is coming up?
Run this command to fixed the issue.
php artisan avored:admin:make
issue gave me this error .. I noticed in teh DB it had no tables when i started .. so this error is weird
ubuntu@ip-172-31-1-145:/var/www/html/store/laravel-ecommerce$ sudo php artisan avored:install Migration table created successfully. Migrating: 2017_03_29_000000_avored_framework_schema Migrated: 2017_03_29_000000_avored_framework_schema (13.97 seconds)
Illuminate\Database\QueryException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'inventory.users' doesn't exist (SQL: alter table
users
adduser_group_id
bigint unsigned null)at /var/www/html/store/laravel-ecommerce/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) {
Exception trace:
1 PDOException::("SQLSTATE[42S02]: Base table or view not found: 1146 Table 'inventory.users' doesn't exist") /var/www/html/store/laravel-ecommerce/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
2 PDOStatement::execute() /var/www/html/store/laravel-ecommerce/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
Please use the argument -v to see more details.