How to Install PHP Censor on Windows 11
In this tutorial, we will be outlining step-by-step instructions for installing PHP Censor on a Windows 11 machine. Before starting, ensure that you have administrative privileges on your system.
Prerequisites
Steps
Download and Install XAMPP, if you have not already done so. Make sure the Apache, MySQL, and PHP are selected during the installation process.
Open the XAMPP control panel and ensure that Apache and MySQL are running.
Open the command prompt and navigate to the htdocs folder within the XAMPP directory.
cd C:\xampp\htdocsClone the PHP Censor Github repository.
git clone https://github.com/php-censor/php-censor.gitOpen the PHP Censor directory.
cd php-censorInstall the dependencies via Composer.
composer installCopy the configuration file.
cp app/config.yml.dist app/config.ymlEdit the
app/config.ymlfile to configure PHP Censor. Replacelocalhostwith the IP address or hostname of your MySQL server.database: db_host: localhost db_port: 3306 db_name: test db_user: root db_password: mypasswordImport the MySQL schema by using the following command:
mysql -u root -p < db/schema.sqlStart the PHP Censor web server.
php console server:start
- Access PHP Censor at
http://localhost:8000from your web browser.
Congratulations! You have now installed PHP Censor on your Windows 11 machine. You can use it to automate your code testing and continuous integration processes.