This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly. Let me know what you think about this article through comments below, or on Twitter at you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles. If you want to install and configure any other PHP versions you can redo all the steps the same way. Now we can go back to the index.php file and use again phpinfo()to see what PHP version the project is using now. In the same file ( nf) add the following piece of code:ĭon’t forget to update the path and the PHP version to fit your needs.īefore we try out the new version, we have to restart Apache for the changes to take effect. Now we have to tell Apache that for a certain project we want to use a specific PHP version. Configure your app to use a certain PHP version If you’ve been following the same naming convention as I recommended earlier, then replace php817with your folder’s name. This basically tells Apache where to find our specific new PHP version. Preferably at the end of the file, add the following chunk of code: Usually, you would want to have cURL, FTP, fileinfo, MySQL, MySQLi, openssl, and pdo_sqlite enabled.īut of course, it depends very much on the project and yours may have different extension dependencies.Ī quick note about these extensions is that if you’re trying to set up PHP apache > conf > extra > nf file. Next up, search for extension=curland from here you can remove the semicolon for any extensions you’d like. This is the directory in which the PHP extensions such as cURL, FTP, and MySQL are located. Open the php.ini file and remove the semicolon from the extension_dir = "ext" setting. In the same folder, locate the php.ini-development file. Open the archive you’ve just downloaded and extract everything in this folder. I strongly advise you also use the same folder naming approach to make it easier for you later. I will name it php817 because it will contain PHP 8.1.7 version. Once the download finishes, go to XAMPP folder and create a new PHP folder. If you download the wrong version, you may end up having problems with PHP and extensions. If you have Thread Safety enabled, then you should download the PHP version that does not contain NTS in its name.Īnd the opposite, if you have Non-Thread Safety enabled, you should download the version that contains NTS in its name. Now search for Thread Safety and notice if you have it enabled or not. If you already have a working PHP file or a project, you can go to that script file or inside your public/index.php and use the phpinfo() function. Most computers nowadays have a 64-bit operating system and based processor.īut if you are unsure about it, you can check out the About your PC section in Windows.Ĭoming back to Non-Thread Safe and Thread Safe versions.īefore downloading any versions, I would advise you to check if you have Thread Safety enabled in your current PHP installation. The NTS and TS version which stands for Non-Thread Safe and Thread Safe.There are a couple of things you have to be aware of here: Whenever I want to download a PHP version I choose .Īt the time of writing, the latest PHP version is 8.1.7. Let’s start by downloading a new PHP version. 5 Configure your app to use a certain PHP versionįor this tutorial, I’m going to use XAMPP 3.2.4 which is an older version that comes with PHP 7.4.4.Īdditionally, I would assume you already have a working version of PHP and some script files or a project you can use throughout the tutorial.
0 Comments
Leave a Reply. |