Create php.ini File

Create php.ini File

Create a php.ini file from the currently loaded one. Make sure you replace ‘http://example.com/’ with the public path of the current directory.

cp $(echo "<?php phpinfo(); ?>" > phpinfo.php; wget http://example.com/phpinfo.php -O - | sed 's#<head>[^<]*</head>##g' | sed 's#<footer>[^<]*</footer>##g' | sed 's#<script>[^<]*</script>##g' | sed 's#<style>[^<]*</style>##g' | sed 's/<[^>]\+>//g' | grep -v '^$' | grep "Loaded Configuration File" | sed -n -e 's/^.*File //p') php.ini