Last active
August 17, 2016 08:12
-
-
Save cPLevey/3439f6958bafcaf14ff779e3d845577c to your computer and use it in GitHub Desktop.
make a PHP info file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PHPINFO_NAME='cpsupport_phpinfo.php'; | |
echo ""; | |
cat << EOF > "$PHPINFO_NAME" | |
<?php | |
// Added by cPanel Support for Ticket Assistance. | |
phpinfo(); | |
phpinfo(INFO_MODULES); | |
?> | |
EOF | |
DIR_USER=$(pwd |awk -F/ '{print $3}'); | |
chown $DIR_USER: "$PHPINFO_NAME"; | |
echo "PHP info file created:"; | |
ls -lha "$PHPINFO_NAME"; | |
echo ""; | |
USER_DOMAIN=$(grep main_domain /var/cpanel/userdata/$DIR_USER/main |awk '{print $2}'); | |
echo "Possible link:"; | |
echo "http://$USER_DOMAIN/$PHPINFO_NAME"; | |
echo ""; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment