FreeBSD: Upgrade PHP4 To PHP5

http‮‬s://www.lautturi.com
FreeBSD: Upgrade PHP4 To PHP5

To upgrade from PHP4 to PHP5 on a FreeBSD system, you can use the pkg command to install the PHP5 package.

Here is the general process for upgrading to PHP5 on FreeBSD:

  1. Install the PHP5 package: First, you need to install the PHP5 package using the pkg command. You can do this by running the following command:
pkg install php56

This will install PHP5 and all its dependencies.

  1. Configure PHP5: After PHP5 has been installed, you need to configure it. You can do this by editing the /usr/local/etc/php.ini file and adjusting the settings as needed.

  2. Restart the web server: After configuring PHP5, you need to restart the web server to apply the changes. If you are using Apache, you can do this by running the following command:

service apache24 restart

If you are using a different web server, you will need to use the appropriate command to restart it.

  1. Test PHP5: After the web server has been restarted, you can test PHP5 by creating a test PHP script and accessing it in a web browser. For example, create a file named test.php with the following content:
<?php
phpinfo();
?>

Then, access the file in a web browser by going to http://localhost/test.php. This should display information about the PHP configuration.

Created Time:2017-10-28 20:40:39  Author:lautturi