본문 바로가기

카테고리 없음

라라벨 프레임워크 XShell XFtp

 

 

 

php zip 다운받고, 적당한 위치에 압축 해제 한 뒤 폴더 내의 php-developement.ini 를 php.ini 로 변경

 

php.ini 오픈 후 아래 항목들 좌측에 있는 ; 없애서 주석 해제

extension=curl
extension=fileinfo
extension=mbstring

extension=mysqli
extension=pdo_mysql

 

powershell로 php 버전 확인

 

환경 변수 시스템변수 path 더블클릭 후

새로 만들기로 php 폴더 경로 추가

 

Composer 설치 중 에러.

 

https://aka.ms/vs/16/release/VC_redist.x64.exe 설치

 

Back 누른 다음 다시 진행 하면 설치 완료

 

Composer 설치 확인

 

 

라라벨 인스톨러 설치

composer global require laravel/installer

 

라라벨 프로젝트 셋팅

라라벨 프로젝트 실행

visual code 에서 터미널 열고 

php artisan serve 입력

 

url 나오면 접속 테스트

 

 

구버전 php 받는 곳

https://windows.php.net/downloads/releases/archives/

 

위 경로에서 원하는 버전으로 검색 하고 윈도우64bit의 경우 nts, x64 가 포함 된 zip을 받으면 된다.

php-7.4.0-nts-Win32-vc15-x64.zip

 



 

 

-------------------------------------------------------------------------------------------------------------------------------------------------------

기존에 만들어진 프로젝트를 실행하기 위해서는 프로젝트와 같은 php 버전을 사용 해야 하고

composer.json 파일이 있는 경로로 가서 php artisan serve 를 입력 후 엔터 하면 실행이 된다.

 

보통은 실행이 바로 안된다.

 

 

In ClassLoader.php line 571:
                                                                                                                                                                              
  include(C:\Users\sanghyun\vendor\composer/../nunomaduro/collision/src/Adapters/Laravel/CollisionServiceProvider.   
  php): failed to open stream: No such file or directory     

 

위 에러가 발생하면

composer update 를 해 준다. 그러면 아래 에러가 발생한다.
                                                                                                                                                                              

 

In Factory.php line 650:
                                                                                                                                                                              
  The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk,   
   by setting the 'disable-tls' option to true.  

 

위 에러가 발생하면

 composer config -g -- disable-tls true 해준다

 

그런 후 다시 composer update 해 주면 아래 에러가 발생한다

You are running Composer with SSL/TLS protection disabled.
Composer is operating significantly slower than normal because you do not have the PHP curl extension enabled.
Loading composer repositories with package information

In ComposerRepository.php line 1150:

  You must enable the openssl extension in your php.ini to load information from https://repo.packagist.org  

 

 

위 에러가 발생하면 php 설치 폴더 가서 php.ini의 extension=openssl 좌측 ; 없애준다. 

그럼 아래 에러가 발생한다

 

You are running Composer with SSL/TLS protection disabled.
Loading composer repositories with package information
https://repo.packagist.org could not be fully loaded (curl error 60 while downloading https://repo.packagist.org/packages.json: SSL certificate problem: unable to get local issuer certificate), package information was loaded from the local cache and may be out of date

In CurlDownloader.php line 358:

  curl error 60 while downloading https://repo.packagist.org/p2/simplito/bi-php.json: SSL certificate problem: unable to get local issuer certificate  

 

 

위 에러가 발생하면 php 폴더 안에 아래 파일 다운 받아서 넣고,

php.ini 열어서  openssl.cafile="C:\php\ca-bundle.crt" 입력 해 준다.

 

 

ca-bundle.crt
0.22MB

 

그런 후 다시 composer update  입력 후 엔터 해 주면 아래 에러 발생한다.

 

You are running Composer with SSL/TLS protection disabled.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - iexbase/tron-api[v3.1.1, ..., v3.1.2] require simplito/elliptic-php ^1.0 -> satisfiable by simplito/elliptic-php[1.0.0, ..., 1.0.10].
    - simplito/elliptic-php[1.0.0, ..., 1.0.10] require ext-gmp * -> it is missing from your system. Install or enable PHP's gmp extension.
    - Root composer.json requires iexbase/tron-api ^3.1 -> satisfiable by iexbase/tron-api[v3.1.1, v3.1.2].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\php\php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-gmp` to temporarily ignore these required extensions.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

 

위 에러가 발생하면 php.ini 에서 아래 두개의 주석을 풀어준다. 

 

extension=gd2
extension=gmp

 

혼자 테스트 할 때는 extension=gmp만 먼저 풀고 해봤는데, 겁을주는 에러가 열개정도 나와서 눈물을 흘릴뻔했다. 정보가 적은 상태에서 다른 프로젝트를 실행하는건 너무 ㅜㅜ 슬퍼

 

여기까지 해 주면

No publishable resources for tag [laravel-assets].
Publishing complete.
No security vulnerability advisories found

 

complete를 볼 수 있다. 이제 composer update 하나 끝났다.

 

이제 다시 php artisan serve 입력 후 엔터

잘 된다.

 

 

DB 셋팅