Search Our Database
How to install and enable XSL PHP extension on a DirectAdmin server
Introduction
This guide is designed for Linux server administrators and developers who need to install and enable the PHP XSL extension, which is essential for converting XML data into HTML. By following this guide, you will learn how to use DirectAdmin’s custombuild tool to complete the installation process. Whether you’re managing a personal server or maintaining a business-critical application, these steps will help you ensure smooth and efficient XML transformation using XSL.
Prerequisites
- SSH access to the server.
- Basic knowledge of terminal commands.
- Ensure that PHP is installed and configured.
Step-by-step guide
1. SSH into Your Server
ssh username@your_server_ip
2. Navigate to the DirectAdmin custombuild folder
cd /usr/local/directadmin/custombuild vi configure/ap2/configure.apache
- Press i to enter insert mode.
- Add the following line into configure.apache
--witl-xsl
- Press Esc to exit insert mode.
- Type :wqand press Enter to save the file and quit.
3. Recompile PHP with Custombuild
./build clean ./build php n
4. Verify the Installation
To ensure the XSL extension is successfully installed, create a phpinfo file.
- Navigate to your web directory (commonly /var/www/html).
cd /var/www/html
- Create a new PHP file:
sudo vi info.php
- Press i to enter insert mode, then add the following code:
<?php phpinfo(); ?>
- Press Esc then type :wq to save and exit.
5. Access the PHP Info Page
- Open a web browser and visit:
http://your_server_ip/info.php
Conclusion
By following this guide, you will be able to successfully install and enable the XSL PHP extension on your server. Additionally, you will ensure proper security by removing any test files afterward.
For additional assistance or if you encounter any issues, please contact our support team at support@ipserverone.com.
Article posted on 14 April 2020 by Louis