Using PHP
What is PHP?
PHP (Hypertext Preprocessor) is a widely-used open-source scripting language, especially suited for web development and can be embedded into HTML. The syntax of PHP draws upon C, Java, and Perl, making it easy to learn and use. The power of PHP lies in its seamless integration with various database systems and services.
ServBay's Support for PHP
ServBay provides support for multiple versions of PHP, ensuring you can choose the right version based on your project needs for development and deployment. Below are some common PHP versions supported by ServBay:
- PHP 5.6
- PHP 7.0
- PHP 7.1
- PHP 7.2
- PHP 7.3
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3
- PHP 8.4 (dev)
These versions cover both outdated versions that are not officially supported and the latest versions, ensuring you can choose the most suitable version for development.
TIP
ServBay comes with Composer pre-installed, so you do not need to install it separately.
Installation Method
You can easily install and manage PHP through ServBay's GUI panel. Here are the steps to install PHP via the ServBay GUI panel:
- Open the ServBay GUI panel.
- Navigate to the
Services
section. - Select the PHP version you need.
- Click the green
Install
button and wait for the installation to complete.
Included Modules
ServBay provides multiple modules for PHP to extend its functionality:
- GD: A library for image processing. Installed and enabled by default, no additional configuration is needed.
- IMAP: A library for handling emails. Installed and enabled by default, no additional configuration is needed.
- Imagick: PHP extension for ImageMagick. Installed and enabled by default, no additional configuration is needed.
- Memcache: A memory object caching system. Installed and enabled by default, no additional configuration is needed.
- Memcached: A high-performance distributed memory object caching system. Installed and enabled by default, no additional configuration is needed.
- MySQL: PHP extension for MySQL database. Installed and enabled by default, no additional configuration is needed.
- OpenLDAP: PHP extension for Lightweight Directory Access Protocol. Installed and enabled by default, no additional configuration is needed.
- PgSQL: PHP extension for PostgreSQL database. Installed and enabled by default, no additional configuration is needed.
- Redis: A high-performance key-value store system. Installed and enabled by default, no additional configuration is needed.
- SQLite 3: A lightweight SQL database engine. Installed and enabled by default, no additional configuration is needed.
- Sodium: A library for encryption operations. Installed and enabled by default, no additional configuration is needed.
- cURL: A library for data transfer. Installed and enabled by default, no additional configuration is needed.
- MongoDB: PHP extension for interacting with MongoDB database. For enabling, refer to How to Enable ServBay's MongoDB Module.
- OPcache: A caching module to accelerate PHP script execution. For enabling, refer to How to Enable ServBay's OPcache Module.
- Phalcon: A high-performance PHP framework extension. For enabling, refer to How to Enable ServBay's Phalcon Module.
- SCWS: PHP extension for Chinese word segmentation system. For enabling, refer to How to Enable ServBay's SCWS Module.
- Swoole: A high-performance PHP coroutine framework extension. For enabling, refer to How to Enable ServBay's Swoole Module.
- Xdebug: An extension for PHP debugging and profiling. For enabling, refer to How to Enable ServBay's Xdebug Module.
Detailed usage tutorials can be found at the following links:
- GD
- IMAP
- Imagick
- Memcache
- Memcached
- MySQL
- OpenLDAP
- PgSQL
- Redis
- SQLite 3
- Sodium
- cURL
- MongoDB
- OPcache
- Phalcon
- SCWS
- Swoole
- Xdebug
Usage Tutorials
ServBay provides comprehensive tutorials for using various PHP frameworks and CMS, covering both frontend and backend development. Below are some common frameworks and CMS tutorials:
PHP Frameworks
- CakePHP: A rapid development PHP framework. Detailed tutorial can be found at Create and Run CakePHP Project.
- CodeIgniter: A simple yet powerful PHP framework. Detailed tutorial can be found at Create and Run CodeIgniter Project.
- FuelPHP: A flexible PHP framework. Detailed tutorial can be found at Create and Run FuelPHP Project.
- Laravel: An elegant PHP web framework. Detailed tutorial can be found at Create and Run Laravel Project.
- Phalcon: A high-performance PHP framework. Detailed tutorial can be found at Create and Run Phalcon Project.
- PHPixie: A fast and lightweight PHP framework. Detailed tutorial can be found at Create and Run PHPixie Project.
- Slim: A micro-framework for small web applications. Detailed tutorial can be found at Create and Run Slim Project.
- Swoole: A high-performance PHP coroutine framework. Detailed tutorial can be found at Create and Run Swoole Project.
- Symfony: A high-performance PHP framework. Detailed tutorial can be found at Create and Run Symfony Project.
- Webman: A high-performance PHP async framework. Detailed tutorial can be found at Create and Run Webman Project.
- Workerman: A highly efficient PHP framework suitable for real-time applications. Detailed tutorial can be found at Create and Run Workerman Project.
- Yii 2: A high-performance PHP framework suitable for large-scale applications. Detailed tutorial can be found at Create and Run Yii 2 Project.
- Zend Framework: A framework for building high-performance web applications. Detailed tutorial can be found at Create and Run Zend Framework Project.
PHP CMS
- Bedrock: A modern WordPress development stack. Detailed tutorial can be found at Bedrock.
- Contao: An open-source content management system. Detailed tutorial can be found at Contao.
- Craft CMS: A flexible content management system. Detailed tutorial can be found at Craft CMS.
- Drupal: An open-source content management platform. Detailed tutorial can be found at Drupal.
- ExpressionEngine: A flexible content management system. Detailed tutorial can be found at ExpressionEngine.
- Jigsaw: A static site generator. Detailed tutorial can be found at Jigsaw.
- Joomla: An open-source content management system. Detailed tutorial can be found at Joomla.
- Kirby: A file-based CMS. Detailed tutorial can be found at Kirby.
- OctoberCMS: A modern PHP CMS. Detailed tutorial can be found at OctoberCMS.
- Sculpin: A static site generator. Detailed tutorial can be found at Sculpin.
- Statamic: A database-less CMS. Detailed tutorial can be found at Statamic.
- WordPress: A popular content management system. Detailed tutorial can be found at WordPress.
These tutorials will help you quickly get started and use these popular frameworks and CMS for development with the help of ServBay.