Git Product home page Git Product logo

laravel-tasks's Introduction

languages page_type description products
php
sample
This is a sample application that you can use to follow along with the Build a PHP and MySQL web app in Azure tutorial.
azure
azure-app-service

Laravel sample for Azure App Service

This is a sample application that you can use to follow along with the tutorial at Build a PHP and MySQL web app in Azure.

This sample application is taken from the official Laravel sample task list application and modified minimally to make it work with Azure App Service. For instructions on how to use Laravel, see the official repository.

License

See LICENSE.

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

laravel-tasks's People

Contributors

bristoljim avatar cephalin avatar microsoftopensource avatar msftgits avatar supernova-eng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-tasks's Issues

Running "C:\Program Files (x86)\nodejs\0.10.40\node.exe" "C:\Program Files (x86)\npm\1.4.28\node_modules\npm\bin\npm-cli.js" install --production npm ERR! Error: Method Not Allowed

This is when I try to deploy Laravel to a windows web app; I chooses win to change to root directory to ../public
I also followed Configure a PHP app for Azure App Service

...
Copying file: 'app\Http\Livewire\Rbac\Users.php'
Copying file: 'app\Http\Middleware\Authenticate.php'
Copying file: 'app\Http\Middleware\EncryptCookies.php'
Copying file: 'app\Http\Middleware\PreventRequestsDuringMaintenance.php'
Copying file: 'app\Http\Middleware\RedirectIfAuthenticated.php'
Omitting next output lines...
Looking for app.js/server.js under site root.
Missing server.js/app.js files, web.config is not generated
The package.json file does not specify node.js engine version constraints.
The node.js application will run with the default node.js version 0.10.40.
Selected npm version 1.4.28
Running "C:\Program Files (x86)\nodejs\0.10.40\node.exe" "C:\Program Files (x86)\npm\1.4.28\node_modules\npm\bin\npm-cli.js" install --production
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (C:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:260:10)
npm ERR! at C:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:203:12
An error has occurred during web site deployment.
npm ERR! at saved (C:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\npm-registry-client\lib\get.js:167:7)
npm failed
npm ERR! at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files (x86)\\nodejs\\0.10.40\\node.exe" "C:\\Program Files (x86)\\npm\\1.4.28\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
npm ERR! cwd C:\home\site\wwwroot
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code E405
Missing server.js/app.js files, web.config is not generated\r\nnpm ERR! Error: Method Not Allowed\r\nnpm ERR! at errorResponse (C:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:260:10)\r\nnpm ERR! at C:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:203:12\r\nnpm ERR! at saved (C:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\npm-registry-client\lib\get.js:167:7)\r\nnpm ERR! at Object.oncomplete (fs.js:108:15)\r\nnpm ERR! If you need help, you may report this *entire* log,\r\nnpm ERR! including the npm and node versions, at:\r\nnpm ERR! <http://github.com/npm/npm/issues>\r\n\r\nnpm ERR! System Windows_NT 6.2.9200\r\nnpm ERR! command "C:\\Program Files (x86)\\nodejs\\0.10.40\\node.exe" "C:\\Program Files (x86)\\npm\\1.4.28\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"\r\nnpm ERR! cwd C:\home\site\wwwroot\r\nnpm ERR! node -v v0.10.40\r\nnpm ERR! npm -v 1.4.28\r\nnpm ERR! code E405\r\nC:\Program Files (x86)\SiteExtensions\Kudu\92.30310.5111\bin\Scripts\starter.cmd bash deploy.sh

hope someone has a fix for this

Not Compatible with MySQL 8.0

See discussion here: laravel/framework#23948 . The provided workaround (adding "modes" array to MySQL config) seems to have fixed the problem.

When running this command you get the error below.

php artisan migrate

[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' (SQL: select * from information_schema.tables where table_schema
= sampledb and table_name = migrations)

[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'

MySQL version: mysql Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL)
PHP version: PHP 7.2.9 (cli) (built: Aug 15 2018 23:10:01) ( ZTS MSVC15 (Visual C++ 2017) x64 )

The azure command is specifying PHP 7.2 which is not supported by the project.

The laravel-tasks project is four years old. That project requires Laravel 5.4 and PHP 5.6. Both are old. The current mainstream PHP version is 7.4. Laravel is version 8.

The azure command is specifying PHP 7.2 which is not supported by the project.
You will need to download the project to your local system, patch and update, and then deploy with the patched version. The error that you have is caused by incompatibilities with composer. You will need to run composer update which will fail.

Unless you are experienced with Laravel and PHP, you have to pick a different project to learn from. or you will run into issues.

Root level .htaccess to redirect to public subdirectory does not work

The root level .htaccess file in this sample project does not work for me with a fresh Laravel 5.7 instillation on Azure Web App (Linux). Accessing the Laravel registration or login pages resulted in 404 on css and js resources. I found the below line needs to be modified:

RewriteRule ^.*$ /public/$1 [NC,L,QSA]

Replacing it with the following works:

RewriteRule ^(.*)$ /public/$1 [NC,L,QSA]

This fixes the problem, however I also noticed that directly accessing mydomain.com/public is still also possible. I'm not sure how to prevent accessing mydomain.com/public in the browser while also allowing mydomain.com to serve public subdirectory content. I suppose this isn't an emergency, but I'd rather not have both working. Ideas appreciated.

Error during deployment

I've been following along with the tutorial.

When first git pushing the repo to azure, I run into this problem:

...
remote: Copying file: 'config/mail.php'
remote: Omitting next output lines...
remote: Running composer install
remote: ...
remote: Loading composer repositories with package information
remote: Installing dependencies (including require-dev) from lock file
remote:
remote:
remote:   [ErrorException]
remote:   "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
remote:
remote:
remote: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
remote:
remote: An error has occurred during web site deployment.
remote: composer failed
remote: Deployment Logs : 'https://my.scm.azurewebsites.net/newui/jsonviewer?view_url=/api/deployments/somelonghash/log'
To https://my.scm.azurewebsites.net/my.git
 * [new branch]      HEAD -> master

By the way, the section Create a web app says

The runtime is set to PHP|7.0

and yet the Azure CLI command below it sets --runtime "PHP|7.3"

Project is not support PHP 8.2

Project is not support PHP 8.2
When running composer install will show following error, it seems some dependecy is only allow PHP under 8.0
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.