php.ini on replit webserver
So ive seen alot of questions how to enable php modules on replit. Ive done some testing and now found a way. Im not shure that this works properly for all modules.
ususally the feault php.ini is located at /etc/php/7.2/cli/php.ini. So to copy it, run
cp /etc/php/7.2/cli/php.ini ./. If that dont works, run
php -i | grep 'php.ini'and replace it in the above command.
Do your modifications
Now you can do you modifications to the php.ini file.
Start webserver with custom php.ini
To start the webserver now, run
php -S 0.0.0.0:8000 -t . -c php.ini. If you want to run this command on the start button, run
echo 'run = "php -S 0.0.0.0:8000 -t . -c php.ini"' > .repliton shell. Now your modules should be enabled!
Hope this helped you!
If there errors, you may try to run
install-pkg php-<module name>