Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Error in phase migration and seed

    Installing Bagisto
    4
    18
    5024
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aulia last edited by

      Hi I got these errors on migration and seed while doing GUI installation

      • Server: LEMP Ubuntu 18.04 on vultr.com
      • Nginx: 1.14.2
      • PHP: 7.2.15
      • Node: 10.16.0
      • MySQL: 5.7.25
      
      , UnexpectedValueException : The stream or file "/home/bagisto/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied,, at /home/bagisto/www/html/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(), /home/bagisto/www/html/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:39,, 2 Monolog\Handler\AbstractProcessingHandler::handle(), /home/bagisto/www/html/vendor/monolog/monolog/src/Monolog/Logger.php:344,, Please use the argument -v to see more details.
      **************************************,* Application In Production! *,**************************************,,Command Cancelled!
      Copied Directory [/vendor/laravel/framework/src/Illuminate/Notifications/resources/views] To [/resources/views/vendor/notifications],Copied Directory [/vendor/laravel/framework/src/Illuminate/Pagination/resources/views] To [/resources/views/vendor/pagination],, UnexpectedValueException : The stream or file "/home/bagisto/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied,, at /home/bagisto/www/html/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(), /home/bagisto/www/html/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:39,, 2 Monolog\Handler\AbstractProcessingHandler::handle(), /home/bagisto/www/html/vendor/monolog/monolog/src/Monolog/Logger.php:344,, Please use the argument -v to see more details.
      
      
      1 Reply Last reply Reply Quote 0
      • P
        prateek-webkul last edited by

        Hello Aulia,

        It seems like you don't have storage directory permission. So, goto public folder of the project, run 'sudo chmod -R 755 *' command in terminal

        1 Reply Last reply Reply Quote 0
        • A
          aulia last edited by

          Hi,
          I did chmod on public but the error is still there. With what user the installer is connecting?

          1 Reply Last reply Reply Quote 0
          • P
            prateek-webkul last edited by

            Run the ' sudo chmod -R 755 storage/* ' command from your project root

            1 Reply Last reply Reply Quote 0
            • A
              aulia last edited by

              The error is stil there...

              1 Reply Last reply Reply Quote 0
              • P
                prateek-webkul last edited by

                Try running the ' sudo chmod -R 755 public/* ' command from your project root

                1 Reply Last reply Reply Quote 0
                • A
                  aulia last edited by

                  Done that, the error is still there
                  How to test if above command is executed perfectly?
                  I saw the properties of the folders you mentioned are 775 via SFTP

                  1 Reply Last reply Reply Quote 0
                  • P
                    prateek-webkul last edited by

                    Try this command from your project root

                    sudo chown www-data:www-data storage

                    Also, please consult the link , if you face any further issue

                    https://stackoverflow.com/questions/30362459/laravel-5-permission-denied-when-writing-in-log-file

                    If after following the above steps, the error remains same then raise a ticket on support@bagisto.com

                    1 Reply Last reply Reply Quote 0
                    • A
                      aulia last edited by aulia

                      this line is not working

                      I tested the 3rd answer in the link and it works, and gave different error

                      
                      , Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = forge and table_name = migrations),, at /home/bagisto/bagisto-0.1.5/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) {, > 664| throw new QueryException(, 665| $query, $this->prepareBindings($bindings), $e, 666| );, 667| }, 668|,, Exception trace:,, 1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)"), /home/bagisto/bagisto-0.1.5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31,, 2 PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)"), /home/bagisto/bagisto-0.1.5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27,, Please use the argument -v to see more details.
                      
                      

                      The lines I used was

                      sudo chgrp -R www-data storage bootstrap/cache
                      sudo chmod -R ug+rwx storage bootstrap/cache
                      

                      BTW I'm using LEMP ISO on Vultr

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        aulia @aulia last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • A
                          aulia last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • P
                            prateek-webkul last edited by

                            Follow the link and setup the database credentials for your project in .env file

                            https://github.com/bagisto/bagisto/edit/master/README.md

                            1 Reply Last reply Reply Quote 0
                            • A
                              aulia last edited by aulia

                              OK, I gave up using UI installer and use manual install instead.
                              The installation is successful, but when I go to the URL,

                              • I have to use http://URL/public/ to access, how can I change to http://URL instead?

                              • The website loads, but I cannot click anything in the demo

                              • I also cannot open admin login

                              1 Reply Last reply Reply Quote 0
                              • admin
                                admin last edited by

                                To open the admin panel, the directory will be http://localhost/(folder name)/bagisto/public/admin/login

                                The credentials will be : admin@example.com, admin123

                                1 Reply Last reply Reply Quote 0
                                • A
                                  aulia last edited by

                                  the website is http://45.77.240.39/public/

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    rahul last edited by

                                    Hello,

                                    You have missed your server configuration that's why any route is not working.
                                    If you are using apache2 serve then you can do following.

                                    Step-1
                                    Open our apache2.conf file ( etc->apache2)

                                    Step2
                                    There you can find some think like this-

                                    <Directory /home/users/www>
                                    Options Indexes FollowSymLinks
                                    AllowOverride none
                                    Require all granted
                                    </Directory>

                                    change it to
                                    <Directory /home/users/www>
                                    Options Indexes FollowSymLinks
                                    AllowOverride All
                                    Require all granted
                                    </Directory>

                                    Note - Directory structure will be different in your case & may be some value

                                    Step-3
                                    Run the below command -
                                    sudo a2enmod rewrite
                                    sudo /etc/init.d/apache2 restart
                                    or
                                    sudo service apache2 restart
                                    php artisan route:cache

                                    Thanks
                                    Rahul Shukla

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      aulia last edited by

                                      I'm using nginx BTW

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        rahul last edited by

                                        Please search for same.

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post