Windows 용 XAMPP에서 PHP를 업그레이드 하시겠습니까?
Windows 용 Xampp에서 PHP를 업그레이드하는 방법을 알고 싶습니다. 기본 PHP 사이트에서 최신 PHP 버전을 다운로드하려고 시도했지만 (phpinfo)를 확인해도 여전히 이전 버전이 사용 중임을 알 수 있습니다.
htdocs 및 데이터 폴더 (MySQL 폴더의 하위 폴더)를 백업하고 업그레이드 된 버전을 다시 설치 한 다음 해당 폴더를 교체하십시오.
참고 : PHP (php.ini), Apache (httpd.conf) 또는 기타 구성 파일을 변경 한 경우 해당 파일을 백업하고 새로 설치된 버전으로 교체하십시오.
다음 링크를 통해 도움이 될 수 있습니다. http://hype-free.blogspot.com/2007/07/updating-php-in-xampp-for-windows.html
내 답변이 몇 명의 사용자에게 도움이되었다는 것을 알고 다음은 원래 링크에서 편집 한 것입니다.
편집하다:
우선 항상 데이터를 백업하십시오.
- 최신 바이너리 버전의 PHP를 다운로드하십시오 (설치 프로그램이 아닌 .zip 패키지를 확보하십시오)
- 디렉토리에 아카이브 해제
- XAMPP 설치 디렉토리의 php 하위 폴더에있는 디렉토리의 내용을 덮어 씁니다.
- apache \ bin 디렉토리의 내용을 최신 버전으로 덮어 씁니다.
- 이제 트릭 : 이름에 '_2'가있는 파일 (예 : php5apache2_2.dll 또는 php5apache2_2_filter.dll)을 가져 와서 apache \ bin 하위 디렉토리에 복사하고 '_2'부분을 제거하여 기존 파일을 덮어 씁니다. XAMPP가 Apache 버전 2.2를 사용하고 접두사가 2 인 파일은 Apache 2.0 용으로 빌드되었으므로 최신 버전 (다른 플러그인 인터페이스가 있음)에 대해 빌드 된 파일을 가져 와서 XAMPP가 기대하는 파일 이름으로 파일 이름을 변경해야하기 때문에이 작업이 필요합니다. .
참고 : XAMPP 설치 내부 에는 새 버전의 파일 ( php
하위 디렉토리 및 apache/bin
하위 디렉토리) 로 업데이트 할 두 개의 디렉토리가 있습니다 .
가장 간단한 방법은 업그레이드 PHP
의 XAMPP
:
- 최신 휴대용 버전을 다운로드하십시오
XAMPP
. - 아카이브를 추출하십시오 (
XAMPP
이미 설치된 위치는 아님 ). PHP
추출 된 아카이브에서 폴더를 복사하십시오 .PHP
설치된XAMPP
디렉토리 에있는 폴더를 백업하십시오 . 당신은 할 수의 변화 등을 백업PHP
에 폴더 이름을PHP-old
나처럼PHP-version-number
PHP
추출 된 아카이브에서 복사 한 폴더를 붙여 넣습니다 .- 바꾸기
php.ini
백업 폴더와 파일php.ini
기본 설정 이전 변경 한 경우 파일을. - 그게 다야, 시작 / 다시 시작하십시오
server
.
내 PHP를 5.3.8에서 5.3.29 로 업데이트 해야했습니다 . Windows의 (스레드 세이프 모두)
내가 한 단계 :
- xampp 아래에 내 초기 PHP 폴더를 백업하십시오.
- 여기에서 zip을 다운로드하십시오 http://windows.php.net/download/#php-5.3-ts-VC9-x86
- xzipp 폴더에 압축을 풉니 다.
- 오래된 PHP 폴더에서 php.ini 파일을 새로운 폴더로 복사했습니다.
- 이전 폴더에서 새 PHP 폴더에 없었던 두 개의 폴더를 복사했습니다. 예를 들어 : browscap.ini 파일이 포함 된 extras (필요한 파일)
- 이전 PHP ext 폴더에서 새로운 PHP ext 폴더 로 필요한 확장자를 복사했습니다 . php.ini 파일에서 확장자 목록을 확인하여 수동으로 복사했습니다.
- 이 파일들도 복사했습니다 : php5apache2_2.dll, php5ts.dll
내가 모든 것을 덮었기를 바랍니다.
5.3.x에서 5.4.x로 PHP의 주요 버전을 변경하면 이러한 단계가 작동하지 않지만 부 버전의 경우 작동합니다.
또한 잘못된 점을 확인하는 좋은 방법은 ... 명령 줄을 시작하고 xampp / apache / bin에서 httpd.exe를 시작하려고하면 오류가 발견됩니다.
실제로 원하는 PHP 버전으로 XAMPP를 다운로드하여 설치해야한다고 생각합니다. XAMPP 자체에 제공되는 기능이 없다면 XAMPP의 구성 요소를 개별적으로 업그레이드 할 수 있다고 생각하지 않습니다.
http://windows.php.net/download/ 웹 사이트 에서 원하는 PHP 바이너리 버전을 다운로드하십시오 . Thread Safe 바이너리 zip 버전을 다운로드하십시오. 다운로드 한 PHP 버전을 별도의 폴더에 압축 해제하십시오. 새 PHP 폴더 이름이 "PHP"가 아닌지 확인하십시오. 필터 이름을 버전 이름으로 사용할 수 있습니다. 예를 들어 php 5.4의 경우 php54를 사용할 수 있습니다.
새 PHP 폴더를 xampp 폴더에 복사하십시오. 이제 yourxampp / apache / conf / extra 폴더로 이동하십시오. extra 폴더에서 httpd-xampp.conf 파일을여십시오. 다음 변수를 변경하십시오.
변수 PHPINIDir은 / Varaible LoadModule은 //php5apache2_2.dl
httpd-xampp.conf 파일을 저장하십시오. XAMPP 아파치 서버를 다시 시작하십시오. 서버가 성공적으로 다시 시작되면 서버 PHP 버전이 업그레이드됩니다.
php5.6 에서 php7.2로 업그레이드했습니다.
내가 따르는 단계.
- 여기 에서 PHP 바이너리를 다운로드 하십시오 . VC15 x86 Thread Safe Zip 파일 을 다운로드 했습니다 .
- xampp / php 폴더 의 백업을 생성했습니다 .
- zip 파일의 모든 내용을 xampp / php 폴더로 추출하십시오.
- Copied php.ini (as I have modified it before and I want my configuration back, if you were using default one then skip this step.)
- Edit below file
C:\xampp\apache\conf\extra\http-xampp.conf
- Replace
LoadFile "C:/xampp/php/php5ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"
to
LoadFile "C:/xampp/php/php7ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"
Replace php5_module to php7_module everywhere in this file.
Restart Apache
I don't have enough reputation to comment yet, but, to add to ssharma's answer:
After you copy your htdocs folder to a safe place, just export your databases from PHPmyadmin. Simply go to each of your databases and click on the export tab at the top. Export them as sql (or whatever, really - just remember what you chose). Upgrade your XAMPP installation. Now, in the new version of XAMPP, create the databases that you want to re-insert. Example: you have a database named 'test' that you exported from your old installation, name the new, empty database the same thing. Now, go into 'test' and hit the import button along the top (right next to the export button). Click on choose file, find the sql file that you exported earlier (should be 'test.sql') and import. Your tables and data will be in place.
NOTE: There's an option to export the entire collection of databases (it names the file 127.0.0.1.sql). But, I've never had much luck getting it to import correctly. Do each of your databases separately to ensure it works. I made this post kind of long-winded, but that's because I like to write for the people that don't know exactly what they're doing yet (I, myself, was there not too long ago (all of us were at some point)).
Shorthand version of my answer:
1) Export your databases individually
2) Import into your new installation of XAMPP
There are newer beta versions of Xampp that come with newer PHP upgrades.
you should check at http://www.apachefriends.org
- Go to
phpinfo()
, press ctrl+f, and typethread
to check the value. - If it is enabled download the non thread safe version, otherwise download the thread safe version from here (zip).
- Extract it, and rename the folder to
php
. - Go to your xampp folder rename the default
php
folder to something else. - Copy the extracted (renamed
php
) folder in xampp directory. - Copy the
php.ini
file from default/oldphp
folder (That you renamed) and paste it into the newphp
folder. - Restart xampp server and you're good to go.
To update with latest PHP version in xampp without losing your htdocs data you need to download the zip file of your desired version of PHP from sourceforge.net, then copy the PHP folder from the extracted file and paste it into your xampp folder.
NOTE: Don't forget to rename the old PHP file folder which already exists.
Then simply edit your php.ini file with the current path to reach the right PHP folder
After that, you need to re-run your xampp.
I found a video on youtube which can help you. how to update php version in xampp
http://www.apachefriends.org/en/xampp-windows.html
In this site you can get
XAMPP Add-Ons
by using this add on you can upgrade the latest versions.
1) Backup your htdocs folder
2) export your databases (follow this tutorial)
3) uninstall xampp
4) install the new version of xampp
5) replace the htdocs folder that you have backed up
6) Import your databases you had exported before
Note: In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.
I just upgrade my old XAMPP portable with PHP 5.3.X(Include Mercury & FileZilla & Tomcat) to XAMPP portable with PHP 5.6.X ( Include previous versions ) ...
My way:
- First download last xampp portable(my using version: xampp-portable-win32-5.6.14-3-VC11Direct Download Link) Last XAMPP
- Extract new download file to drive d , because new version dont have mercury,filezilla,tomcat in it , then i copy these packages from my old version to new one
- Now on old xampp first copy all htdocs files to new xampp htdocs
- Now on old xampp backup all of database in 5 two 10 separated sql files
- Now on new xampp going and change some settings like
max_upload_size
and etc on php.ini and also in/apache/conf/extra/httpd-xampp.conf
- Now delete ( make a rar archive and delete ) it , and copy new xampp from drive
D
to driveC
- Now start new xampp , going to phpmyadmin , create a user and password that i use in previous xampp and add all privileges that user.
- Now going to import tab on phpmyadmin and separately import sql files.
- Now i test xampp with all new features in drive C
NOTE
On Export database tab on phpmyadmin, select UTF-8 Character and check Disable foreign key checks
checkbox
and on import tab uncheck Enable foreign key checks
.
1) Download new PHP from the official site (better some zip). Old php
directory rename to php_old
and create again php
directory and put there unzipped files.
In php.ini
connect needed modules if you used something that was turned off by default (like Memcached etc.), but doesn't forget to add corresponding .dll
files.
2) In my case, I had to update Apache. So repeat the same steps: download the new package, rename directories, create new apache
directory and put their new files.
Now you can try to restart apache running apache_start.bat
from xampp
folder (better run this bat, than restart apache service from Windows services window, cause in this case in console you'll see all errors if there will be some, including lines in config where you'll have problem). If you updated Apache and run this file, in the list of services you'll see Apache2.2, but in description you can get another version (in my case that was Apache/2.4.7).
In case of Apache update you can get some problems, so mind:
after you replace the whole directory, you may need to configure you
apache/conf/httpd.conf
file (copy virtual hosts from old config, set up DocumentRoots, permissions for directories, all paths, extend the list of index files (by default apache has onlyindex.html
so other index files will be just ignored and Apache will just list the site root directory in browser), configure you logs etc.)connect modules you need (if you used something that was not turned on by default like mod_rewrite etc.)
For Upgradation php in Xampp you can follow this steps, Else you can skip these 4 steps and direct install MAMP (for windows as well) from site and here is the direct download link
Step 1: Make backups Before starting, make sure to backup any settings, custom modules and most importantly the htdocs directory, which contains your scripts and page resources. This directory is normally located atC:\xampp\htdocs\
Step 2: Preparation
Download PHP 5.3.0rc2. I use the VC6 build in order to minimise any potential compatibility issues. It is also recommended that you download the latest Windows version of XAMPP. While this is an upgrade guide that shouldwork with previous versions of XAMPP, it is recommended that a fresh copy of the core files is used. Stop any instances of the Apache service that might be running.
Step 3: The upgrade This guide will assume your XAMPP directory is C:\xampp\
Extract the XAMPP archive to a directory of your choosing, I would recommend using the default C:\xampp\ Extract the contents of the PHP archive to C:\xampp\php\, overwriting the contents of this directory with the new files. Open the file C:\xampp\apache\conf\extra\httpd-xampp.conf and ensure the following lines are present in this order:
LoadFile "/xampp/php/php5ts.dll"
LoadModule php5_module "/xampp/apache/bin/php5apache2_2.dll"
Replace C:\xampp\php\php.ini with C:\xampp\php\php.ini-dist
Uncomment the lines:
;extension=php_mbstring.dll
;extension=php_pdo_sqlite.dll
Replace the line
magic_quotes_gpc = On
with
magic_quotes_gpc = Off
Copy all files in the C:\xampp\php\ to C:\xampp\apache\bin\ (do not copy the subdirectories or their contents).
After following the above steps, restart your Apache service (this can be done using C:\xampp\xampp-control.exe or manually through the control panel/command prompt). Your PHPinfo should indicate that the upgrade has been successful. I will update this post if I discover any problems from using this method, or a cleaner (automated) means of performing the upgrade.
참고URL : https://stackoverflow.com/questions/2154762/upgrading-php-in-xampp-for-windows
'Programming' 카테고리의 다른 글
contenteditable element (div)에서 캐럿 (커서) 위치를 설정하는 방법은 무엇입니까? (0) | 2020.05.29 |
---|---|
거대한 데이터 세트 (angular.js)에서 ngRepeat의 성능을 향상시키는 방법은 무엇입니까? (0) | 2020.05.29 |
기호 배열에 대한 문자 표기법이 있습니까? (0) | 2020.05.29 |
파일 연결 해제 실패 (0) | 2020.05.29 |
MySQL / SQL : 날짜 / 시간 열에서만 날짜별로 그룹화 (0) | 2020.05.29 |