简体   繁体   中英

PHPStorm laravel issues

I was having a bit of trouble getting PHPStorm to work with laravel/composer.

Upon opening PHPStorm, I created a new Composer Project: http://puu.sh/e4y1H/6fb97cf976.png

After which, I filled in necessary the details: http://puu.sh/e4y6Z/55bc60e7fc.png

After continuing, I run into the following error:

php /Users/mdobrenko/Sites/test/composer.phar create-project laravel/laravel 
/Users/mdobrenko/Sites/test/composer -n --no-progress
Installing laravel/laravel (v4.2.11)
  - Installing laravel/laravel (v4.2.11)
    Loading from cache

Created project in /Users/mdobrenko/Sites/test/composer
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing symfony/translation (v2.5.8)
    Loading from cache

  - Installing symfony/security-core (v2.5.8)
    Loading from cache

  - Installing symfony/routing (v2.5.8)
    Loading from cache

  - Installing symfony/process (v2.5.8)
    Loading from cache

  - Installing psr/log (1.0.0)
    Loading from cache

  - Installing symfony/debug (v2.5.8)
    Downloading: connection...    Downloading: 0%               Downloading: 10%    Downloading: 35%    Downloading: 45%    Downloading: 70%    Downloading: 80%    Downloading: 90%    Downloading: 100%

  - Installing symfony/http-foundation (v2.5.8)



  [ErrorException]                          
  touch(): Utime failed: Permission denied  

create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [package] [directory] [version]

The 'Sites' directory that I store my development projects in, which is where this project lives, has the following permissions set:

drwxrwxrwx   11 mdobrenko  staff   374 Jan  4 13:40 Sites

I noticed that most of my php artisan commands require the use of 'sudo'. Creating a new laravel project via the command:

composer create-project laravel/laravel your-project-name --prefer-dist

I have a feeling permissions may be the issue, but I am unsure of how to fix this. Any help would be appreciated!

This link should help. Try clearing the composer cache, re-installing composer, Chown the Sites folder to the same user as the apache server uses

To clear the composer cache, open a terminal and cd into your project folder: sudo composer clear-cache (sudo may not be required here)

Changing permissions: chown -R $(whoami): . this sets the owner of all files and sudirectories to the current user. giving you permission to access the files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM