Net-FullAuto
view release on metacpan or search on metacpan
lib/Net/FullAuto/ISets/Local/PHP_is.pm view on Meta::CPAN
package Net::FullAuto::ISets::Local::PHP_is;
### OPEN SOURCE LICENSE - GNU AFFERO PUBLIC LICENSE Version 3.0 #######
#
# Net::FullAuto - Powerful Network Process Automation Software
# Copyright © 2000-2025 Brian M. Kelly
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but **WITHOUT ANY WARRANTY**; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see:
# <http://www.gnu.org/licenses/agpl.html>.
#
#######################################################################
our $VERSION='0.01';
our $DISPLAY='PHP';
our $CONNECT='secure';
use 5.005;
use strict;
use warnings;
my $service_and_cert_password='Full@ut0O1';
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw($select_php_setup);
use Net::FullAuto::Cloud::fa_amazon;
use Net::FullAuto::FA_Core qw[$localhost cleanup fetch clean_filehandle];
use Time::Local;
use File::HomeDir;
use URI::Escape::XS qw/uri_escape/;
use JSON::XS;
use Sys::Hostname;
my $tit='FullAuto.com';
my $adu='Administrator';
my $avail_port='';
my $hostname=Sys::Hostname::hostname;
my $home_dir=File::HomeDir->my_home;
$home_dir||=$ENV{'HOME'}||'';
$home_dir.='/';
my $username=getlogin || getpwuid($<);
my $do;my $ad;my $prompt;my $public_ip='';
my $builddir='';my @ls_tmp=();
# PHP Debugging
# error_log(__FILE__."\n".__LINE__." ". $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
# error_log(print_r($_REQUEST,TRUE)); For Sending Array to Log
# error_log(print_r(debug_backtrace(),TRUE));
# error_log(wp_debug_backtrace_summary());
# function cleanmsg($msg){
# return $msg;
# }
# function alert($msg,$timeout=1,$url='index.php'){
# $msg=cleanmsg($msg);
# echo "<script>(function(){alert('$msg');})();</script>";
# }
# MENU Log-In Log-Out
# https://premium.wpmudev.org/blog/
# how-to-add-a-loginlogout-link-to-your-php-menu/
# http://vanweerd.com/enhancing-your-php-3-menus/#add_login
# wp plugin list --path=/var/www/html/php --status=active --allow-root
# https://www.digitalocean.com/community/tutorials/
# how-to-set-up-a-firewall-using-firewalld-on-centos-7
# sudo firewall-cmd --zone=public --permanent --add-port=80/tcp
# sudo firewall-cmd --zone=public --permanent --add-port=443/tcp
# sudo firewall-cmd --zone=public --permanent --list-ports
# https://chrisjean.com/change-timezone-in-centos/
# https://www.cartoonify.de/
my $configure_php=sub {
my $selection=$_[0]||'';
my $domain_url=$_[1]||'';
$domain_url=~s/^\s*https?:\/\/w?w?w?\.?//;
my $service_and_cert_password=$_[2]||'';
my $email_address=$_[3]||'';
my $stripe_publish_key=$_[4]||'';
my $stripe_secret_key=$_[5]||'';
my $recaptcha_publish_key=$_[6]||'';
my $recpatcha_secret_key=$_[7]||'';
my ($stdout,$stderr)=('','');
my $handle=connect_shell();my $connect_error='';
my $build_php=0;
my $sudo=($^O eq 'cygwin')?'':
'sudo env "LD_LIBRARY_PATH='.
'/usr/local/lib64:$LD_LIBRARY_PATH" '.
'"PATH=/usr/local/mysql/scripts:$PATH" ';
my $prompt=$handle->prompt();
($stdout,$stderr)=$handle->cmd($sudo.'rm -rvf /var/cache/yum',
'__display__');
$handle->cwd('~');
print "\n";
my ($ip,$iperr)='';
($ip,$iperr)=$handle->cmd($sudo.
"ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*'");
( run in 1.039 second using v1.01-cache-2.11-cpan-39bf76dae61 )