Wednesday, May 9, 2018

Upload A File To cpanel From Another Server/URL?

How to Upload A File To cpanel From Another Server/URL?


Uploading data from one cpanel to another is very easy using this script.
Other wise its very pathetic and very time take task to download the data from one cpanel/server to your own computer, then upload it on the 2nd cpanel/server.

There are only few steps:-

  • compress your data folder (zip, tar, etc)
  • copy the link of that compress zip file. (eg attaakwal.blogspot.com/backup/backup.zip)
Then login your new cpanel/server:-
  • create a new file with any name, (eg upload.php)
  • paste this code and click upload button.
  • that's it.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

<!DOCTYPE html>
<html>
<head>
    <title>Upload file from URL</title>
</head>
<body>
<?php
    $BASE_URL = strtok($_SERVER['REQUEST_URI'],'?');
    if (isset($_POST['url'])){
        $url = $_POST['url'];
        echo "Transferring file: {$url}<br>";
        exec("wget {$url}");
    }
?>
    <form name='upload' method='post' action="<?php echo $BASE_URL; ?>">
        <input type='text' id='url' name='url' size='128' /><br>
        <input type="submit" value="Upload">
    </form>
</body>
</html>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Once you have done, make sure that you have removed the script/file (upload.php), cause hackers can  upload malicious files to your webserver!

Cheers!!!

Friday, May 4, 2018

Vtiger 7.1.0 Database charset or collation not compatible

Vtiger 7.1.0 Database charset or collation not compatible with UTF8 Error

If you are manually installing latest Vtiger 7.1.0 version, you might got this error: “vtiger Database charset or collation not compatible with UTF8”

This happens when the database charset is not compatible with Vtiger recommended utf8_general_ci. For this, login to phpmyadmin in your cPanel. In PhpMyAdmin, you can select the database you have created and then go to “Operations”.

In the operations tab section there is an option down below for “Collation”. In that there are collation options in the drop down list. You can select “utf8_general_ci” and click Go. That’s it, your database charset is now changed to utf8_general_ci. You can go ahead and continue with the manual installation of Vtiger 7.1.0.

Alternatively, you can also select the database in phpmyadmin and then run the follow command:

“ALTER DATABASE DB_NAME CHARACTER SET utf8 COLLATE utf8_general_ci;”


Tuesday, February 13, 2018

Resize VMDK

How to resize vmdk / VDI ?

vboxmanage modifyhd Windows7.vmdk --resize 30720
gives the error
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize hard disk operation for this format is not implemented yet!


As u know, resizing of vmdk is tough then VDI, 


So its simple to

  • Change the disk format VMDK to VDI first, 
  • Resizi it, and 
  • Change the format VDI to VMDK again
Now use these commands:-
VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi
VBoxManage modifyhd "cloned.vdi" --resize 31720
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk
The above will resize the hard disk up to 30GB (30 * 1024MB). 


Saturday, January 20, 2018

Carrier Add VICIdial

How to add carrier in vicidial?


Should be same as show in the image.

  • Keep in mind the Account Entry name and the entry in string must be same
  • Dialer prefix and the exclude with the EXTEN
e.g if the dialer prefix is one digit, then EXTEN is 1, if its two digit then EXTEN:2)

Account Entry:-

[UNIQUE_NAME]
disallow=all
allow=ulaw
dtmf=rfc2833
type=peer
qualify=no
canreinvite=no
nat=comedia
host=X.X.X.X

Dialplan Entry:-

exten => _22XX.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _22XX.,n,Dial(SIP/UNIQUE_NAME/44#${EXTEN:2},,tToR)
exten => _22XX.,n,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

To Check the public IP address on the server ??

vicibox7:~ # curl -s checkip.dyndns.org | sed -e 's/<.Current IP Address: //' -e 's/<.$//'

Result show as :-

<html><head><title>Current IP Check</title></head><body>Current IP Address: X.X.X.X</body></html>

To check the Dialer Logs
vicibox7:~ # asterisk -rv
To remove the extra output :-
vicibox7*CLI> core set verbose 0
To check the Specific Carrier Log :-
vicibox7:~ #  sip set debug peer globext

Sunday, January 7, 2018

what is PLEX media server and how to configure



Get the know how to access your movies and music around the house by easily setting up a media server. There are lots of options out there, but today Leo & Iyaz focus on the free, cross-platform solution, Plex. Instructions: Install Plex Media Server on your computer. Once installed, tell Plex Media Manager where your files are. To view your media on your network, install the Plex app for your device. Links for Connected Devices | Mobile Devices | Desktop To access your content outside your network, try MyPlex

Watch this Tutorial :-


Saturday, January 6, 2018

Could not find a registered machine named '--autostart-enabled'

VBoxManage: error: VBoxManage: error: Could not find a registered machine named '--autostart-enabled'

VBoxManage: error: Could not find a registered machine named
got this Error while running a VBoxManage command :- 

# VBoxManage modifyvm --autostart-enabled on

Error :-

VBoxManage: error: Could not find a registered machine named '--autostart-enabled'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 500 of file VBoxManageModifyVM.cpp

Solution

Run the following command before the VBoxManage command
# VBoxManage modifyvm <vm_name> --autostart-enabled onv1.vbox

To Check VM name :-

# vboxmanage list vms 

Could not find a registered VM names

VBoxManage: error: Could not find a registered machine named 'vms'

VBoxManage: error: Could not find a registered machine named
got this Error while running a VBoxManage command :- 

#VBoxManage showvminfo vmsrv1

Error :-

VBoxManage: error: Could not find a registered machine named 'vmsrv1'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())" at line 2781 of file VBoxManageInfo.cpp

Solution:-

To Register VM


Run the following command before the VBoxManage command
# VBoxManage registervm /home/user/VirtualBox\ VMs/VMXP/vmsrv1.vbox 

To Un-register VMs


# vboxmanage unregistervm vmsrv1