trang mạng:PHP: Hypertext Prexử lýNội dung
PHP:HypertextPreprocessorDownloadsDocumentationGetInvolvedHelpGettingStarted Introduction AsimpletutorialLangueReference Basicsyntax Types Variables Constants Expressions Operators ControlStructures PHP: Hypertext Prexử lýFunctions ClassesandObjects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes ReferencesExplained PredefinedVariables PredefinedExceptions PredefinedInterfacesandClasses PredefinedAttributes Contextoptionsandparameters SupportedProtocolsandWrappersSecurity Introduction Generalconsiderations InstalledasCGIbinary InstalledasanApachemodule SessionSecurity FilesystemSecurity DatabaseSecurity ErrorReporting UserSubmittedData HidingPHP KeepingCurrentFeatures HTTPauthenticationwithPHP Cookies Sessions Handlingfileuploads Usingremotefiles Connectionhandling PersistentDatabaseConnections Commandlineuse GarbeCollection DTraceDynamicTracingFunctionReference AffectingPHP'sBehiour AudioFormatsManipulation AuthenticationServices CommandLineSpecificExtensions CompressionandArchiveExtensions CryptographyExtensions DatabaseExtensions DateandTimeRelatedExtensions FileSystemRelatedExtensions HumanLangueandCharacterEncodingSupport ImeProcessingandGeneration MailRelatedExtensions MathematicalExtensions Non-TextMIMEOutput ProcessControlExtensions OtherBasicExtensions OtherServices SearchEngineExtensions ServerSpecificExtensions SessionExtensions TextProcessing VariableandTypeRelatedExtensions WebServices WindowsOnlyExtensions XMLManipulation GUIExtensionsKeyboardShortcuts?PHP: Hypertext Prexử lýThishelpjNextmenuitemkPreviousmenuitemgpPreviousmanpegnNextmanpeGScrolltobottomggScrolltotopghGotohomepegsGotosearch(currentpe)/FocussearchboxApopulargeneral-purposescriptinglanguethatisespeciallysuitedtowebdevelopment.Fast,flexibleandprmatic,PHPpowerseverythingfromyourblogtothemostpopularwebsitesintheworld.What'snewin8.3Download8.3.12·Changelog·Upgrading8.2.24·Changelog·Upgrading8.1.30·Changelog·Upgrading10Oct2024PHP8.4.0RC2ailablefortestingThePHPteamispleasedtoannouncethereleaseofPHP8.4.0,RC2.Thisisthefirstreleasecandidate,continuingthePHP8.4releasecycle,theroughoutlineofwhichisspecifiedinthePHPWiki.ForsourcedownloadsofPHP8.4.0,RC2pleasevisitthedownloadpe.Pleasecarefullytestthisversionandreportanyissuesfoundinthebugreportingsystem.PleaseDONOTusethisversioninproduction,itisanearlytestversion.Formoreinformationonthenewfeaturesandotherchanges,youcanreadtheNEWSfileortheUPGRADINGfileforacompletelistofupgradingnotes.Thesefilescanalsobefoundinthereleasearchive.ThenextreleasewillbeRC3,plannedfor24October2024.ThesignaturesforthereleasecanbefoundinthemanifestorontheQAsite.ThankyouforhelpingusmakePHPbetter.26Sep2024PHP8.1.30Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.1.30.Thisisasecurityrelease.AllPHP8.1usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.1.30pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.26Sep2024PHP8.4.0RC1nowailablefortestingThePHPteamispleasedtoannouncethereleaseofPHP8.4.0,RC1.Thisisthefirstreleasecandidate,continuingthePHP8.4releasecycle,theroughoutlineofwhichisspecifiedinthePHPWiki.ForsourcedownloadsofPHP8.4.0,RC1pleasevisitthedownloadpe.Pleasecarefullytestthisversionandreportanyissuesfoundinthebugreportingsystem.PleaseDONOTusethisversioninproduction,itisanearlytestversion.Formoreinformationonthenewfeaturesandotherchanges,youcanreadtheNEWSfileortheUPGRADINGfileforacompletelistofupgradingnotes.Thesefilescanalsobefoundinthereleasearchive.ThenextreleasewillbeRC2,plannedfor10October2024.ThesignaturesforthereleasecanbefoundinthemanifestorontheQAsite.ThankyouforhelpingusmakePHPbetter.26Sep2024PHP8.2.24Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.2.24.Thisisasecurityrelease.AllPHP8.2usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.2.24pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.26Sep2024PHP8.3.12Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.3.12.Thisisasecurityrelease.AllPHP8.3usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.3.12pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.12Sep2024PHP8.4.0Beta5ailablefortestingThePHPteamispleasedtoannouncethereleaseofPHP8.4.0,Beta5.Thisisthethirdbetarelease,continuingthePHP8.4releasecycle,theroughoutlineofwhichisspecifiedinthePHPWiki.ForsourcedownloadsofPHP8.4.0,Beta5pleasevisitthedownloadpe.Pleasecarefullytestthisversionandreportanyissuesfoundinthebugreportingsystem.PleaseDONOTusethisversioninproduction,itisanearlytestversion.Formoreinformationonthenewfeaturesandotherchanges,youcanreadtheNEWSfileortheUPGRADINGfileforacompletelistofupgradingnotes.Thesefilescanalsobefoundinthereleasearchive.ThenextreleasewillbeRC1,plannedfor26September2024.ThesignaturesforthereleasecanbefoundinthemanifestorontheQAsite.ThankyouforhelpingusmakePHPbetter.29Aug2024PHP8.3.11Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.3.11.Thisisabugfixrelease.AllPHP8.3usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.3.11pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.29Aug2024PHP8.4.0Beta4nowailablefortestingThePHPteamispleasedtoannouncethereleaseofPHP8.4.0,Beta4.Thisisthesecondbetarelease,continuingthePHP8.4releasecycle,theroughoutlineofwhichisspecifiedinthePHPWiki.ForsourcedownloadsofPHP8.4.0,Beta4pleasevisitthedownloadpe.Pleasecarefullytestthisversionandreportanyissuesfoundinthebugreportingsystem.PleaseDONOTusethisversioninproduction,itisanearlytestversion.Formoreinformationonthenewfeaturesandotherchanges,youcanreadtheNEWSfileortheUPGRADINGfileforacompletelistofupgradingnotes.Thesefilescanalsobefoundinthereleasearchive.ThenextreleasewillbeBeta5,plannedfor12September2024.ThesignaturesforthereleasecanbefoundinthemanifestorontheQAsite.ThankyouforhelpingusmakePHPbetter.29Aug2024PHP8.2.23Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.2.23.Thisisabugfixrelease.AllPHP8.2usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.2.23pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.15Aug2024PHP8.4.0Beta3nowailablefortestingThePHPteamispleasedtoannouncethereleaseofPHP8.4.0,Beta3.Thisisthefirstbetarelease,continuingthePHP8.4releasecycle,theroughoutlineofwhichisspecifiedinthePHPWiki.ForsourcedownloadsofPHP8.4.0,Beta3pleasevisitthedownloadpe.Pleasecarefullytestthisversionandreportanyissuesfoundinthebugreportingsystem.PleaseDONOTusethisversioninproduction,itisanearlytestversion.Formoreinformationonthenewfeaturesandotherchanges,youcanreadtheNEWSfileortheUPGRADINGfileforacompletelistofupgradingnotes.Thesefilescanalsobefoundinthereleasearchive.ThenextreleasewillbeBeta4,plannedfor29August2024.ThesignaturesforthereleasecanbefoundinthemanifestorontheQAsite.ThankyouforhelpingusmakePHPbetter.01Aug2024PHP8.4.0Alpha4ailablefortestingThePHPteamispleasedtoannouncethesecondtestingreleaseofPHP8.4.0,Alpha4.ThiscontinuesthePHP8.4releasecycle,theroughoutlineofwhichisspecifiedinthePHPWiki.ForsourcedownloadsofPHP8.4.0Alpha4pleasevisitthedownloadpe.Pleasecarefullytestthisversionandreportanyissuesfoundinthebugreportingsystem.PleaseDONOTusethisversioninproduction,itisanearlytestversion.Formoreinformationonthenewfeaturesandotherchanges,youcanreadtheNEWSfile,ortheUPGRADINGfileforacompletelistofupgradingnotes.Thesefilescanalsobefoundinthereleasearchive.ThenextreleasewillbeBeta1,plannedfor15Aug2024.ThesignaturesforthereleasecanbefoundinthemanifestorontheQAsite.ThankyouforhelpingusmakePHPbetter.01Aug2024PHP8.2.22Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.2.22.Thisisabugfixrelease.AllPHP8.2usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.2.22pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.01Aug2024PHP8.3.10Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.3.10.Thisisabugfixrelease.AllPHP8.3usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.3.10pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.18Jul2024PHP8.4.0Alpha2ailablefortestingThePHPteamispleasedtoannouncethesecondtestingreleaseofPHP8.4.0,Alpha2.ThiscontinuesthePHP8.4releasecycle,theroughoutlineofwhichisspecifiedinthePHPWiki.ForsourcedownloadsofPHP8.4.0Alpha2pleasevisitthedownloadpe.Pleasecarefullytestthisversionandreportanyissuesfoundinthebugreportingsystem.PleaseDONOTusethisversioninproduction,itisanearlytestversion.Formoreinformationonthenewfeaturesandotherchanges,youcanreadtheNEWSfile,ortheUPGRADINGfileforacompletelistofupgradingnotes.Thesefilescanalsobefoundinthereleasearchive.ThenextreleasewillbeAlpha3,plannedfor1Aug2024.ThesignaturesforthereleasecanbefoundinthemanifestorontheQAsite.ThankyouforhelpingusmakePHPbetter.05Jul2024PHP8.4.0Alpha1ailablefortestingThePHPteamispleasedtoannouncethefirsttestingreleaseofPHP8.4.0,Alpha1.ThisstartsthePHP8.4releasecycle,theroughoutlineofwhichisspecifiedinthePHPWiki.ForsourcedownloadsofPHP8.4.0Alpha1pleasevisitthedownloadpe.Pleasecarefullytestthisversionandreportanyissuesfoundusingthebugtrackingsystem.PleaseDONOTusethisversioninproduction,itisanearlytestversion.Formoreinformationonthenewfeaturesandotherchanges,youcanreadtheNEWSfile,ortheUPGRADINGfileforacompletelistofupgradingnotes.Thesefilescanalsobefoundinthereleasearchive.ThenextreleasewillbeAlpha2,plannedfor18Jul2024.ThesignaturesforthereleasecanbefoundinthemanifestorontheQAsite.ThankyouforhelpingusmakePHPbetter.04Jul2024PHP8.3.9Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.3.9.Thisisabugfixrelease.AllPHP8.3usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.3.9pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.04Jul2024PHP8.2.21Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.2.21.Thisisabugfixrelease.AllPHP8.2usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.2.21pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.06Jun2024PHP8.2.20Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.2.20.Thisisasecurityrelease.AllPHP8.2usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.2.20pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.06Jun2024PHP8.3.8Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.3.8.Thisisasecurityrelease.AllPHP8.3usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.3.8pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.06Jun2024PHP8.1.29Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.1.29.Thisisasecurityrelease.AllPHP8.1usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.1.29pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.09May2024PHP8.3.7Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.3.7.ThisisabPHP: Hypertext Prexử lýugfixrelease.AllPHP8.3usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.3.7pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.09May2024PHP8.2.19Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.2.19.Thisisabugfixrelease.AllPHP8.2usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.2.19pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.24Apr2024Statementonglibc/iconvVulnerabilityEDIT2024-04-25:ClarifiedwhenaPHPapplicationisvulnerabletothisbug. Recently,abuginglibcversion2.39andolder(CVE-2024-2961)wasuncovered whereabufferoverflowincharactersetconversionsto theISO-2022-CN-EXTcharactersetcanresultinremotecodeexecution. ThisspecificbufferoverflowinglibcisexploitablethroughPHP,whichexposestheiconvfunctionalityofglibctodocharactersetconversionsviatheiconvextension.AlthoughthebugisexploitableinthecontextofthePHPEngine,thebugisnotinPHP.Itisalsonotdirectlyexploitableremotely.Thebugisexploitable,ifandonlyif,thePHPapplicationcallsiconvfunctionsorfilterswithuser-suppliedcharactersets.Applicationsarenotvulnerableif:Glibcsecurityupdatesfromthedistributionhebeeninstalled.Ortheiconvextensionisnotloaded.Orthevulnerablecharactersethasbeenremovedfromgconv-modules-extra.conf.Ortheapplicationpassesonlyspecificallyallowedcharactersetstoiconv.Moreover,whenusingauser-suppliedcharacterset,itisgoodpracticeforapplicationstoacceptonlyspecificcharsetsthathebeenexplicitlyallowedbytheapplication.Oneexampleofhowthiscanbedoneisbyusinganallow-listandthearray_search()functiontochecktheencodingbeforepassingittoiconv.Forexample:array_search($charset,$allowed_list,true) Therearenumerousreportsonlinewithtitleslike"Mitigatingthe iconvVulnerabilityforPHP(CVE-2024-2961)"or"PHPUnderAttack".These titlesaremisleadingasthisisnotabuginPHPitself. IfyourPHPapplicationisvulnerable,wefirstrecommendtocheckifyourLinuxdistributionhasalreadypublishedpatchedvariantsofglibc.Debian,CentOS,andothers,healreadydoneso,andpleaseupgradeassoonaspossible.Onceanupdateisailableinglibc,updatingthatpackeonyourLinuxmachinewillbeenoughtoalleviatetheissue.YoudonotneedtoupdatePHP,asglibcisadynamicallylinkedlibrary.IfyourLinuxdistributionhasnotpublishedapatchedversionofglibc,thereisnofixforthisissue.However,thereexistsaworkarounddescribedinGLIBC VulnerabilityonServersServingPHPwhichexplainsawayonhowtoremove theproblematiccharactersetfromglibc.Performthisprocedureforevery gconv-modules-extra.conffilethatisailableonyoursystem. PHPusersonWindowsarenotaffected. Therefore,anewversionofPHPwillnotbereleasedforthisvulnerability.12Apr2024PHP8.1.28Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.1.28.Thisisasecurityrelease.AllPHP8.1usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.1.28pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.11Apr2024PHP8.3.6Released!ThePHPdevelopmentteamannouncestheimmediateailabilityofPHP8.3.6.Thisisasecurityrelease.AllPHP8.3usersareencouredtoupgradetothisversion.ForsourcedownloadsofPHP8.3.6pleasevisitourdownloadspe,Windowssourceandbinariescanbefoundonwindows.php.net/download/.ThelistofchangesisrecordedintheChangeLog.OlderNewsEntriesThePHPFoundationThePHPFoundationisacollectiveofpeopleandorganizations,unitedinthemissiontoensurethelong-termprosperityofthePHPlangue.DonateConferencescallingforpapersDutchPHPConference2025UpcomingconferencesPHPRussia2024CascadiaPHP2024InternationalPHPConferenceMunich2024ForumPHP2024-Paris(France)UserGroupEventsSpecialThanksSocialmedia@official_php@php@fosstodon.org©2001-2024ThePHPGroupMyPHP.netContactOtherPHP.netsitesPrivacypolicyViewSource