find /home/ -type f -size +10M -and -regex ‘(.tar|.gzip|.zip|.tgz|.*sql)’
Stored at SSH-for-Backups.txt
Some help on php code
find /home/ -type f -size +10M -and -regex ‘(.tar|.gzip|.zip|.tgz|.*sql)’
Stored at SSH-for-Backups.txt
To import DB using command line on server:
mysql -u [User name of the Database] -p [Database Name] < [.SQL file name]
it will ask for the password, we need to paste the password using right click and then hit enter
Hello,
Great. The following must be set in csf.conf: SMTP_BLOCK = “0” and set FKA SMTP Tweak under Tweak Settings in WHM accordingly.
Page was breaking and taking CRM to page nahi mila file on the very root
Search this is email [NUDU-876406]: Chat Transcript
Sent to Mitaksh Bhalla <mitakshbhalla@gmail.com> as well
<?
$random = rand();
$random = $random.”.pdf”;
$filen_name = $_SERVER[‘DOCUMENT_ROOT’].”/”.$random;
exec(“/usr/local/bin/wkhtmltopdf ‘https://www.google.com’ ‘$filen_name’ “,$output);
sleep(4);
ob_clean();
header(“Location: /$random”);
?>
exec(“/usr/local/bin/wkhtmltopdf ‘https://google.com’ ‘/home/demoweballiance/public_html/arolite/estimate_pdfs/$random'”);
Due to Execute function WKHTMLTOPDF not working
Mohit: You can add whitelist in cPanel => Spam Filters => Show Additional Configuration => Whitelist (Emails Always Allowed) => Add new whitelist from, for any legitimate email or domains for you
chown -R lightingbygabrie:lightingbygabrie kar-test1/ for permission
git clone https://mitaksh@bitbucket.org/mitaksh/gabrielli_server_backup.git gabrielli_server_backup1 for cloning
mv gabrielli_server_backup1/.git /home/lightingbygabrie/public_html/ for moving cloned .git to main folder
git add *.* -f
git config –global –add safe.directory /home/weballianceco/public_html
Like following site was creating issues:
When website or CRM breaks without any reasons:
In case of RsHosting server login to cpanel and
On the left menu search for “Terminal” and run top command it will show following result with the CPU usage:
nc -vz 51.52.95.32 40027
netstat -vz esi.hypersage.co.uk 40027
In case of RsHosting server login to cpanel and On the left menu search for “Terminal” and run csf -r command it will restart firewall to allow SMTP connection
zip -r tqcweballiance/public_html/latest_backup.zip $(find tqcweballiance/public_html/ -type f -newermt “2022-05-18 00:00”)
Zip with name of the file as today’s date
zip -r tqcweballiance/public_html/”archive-$(date +”%Y-%m-%d”).zip” latest_backup1.zip $(find tqcweballiance/public_html/ -type f -newermt “2022-05-18 13:42”)
uname -r
traceroute google.com
cat /etc/os-release
sudo systemctl status iptables
cat /etc/sysconfig/iptables
systemctl status firewalld
traceroute 51.52.95.32
curl 51.52.95.32:40027
For Creating PDF another server
<?
define('ROOT_DIR_PATH',"/home/demoweballiance/public_html/folder-name-pdfs/");
//$url = $frontEndURL."/admin/purchase_order/index?page=view_purchase_order_pdf&po_id=$id&hide_top=1&hide_left=1&print_pdf=1";
$url = $_REQUEST['url'];
if(isset($_REQUEST['print_url'])){
echo "<a target='_blank' href='$url'>$url</a>";
die;
}
$pdf_name = $_REQUEST['pdf_name'];
//unlink("".ROOT_DIR_PATH."'temp-pdfs/".$pdf_name);
$file_path = ROOT_DIR_PATH."/temp-pdfs/".$pdf_name;
exec("wkhtmltopdf '$url' '$file_path'");
sleep(1);
if(file_exists(ROOT_DIR_PATH."/temp-pdfs/$pdf_name")){
ob_clean();
header("Location: $frontEndURL"."temp-pdfs/$pdf_name");
exit;
}
?>
For fetching Pdf from another server which was created using above code and saving on our server
<?
define("ROOT_PATH",'/home2/weballia/public_html/folder_path/');
define("FOLDER_PATH",'generated_pdfs/');
define("PDF_FOLDER_PATH",ROOT_PATH.FOLDER_PATH);
$url = $_REQUEST['url'];
$pdf_name = $_REQUEST['pdf_name'];
$attachment_url = "https://demo.web-alliance.uk/folder_path/create-pdf.php?pdf_name=$pdf_name&url=$url";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $attachment_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$data = curl_exec($ch);
curl_close($ch);
file_put_contents(PDF_FOLDER_PATH."".$pdf_name,$data);
ob_clean();
header("Location: https://abc.co.uk/".FOLDER_PATH."$pdf_name");
exit;
//https://abc.co.uk/generate-pdf-with-url.php?pdf_name=testing123.pdf&url=https://abc.co.uk/admin/index.php?l=2
?>
$(‘.shipping_method’).on(‘ifChecked’, function(){
if($(this).val() == 1){
$(‘#shipping_method_div’).show();
}else{
$(‘#shipping_method_div’).hide();
$(‘#tracking_reference’).val(”);
$(‘#courier’).val(”);
}
});
/////// for checkbox ///////
$(“#communication_other”).on(‘ifChecked’, function(){
$(‘#communication_other_text_div’).show();
});
$(“#communication_other”).on(‘ifUnchecked’, function(){
$(‘#communication_other_text_div’).hide();
$(‘#communication_other_text_div’).find(‘input:text’).val(”);
});