Using PHP
What is PHP?
PHP (Hypertext Preprocessor) is a widely used open-source scripting language, particularly suited for web development and can be embedded into HTML. PHP's syntax is influenced by C, Java, and Perl, making it easy to learn and use. The strength of PHP lies in its seamless integration with various database systems and services.
ServBay's Support for PHP
ServBay provides support for multiple PHP versions, ensuring you can select the appropriate version for development and deployment according to your project requirements. 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
These versions cover outdated and unsupported versions as well as the latest versions, ensuring you can choose the most suitable version for development.
TIP
Composer comes pre-installed with ServBay, so there's no 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
-PHP
section. - Select the PHP version you require.
- Click the green
Install
button and wait for the installation to complete.
Included Modules
ServBay provides multiple modules for PHP, allowing you to extend PHP's functionality seamlessly:
- GD: A library for image processing. Installed and enabled by default, no extra configuration needed.
- IMAP: A library for handling emails. Installed and enabled by default, no extra configuration needed.
- Imagick: The PHP extension for ImageMagick. Installed and enabled by default, no extra configuration needed.
- Memcache: A memory object caching system. Installed and enabled by default, no extra configuration needed.
- Memcached: A high-performance distributed memory object caching system. Installed and enabled by default, no extra configuration needed.
- MySQL: The PHP extension for MySQL databases. Installed and enabled by default, no extra configuration needed.
- OpenLDAP: The PHP extension for Lightweight Directory Access Protocol. Installed and enabled by default, no extra configuration needed.
- PgSQL: The PHP extension for PostgreSQL databases. Installed and enabled by default, no extra configuration needed.
- Redis: A high-performance key-value storage system. Installed and enabled by default, no extra configuration needed.
- SQLite 3: A lightweight SQL database engine. Installed and enabled by default, no extra configuration needed.
- Sodium: A library for cryptographic operations. Installed and enabled by default, no extra configuration needed.
- cURL: A library for data transfer. Installed and enabled by default, no extra configuration needed.
- MongoDB: The PHP extension for interacting with MongoDB database. To enable, please refer to how to enable ServBay's MongoDB module.
- OPcache: A caching module for accelerating PHP script execution. To enable, please refer to how to enable ServBay's OPcache module.
- Phalcon: A high-performance PHP framework extension. To enable, please refer to how to enable ServBay's Phalcon module.
- SCWS: The PHP extension for the Chinese word segmentation system. To enable, please refer to how to enable ServBay's SCWS module.
- Swoole: A high-performance PHP coroutine framework extension. To enable, please refer to how to enable ServBay's Swoole module.
- Xdebug: An extension for PHP debugging and analysis. To enable, please refer to how to enable ServBay's Xdebug module.
For detailed usage tutorials, please refer to the following links:
- GD
- IMAP
- Imagick
- Memcache
- Memcached
- MySQL
- OpenLDAP
- PgSQL
- Redis
- SQLite 3
- Sodium
- cURL
- MongoDB
- OPcache
- Phalcon
- SCWS
- Swoole
- Xdebug
Tutorial
ServBay provides comprehensive tutorials for using PHP frameworks and CMSs, covering both frontend and backend development. Below are some common framework and CMS tutorials:
PHP Frameworks
- CakePHP: A rapid development PHP framework. For detailed tutorial, please refer to Create and Run CakePHP Project.
- CodeIgniter: A simple yet powerful PHP framework. For detailed tutorial, please refer to Create and Run CodeIgniter Project.
- FuelPHP: A flexible PHP framework. For detailed tutorial, please refer to Create and Run FuelPHP Project.
- Laravel: A clean and elegant PHP web framework. For detailed tutorial, please refer to Create and Run Laravel Project.
- Phalcon: A high-performance PHP framework. For detailed tutorial, please refer to Create and Run Phalcon Project.
- PHPixie: A fast and lightweight PHP framework. For detailed tutorial, please refer to Create and Run PHPixie Project.
- Slim: A micro-framework suitable for small web applications. For detailed tutorial, please refer to Create and Run Slim Project.
- Swoole: A high-performance PHP coroutine framework. For detailed tutorial, please refer to Create and Run Swoole Project.
- Symfony: A high-performance PHP framework. For detailed tutorial, please refer to Create and Run Symfony Project.
- Webman: A high-performance PHP asynchronous framework. For detailed tutorial, please refer to Create and Run Webman Project.
- Workerman: An efficient PHP framework for real-time applications. For detailed tutorial, please refer to Create and Run Workerman Project.
- Yii 2: A high-performance PHP framework suitable for large-scale applications. For detailed tutorial, please refer to Create and Run Yii 2 Project.
- Zend Framework: A framework for building high-performance web applications. For detailed tutorial, please refer to Create and Run Zend Framework Project.
PHP CMS
- Bedrock: A modern WordPress development stack. For detailed tutorial, please refer to Bedrock.
- Contao: An open-source content management system. For detailed tutorial, please refer to Contao.
- Craft CMS: A flexible content management system. For detailed tutorial, please refer to Craft CMS.
- Drupal: An open-source content management platform. For detailed tutorial, please refer to Drupal.
- ExpressionEngine: A flexible content management system. For detailed tutorial, please refer to ExpressionEngine.
- Jigsaw: A static site generator. For detailed tutorial, please refer to Jigsaw.
- Joomla: An open-source content management system. For detailed tutorial, please refer to Joomla.
- Kirby: A file-based CMS. For detailed tutorial, please refer to Kirby.
- OctoberCMS: A modern PHP CMS. For detailed tutorial, please refer to OctoberCMS.
- Sculpin: A static site generator. For detailed tutorial, please refer to Sculpin.
- Statamic: A CMS without databases. For detailed tutorial, please refer to Statamic.
- WordPress: A popular content management system. For detailed tutorial, please refer to WordPress.
With these tutorials, you can quickly get started and utilize these popular frameworks and CMS for development using ServBay.