RealTechTalk (RTT) - Linux/Server Administration/Related

We have years of knowledge with technology, especially in the IT (Information Technology) industry. 

realtechtalk.com will always have fresh and useful information on a variety of subjects from Graphic Design, Server Administration, Web  Hosting Industry and much more.

This site will specialize in unique topics and problems faced by web hosts, Unix/Linux administrators, web developers, computer technicians, hardware, networking, scripting, web design and much more. The aim of this site is to explain common problems and solutions in a simple way. Forums are ineffective because they have a lot of talk, but it's hard to find the answer you're looking for, and as we know, the answer is usually not there. No one has time to scour the net for forums and read pages of irrelevant information on different forums/threads. RTT just gives you what you're looking for.

  • Flash slowing down your Firefox browser? Install Flashblock plugin


    Install the "Flashblock" plugin because we all know most unwanted high CPU usage situations come from the browser usually because of a looping Flash ad taking up 100% CPU.

    The solution is to install the "Flashblock" plugin that doesn't allow any Flash to load and play unless you click on the placeholder.


  • Centos scp or sftp program missing solution/what rpm provides them


    You need the "openssh-clients" package which contains sftp and scp.


    yum -y install openssh-clients


  • How to install grub on virtio KVM with Linux


    I messed up the bootloader by accident on a standard Centos 6.3 install because I turned the /dev/vda1 boot partition into an mdadm raid 1.  This was all done correctly aside from one point I didn't realize was an issue metadata=00.90 is the only thing that will allow you to boot (otherwise grub won't work and you won't boot).

    So the next step is rescue mode from a CD right? The problem you will find is that grub does not detect your hard drives, this is I believe is because of virtio or it just isn't accustomed to /dev/vd* naming conventions.

    The grub install fix for KVM

    The main difference is that we are assigning hd0 manually and telling it to be /dev/vda.

    device (hd0) /dev/vda
    root (hd0,0)
    setup (hd0)

    Repeat the above for any other disks you want to install grub on eg.

    device (hd1) /dev/vdb


  • KVM: unknown exit, hardware reason 0x80000021 kvm_run returned -22 solution


    If the below is happening on KVM (a very weird and scary looking error) it's probably because of Windows. This has happened countless times to me where the bootsector on Windows 7/2008 becomes corrupted easily (even by a crash or shutdown). 

    KVM: unknown exit, hardware reason 0x80000021
    kvm_run returned -22
    rax 0000000000000010 rbx 0000000000000080 rcx 0000000000000000 rdx 0000000000000080
    rsi 000000000025db2a rdi 000000000007db2a rsp 0000000000000200 rbp 0000000000007c00
    r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11 0000000000000000
    r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000
    rip 00000000000000ca rflags 00000002
    cs b000 (002b0000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
    ds 0020 (00000200/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
    es 0020 (00000200/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
    ss 0020 (00000200/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
    fs 0020 (00000200/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
    gs 0020 (00000200/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
    tr 0000 (feffd000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
    ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
    gdt 2b0000/1f
    idt 0/3ff

    cr0 10 cr2 0 cr3 0 cr4 0 cr8 0 efer 0

    The solution:

    Boot from the install disk and click "Repair" and then command prompt and use the "bootrec /fixboot" command it should fix it.

    #fixmbr did not fix it
    bootrec /fixmbr

    #fixboot fixed it!
    bootrec /fixboot


  • Linux bash how to list files of a certain date with the statu command for scripting


    The command below will show only files created for the month of 2014-12 but you can of course change the year, month or even specific day or time to suit your needs.   The awk command simply just makes it output the list of files created on the date you are looking for.

    stat -c "%z %n" *|grep ^"2014-12"|awk '{print $4}'


  • cPanel How to set SSL and Dedicated IP in cPanel



    Account Functions -> Change Site's IP Address
    Choose the domain and then click "Change"
    Choose the new IP

    1.) Setup SSL Certificate in cPanel
    Click on "SSL/TLS Manager" under the "Security" section.

    2.) Under " Private Keys (KEY)"

    Click "Generate, view, upload, or delete your private keys."
    Choose "Key Size: 4096 bits"
    Click "Generate" button.

    3.) Under "Certificate Signing Requests (CSR)"

    Click "Generate, view, or delete SSL certificate signing requests."
    Choose your Key (private key created in Step 2-it should be chosen for you by default).
    Fill out the rest of the form especially for "domains" and then click "Generate"

    4.)Go to your SSL Provider and upload or paste the generated CSR code from Step#3


  • OpenVZ vzctl update changes how iptables work - iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. updated solution


    Are you getting the same old error message even though your iptables settings for OpenVZ are correct?

    iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.

    The reason is because in newer vzctl  the old way of setting IPTABLES="" in vz.conf is completely deprecated (I spent some time fiddling wondering why my settings were correct but no iptables were working).

    Here is what you need to do on newer vzctl versions (there is no enabling specific or separate modules like previously):

    vzctl set $vps --netfilter full --save


  • Wordpress Plugin manual install how-to


    This is the most secure way since we don't know if using the built-in ftp method of Wordpress is secure (that is do they store, record or transmit the ftp login information to a third party like the NSA?).

    Upload or wget the plugin and then unzip it from the Wordpress website tot he following path of your wordpress:

    /yourwordpressinstall/wp-content/plugins

    Then navigate to the "Plugins" section on the left side of the Wordpress Dashboard.

    You should now see the plugin you installed and need to click on "Activate" to make it work.

    It takes a few extra seconds but is much more secure.

     


  • Disable linux baxh proxy ENV export variable


    if you type Export and see something like this:

     

    declare -x all_proxy="socks://127.0.0.1:22000/"

    Most sites assume and tell you to check your .bashrc or /etc/profile /etc/bash.bashrc which may not apply if you've unknowingly or forgot that you setup a proxy from your GUI such as Gnome.

    To check in Gnome if you have a permanent proxy do the following:

    System -> Settings -> Network Proxy

    From there it's easy to configure or disable the proxy and the above socks proxy can be disabled permanently.


  • Linux bash read exif data tags from image jpeg/tiff/jpg


    Use the program exiftags

     

    exiftags 20141031_155127.jpg-45460829d582e9.jpg
    exiftags: couldn't find Exif data


  • PHP Issues with Joomla Strict Standards: Non-static method JLoader::import() should not be called statically


    This is basically caused by upgrading PHP to a new version like 5.4 when you had 5.2 before and an old version of Joomla.  The only solution is to upgrade Joomla or downgrade PHP, both of which can be a pain.

     


    Strict Standards: Non-static method JLoader::import() should not be called statically in /home/userdir/public_html/libraries/joomla/import.php on line 29

    Strict Standards: Non-static method JLoader::register() should not be called statically in /home/userdir/public_html/libraries/loader.php on line 71

    Strict Standards: Non-static method JLoader::import() should not be called statically in /home/userdir/public_html/libraries/joomla/import.php on line 32

    Strict Standards: Non-static method JLoader::register() should not be called statically in /home/userdir/public_html/libraries/loader.php on line 71

    Strict Standards: Non-static method JLoader::load() should not be called statically in /home/userdir/public_html/libraries/loader.php on line 161

    Strict Standards: Non-static method JLoader::register() should not be called statically in /home/userdir/public_html/libraries/loader.php on line 138

    Strict Standards: Non-static method JRequest::clean() should not be called statically in /home/userdir/public_html/libraries/joomla/import.php on line 33

    Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/userdir/public_html/libraries/joomla/environment/request.php on line 463

    Strict Standards: Non-static method JLoader::import() should not be called statically in /home/userdir/public_html/libraries/joomla/import.php on line 35

    Strict Standards: Non-static method JLoader::register() should not be called statically in /home/userdir/public_html/libraries/loader.php on line 71

    Strict Standards: Non-static method JLoader::import() should not be called statically in /home/userdir/public_html/libraries/joomla/import.php on line 38

    Strict Standards: Non-static method JLoader::register() should not be called statically in /home/userdir/public_html/libraries/loader.php on line 71

    Strict Standards: Non-static method JLoader::import() should not be called statically in /home/userdir/public_html/libraries/joomla/import.php on line 39

    Strict Standards: Non-static method JLoader::register() should not be called statically in /home/userdir/public_html/libraries/loader.php on line 71


  • esniper and curl errors https://signin.ebay.com/ws/eBayISAPI.dll?SignIn: Couldn't connect to server: couldn't connect to host


    I kept thinking it was esniper but somehow my bash settings have a preset proxy that was creating the issue.

    https://signin.ebay.com/ws/eBayISAPI.dll?SignIn: Couldn't connect to server: couldn't connect to host

    curl manually to any URL is the same:

    curl: (7) couldn't connect to host

    Run curl with -vvvvvv mode to see the issue:

    curl -vvvvvvvvvv http://realtechtalk.com
    * About to connect() to proxy 127.0.0.1 port 22000 (#0)
    *   Trying 127.0.0.1... Connection refused
    * couldn't connect to host
    * Closing connection #0
    curl: (7) couldn't connect to host

    The solution is to disable the proxy you have running.

    export
    declare -x ALL_PROXY="socks://127.0.0.1:22000/"


  • Disable cphulk in CPanel if you can't login even with the right password


    It's a great feature to ward off bruteforce but is also annoying because you think you have the wrong password when you can't login.

    How to Disable cp hulk for 5 minutes

    /usr/local/cpanel/etc/init/stopcphulkd

  • bash increment how to


    variable=0

    increment=$((variable + 1))


  • Centos automatic ifcfg-eth0 scripts based on list of IPs from bash


    It's a basic script that reads the file "ips.txt" in the current directory and then creates a corresponding ifcfg file

     

     

    #!/bin/bash
    GATEWAY=192.168.1.1

    NETMASK=255.255.255.0

    device=eth0


    counter=0
    for ips in `cat ips.txt`; do
    ethconfig=$(cat <<
    SETVAR

     


  • Vbox/Virtualbox devices grayed out for non-root user solution


    It is a permissions issue that is hard to fix.

    All but one USB device is greyed out.

    I am already a member of "vboxusers"

    • I have already enabled and disabled USB support for the guest.
    • I have already reinstalled the latest VBOx guest editions
    • If running as root it all works fine
    • Changing ownership and permissions on /dev/vbox* does not help

    The solution


    user@homebox:~/.VirtualBox/Machines/XP$ cd /dev
    user@homebox:/dev$ ls -al|grep -i vbox
    crw-------   1 root root       10,  55 2014-10-24 16:43 vboxdrv
    crw-------   1 root root       10,  54 2014-10-24 16:43 vboxdrvu
    crw-------   1 root root       10,  53 2014-10-24 16:43 vboxnetctl
    drwxr-x---   2 root vboxusers       40 2014-10-24 16:43 vboxusb
    user@homebox:/dev$ sudo chmod 755 /dev/vbox
    vboxdrv     vboxdrvu    vboxnetctl  vboxusb/   
    user@homebox:/dev$ sudo chmod 755 /dev/vbox
    vboxdrv     vboxdrvu    vboxnetctl  vboxusb/   
    user@homebox:/dev$ sudo chmod 755 /dev/vboxusb/


    user@homebox:~$ VBoxManage list usbhost
    Host USB Devices:

    UUID:               dbd3eb2f-8040-4b3b-974d-b7df4c5b4dca
    VendorId:           0x045e (045E)
    ProductId:          0x0752 (0752)
    Revision:           1.16 (0116)
    Port:               0
    USB version/speed:  1/1
    Manufacturer:       Microsoft
    Product:            Wired Keyboard 400
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.1/usb4/4-1//device:/dev/bus/usb/004/002
    Current State:      Unavailable

    UUID:               51c5189d-7891-45c6-b373-ee15e2252520
    VendorId:           0x045e (045E)
    ProductId:          0x076c (076C)
    Revision:           0.131 (00131)
    Port:               1
    USB version/speed:  2/1
    Manufacturer:       Microsoft
    Product:            Microsoft® Comfort Mouse 4500
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.0/usb3/3-2//device:/dev/bus/usb/003/003
    Current State:      Unavailable

    UUID:               c141d017-b473-4a2f-bffd-61b19b67d569
    VendorId:           0x04a9 (04A9)
    ProductId:          0x2220 (2220)
    Revision:           1.0 (0100)
    Port:               1
    USB version/speed:  1/1
    Manufacturer:       Canon
    Product:            CanoScan
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.1/usb4/4-2//device:/dev/bus/usb/004/003
    Current State:      Available

    UUID:               c4c7eecd-188f-415c-929f-2f5834613262
    VendorId:           0x054c (054C)
    ProductId:          0x0243 (0243)
    Revision:           1.0 (0100)
    Port:               0
    USB version/speed:  2/2
    Manufacturer:       Sony
    Product:            Storage Media
    SerialNumber:       2A08060315464
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1//device:/dev/bus/usb/002/002
    Current State:      Unavailable

    UUID:               c22984d9-208b-4900-ab0a-0c6bf53da472
    VendorId:           0x058f (058F)
    ProductId:          0x6366 (6366)
    Revision:           1.0 (0100)
    Port:               5
    USB version/speed:  2/2
    Manufacturer:       Generic
    Product:            Mass Storage Device
    SerialNumber:       058F0O1111B1
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.2/usb1/1-6//device:/dev/bus/usb/001/006
    Current State:      Unavailable

    UUID:               e24dec16-dce2-4856-b250-f511ad84b039
    VendorId:           0x05ac (05AC)
    ProductId:          0x1227 (1227)
    Revision:           0.0 (0000)
    Port:               1
    USB version/speed:  2/1
    Manufacturer:       Apple Inc.
    Product:            Apple Mobile Device (DFU Mode)
    SerialNumber:       CPID:8920 CPRV:14 CPFM:03 SCEP:01 BDID:00 ECID:000000700A15B58C SRTG:[iBoot-359.3]
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:13.0/usb5/5-2//device:/dev/bus/usb/005/002
    Current State:      Unavailable

    UUID:               04545987-fe87-4565-a0c3-44745e075033
    VendorId:           0x0a81 (0A81)
    ProductId:          0x0205 (0205)
    Revision:           0.16 (0016)
    Port:               0
    USB version/speed:  1/1
    Manufacturer:       CHESEN
    Product:            PS2 to USB Converter
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.0/usb3/3-1//device:/dev/bus/usb/003/002
    Current State:      Unavailable

    user@homebox:~$ sudo VBoxManage list usbhost
    [sudo] password for one:
    Host USB Devices:

    UUID:               75a9c8a4-0c9c-49b6-ba61-f0b121d5a7be
    VendorId:           0x045e (045E)
    ProductId:          0x0752 (0752)
    Revision:           1.16 (0116)
    Port:               0
    USB version/speed:  1/1
    Manufacturer:       Microsoft
    Product:            Wired Keyboard 400
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.1/usb4/4-1//device:/dev/bus/usb/004/002
    Current State:      Busy

    UUID:               8894d0a2-1bbe-4588-a362-3e1c9608152b
    VendorId:           0x045e (045E)
    ProductId:          0x076c (076C)
    Revision:           0.131 (00131)
    Port:               1
    USB version/speed:  2/1
    Manufacturer:       Microsoft
    Product:            Microsoft® Comfort Mouse 4500
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.0/usb3/3-2//device:/dev/bus/usb/003/003
    Current State:      Busy

    UUID:               7ecfd008-b536-4b51-aa72-9623a17e5283
    VendorId:           0x04a9 (04A9)
    ProductId:          0x2220 (2220)
    Revision:           1.0 (0100)
    Port:               1
    USB version/speed:  1/1
    Manufacturer:       Canon
    Product:            CanoScan
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.1/usb4/4-2//device:/dev/bus/usb/004/003
    Current State:      Available

    UUID:               b53eb210-d787-4fa2-885e-2272b25e6e16
    VendorId:           0x054c (054C)
    ProductId:          0x0243 (0243)
    Revision:           1.0 (0100)
    Port:               0
    USB version/speed:  2/2
    Manufacturer:       Sony
    Product:            Storage Media
    SerialNumber:       2A08060315464
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1//device:/dev/bus/usb/002/002
    Current State:      Busy

    UUID:               8d6fb26d-a5e5-4485-a0ee-80309e60184a
    VendorId:           0x058f (058F)
    ProductId:          0x6366 (6366)
    Revision:           1.0 (0100)
    Port:               5
    USB version/speed:  2/2
    Manufacturer:       Generic
    Product:            Mass Storage Device
    SerialNumber:       058F0O1111B1
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.2/usb1/1-6//device:/dev/bus/usb/001/006
    Current State:      Busy

    UUID:               8e5963c7-099a-4f98-810d-a6643639abce
    VendorId:           0x05ac (05AC)
    ProductId:          0x1227 (1227)
    Revision:           0.0 (0000)
    Port:               1
    USB version/speed:  2/1
    Manufacturer:       Apple Inc.
    Product:            Apple Mobile Device (DFU Mode)
    SerialNumber:       CPID:8920 CPRV:14 CPFM:03 SCEP:01 BDID:00 ECID:000000700A15B58C SRTG:[iBoot-359.3]
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:13.0/usb5/5-2//device:/dev/bus/usb/005/002
    Current State:      Available

    UUID:               c305c6e1-b8f8-4b4f-a832-f7b8a878e464
    VendorId:           0x0a81 (0A81)
    ProductId:          0x0205 (0205)
    Revision:           0.16 (0016)
    Port:               0
    USB version/speed:  1/1
    Manufacturer:       CHESEN
    Product:            PS2 to USB Converter
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:12.0/usb3/3-1//device:/dev/bus/usb/003/002
    Current State:      Busy

     

    The solution

    This is not mentioned anywhere except one blog I found where for some reason the udev rules are missing which means it renders being part of the vboxusers group useless.  I believe this issue happened after manually upgrading VBox.

    Just do the following

    touch /etc/udev/rules.d/60-vboxdrv.rules

    Edit it to look like so:

     

    KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
    #these two lines give access permission to vboxusers to properly work with usb nodes, this could be security risk (bnc#664520) !!
    SUBSYSTEM=="usb_device", ATTR{devnum}=="?*", ATTR{busnum}=="?*",SYMLINK+="vboxusb/$attr{busnum}/$attr{devnum}", GROUP="vboxusers"
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{devnum}=="?*", ATTR{busnum}=="?*",SYMLINK+="vboxusb/$attr{busnum}/$attr{devnum}", GROUP="vboxusers"

     


  • libguestfs tools howto guide for managing virtual machine images


    libguestfs tools howto guide for managing virtual machine images

    To mount a partition
    #mount the kvmuser102821.img image and the /dev/sda1 partition from it to the local directory "mount"
    guestmount -a kvmuser102821.img -m /dev/sda1 mount
     



    To list partition info on the image:
    virt-df image.img

    Filesystem                           1K-blocks       Used  Available  Use%
    kvmuser102821.img:/dev/sda1           20641404     768404   18824476    4%

     



    To resize (expand) an image:

    #first create the destination disk of the size you want:
    qemu-img create -f qcow2 kvmuser102821.img-60G 60G
    Formatting 'kvmuser102821.img-60G', fmt=qcow2 size=64424509440 encryption=off cluster_size=65536

    virt-resize --resize /dev/sda1=60G kvmuser102821.img kvmuser102821.img-60G

    Examining kvmuser102821.img ...
     100% ⟦▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓⟧ --:--
    virt-resize: error: There is a deficit of 2260992 bytes (2.2M).  You
    need to make the target disk larger by at least this amount or adjust
    your resizing requests.

    If reporting bugs, run virt-resize with the '-d' option and include the
    complete output.

    #try again by increasing the target slightly in this case to 60.1G
    qemu-img create -f qcow2 kvmuser102821.img-60G 60.1G
    Formatting 'kvmuser102821.img-60G', fmt=qcow2 size=64531883622 encryption=off cluster_size=65536
     virt-resize --resize /dev/sda1=60G kvmuser102821.img kvmuser102821.img-60G
    Examining kvmuser102821.img ...


  • NS_ERROR_FAILURE (0x80004005) The virtual machine 'XP' has terminated unexpectedly during startup with exit code 1.


    The solution is to run '/etc/init.d/vboxdrv setup' and sometimes happens when upgrading VBox and the kernel modules don't get upgraded with it.  Sometimes the above doesn't work until you reboot because sometimes other unknown processes (even the file manager possibly)  may be locking the old module from being unloaded.

    Failed to open a session for the virtual machine XP.
    The virtual machine 'XP' has terminated unexpectedly during startup with exit code 1.


    Result Code:
    NS_ERROR_FAILURE (0x80004005)
    Component:
    Machine
    Interface:
    IMachine {480cf695-2d8d-4256-9c7c-cce4184fa048}

    ------------------
    Kernel driver not installed (rc=-1908)

    The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

    '/etc/init.d/vboxdrv setup'

    as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

    =====================

    WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
    WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release.
    Stopping VirtualBox kernel modules ...done.
    Uninstalling old VirtualBox DKMS kernel modules ...done.
    Trying to register the VirtualBox kernel modules using DKMS ...done.
    Starting VirtualBox kernel modules ...done.


  • Directadmin compile error solution cc: Internal error: Killed (program cc1)


    cc: Internal error: Killed (program cc1)
    Please submit a full bug report.
    See for instructions.
    make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
    make: *** Waiting for unfinished jobs....
    Stopping crond:                                            [  OK  ]
    Starting crond:                                            [  OK  ]
    *******************************************
    *******************************************

    Cannot find /usr/local/bin/php
    Please recompile php with custombuild, eg:
    cd /usr/local/directadmin/custombuild
    ./build all d

    This appears to be a 64-bit system.
    a common cause of http/php compile failures is mentioned here:
    http://help.directadmin.com/item.php?id=213

    If you're running CentOS (not freebsd or debian) and applies to you, then type:

    ln -sf /usr/lib64/libexpat.so /usr/lib/libexpat.so
    ln -sf /usr/lib64/libm.so /usr/lib/libm.so
    ln -sf /usr/lib64/libssl.so /usr/lib/libssl.so
    cd /usr/local/directadmin/custombuild
    ./build all d

    *******************************************
    *******************************************

     

    The Solution

    The reason the above usually happens is lack of memory (you should have at least 512MB ) and if using OpenVZ you should have unlimited physpages as this is the other fail point for the above.


  • Samsung C410W/CLP410W not printing in Linux solution


    You need to use the Samsung driver but specify it as a CLP-360 (this is what I used for my CLP365) and incidentally most of these units look identical on the outside on inside (I've been buying whatever the latest C300 and now 400 unit for years which all seem the same with slightly different features that I never use).

    The solution

    Once again try specifying earlier models and revisions if the printer doesn't print (it will say it's been sent to the printer but nothing itself will actually print). With my C410W I specified CLP-360 rather than CLP-410 and then it worked (I've seen the same thing on different versions of the Samsung Linux driver and different versions of CUPS and other LInux OS's).


  • Samsung Printer Password Login to change settings CLP


    First of all to find your IP you can hold the "X" button for a few seconds and it will print out the DHCP IP.

    Another way to find the IP that I prefer is to login to your router or switch and find a hostname that says something like "SEC001599CD2948" which will be your Samsung printer (at least for the C3xx or C4xx series of Samsung printers).

    The login and password for Samsung Syncthru Webservice:

    admin/sec00000

    From there you can adjust all kinds of settings and find other information including adjusting settings for sleep etc..


  • bash shellshock how to manually patch when there is no update for Centos/Debian/Ubuntu/Fedora


    wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
    tar xzvf bash-4.3.tar.gz
    cd bash-4.3/
    wget --no-directories --level 1 --recursive http://ftp.gnu.org/gnu/bash/bash-4.3-patches/
    for patch in `ls bash43-*|grep -v .sig$`; do
    echo applying "$patch"
    patch -p0 < $patch
    done

    ./configure;make;make install
    #it will install to /usr/bin/bash but if your bash is somewhere else you need to overwrite the old one.

    #eg.
    #mv /usr/bin/bash /bin/bash

     

    To test if you are still vulnerable you should see output like below when running this
    env x='() { :;}; echo compevo warning you are vulnerable' bash -c "compevo notice you are not vulnerable"
     

    The output should be this:

    bash: compevo: command not found
     


  • How to root and unlock S4 in Canada Bell/Rogers/Telus/Fido I337 4.4.2


    i337 Canada on Bell is hard to root or even install TWRP

    Installed TWRP from Odin and my computer gave me the bluescreen at the end but it seemed to be successful (after ODIN said reset).
    TWRP mode does not seem to enter, instead you get the Android recovery mode with Volume up + Home


    http://galaxys4root.com/galaxy-s4-root/how-to-root-att-or-verizon-galaxy-s4-on-android-4-4-2/

    1.) Basically go to http://towelroot.com and click on the "weird A looking icon"
    Download the .apk and install and run it (make sure you have unknown sources enabled in the Security Settings for Android).
    2.) Run TowelRoot
    Do the "Normal Mode" and allow it to "disable KNOX". (if KNOX does not disable right away then reboot and try again)
    3.)
    The last 3 numbers are your main reference which for me is NC1
    Download Safestrap 3.72 apk
    Install Safestrap
    Open Safestrap
    *It won't install propery and you'll know if it says "State: Uninstalled"

    Install "Selinux mode changer" from Playstore
    Open it and set Selinux to "permissive"

    *Open Safestrap and install recovery again then it will work
    It should now say "State: Installed"
    4.) Install the MDJ modem or another older modem known to work with your model (in my case I used MDJ from Fido because it works,  I tried MF3 and it did not work as in the modem wasn't working with my phone).

    After this in stall regionlock away and it should work and unlock you.


  • OpenVZ Howto disable ploop and switch back to SIMFS


    It's simple, just edit /etc/vz/vz.conf and add or change the following:

    VE_LAYOUT=simfs


  • firefox android text size inconsistent large and small text size solution


    This is very annoying and also hard for web developers who want to see how things look on Android.  You may be fooled into thinking you have an unclosed bracket or incompatible code but this is the "text inflation feature" which I feel should be disabled by default.  It works so inconsitently that one block of text will appear small while the other will be huge and is quite annoying.

    The solution is simple

    Settings -> Display and "Text Size" (set it to tiny) or make the text as small as it can be until won't go smaller and hit "Set" to disable it. This really is not untuitive and a bit of crazy quirk and hack on the part of Mozilla.


  • /usr/libexec/mysqld: The table 'session' is full solution


    First of all if you're getting this error it is a result of extreme database activity.  If you aren't expecting it or it doesn't make sense to you 99% of the time this is a database driven script being exploited (some common examples I see often are things like phpBB being hit by dozens, hundreds or thousands of bots making constant DB write requests). 

    The easiest way to identify this is to restart MySQL and then run the third party tool "mtop" and you'll see all the queries running and usually the problem DB jumps out at you as being up and active with so many queries that it's obvious (then work backwards and find out what programs, users or scripts are using the database).

    There is also a way to periodically clear the session table and adjust the amount of sessions but that is not the long-term solution if it's abuse/DOS.


  • Openvz iptables v1.4.7: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. solution


    iptables -t nat -A PREROUTING -p tcp -m tcp -d 192.168.2.1/32 --dport 3389 -j DNAT --to-destination 192.168.5.2:3389
    iptables v1.4.7: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.

    The above is often because you don't have the correct modules loaded on the hostnode or enabled for the container but in some cases it's actually a weird openvz setting.

    Check the following to see if it's an Openvz issue:

    cat /sys/module/nf_conntrack/parameters/ip_conntrack_disable_ve0
    1


    If your result is a 1 then you need to do the following to solve it:


     vi /etc/modprobe.d/openvz.conf
    change :
    options nf_conntrack ip_conntrack_disable_ve0=1

    to:
    options nf_conntrack ip_conntrack_disable_ve0=0


  • Postfix Errors & Solutions "unprivileged": bad value: "???" - bad transport type:


    Aug 25 16:43:24 evohostingtor postfix/master[19471]: fatal: /etc/postfix/master.cf: line 24: field "unprivileged": bad value: "???"

    Solution: I had the wrong thick dashes when c&ping (just retype them with your keyboard)


    Aug 25 16:47:10 mailbox postfix/master[24498]: fatal: /etc/postfix/master.cf: line 25: bad transport type: syslog_name=postfix/auth-cleanup
    auth-cleanup unix n - - - 0 cleanup
    #-o syslog_name=postfix/auth-cleanup
    -o header_checks=pcre:/etc/postfix/auth_header_checks.pcre

    Solution: I didn't have any white space (two white spaces) in front of the -o section


  • Postfix how to secure outgoing authenticated e-mails for privacy and hide the IP address, mailer and other things


    The most common solution is to use the /etc/postfix/header_checks but this is a big problem.

    Why is header_checks a problem?  Because it does it to all mail whether incoming or outgoing and whether authenticated or not.  We of course want as much header information for incoming as we can get for many reasons but many organizations want to secure and make their mail clients as secure as possible.

    I adapted this solution to the client's custom config, they are configured to only send through smtps so editing master.cf is different than most others.

    So here's the solution to remove private details from authenticated outgoing mail with Postfix:

    1.) Add the following to /etc/postfix/auth_header_checks.pcre

    /^s*(Received: from)[^n]*(.*for <.*@(?!yourdomain.com).*)/ REPLACE $1 [127.0.0.1] (localhost [127.0.0.1])$2
    /^s*Mime-Version: 1.0.*/ REPLACE Mime-Version: 1.0
    /^s*User-Agent/ IGNORE
    /^s*X-Enigmail/ IGNORE
    /^s*X-Mailer/ IGNORE
    /^s*X-Originating-IP/ IGNORE

    2.) Now comes the tricky part, for this be sure to backup your /etc/postfix/master.cf before messing around.  Even not having the right white space or anything will completely break postfix and make it refuse to start (this means you won't be receiving e-mail at the time).


    Find your "submission" service or in many cases it may just be called "smtps":

    Leave it all the same but add the part in bold below it (make sure two spaces are in front or your master.cf will be broken/notwork).

    smtps     inet  n       -       n       -       -       smtpd -o content_filter=spamassassin
      -o smtpd_enforce_tls=yes
      -o smtpd_tls_wrappermode=yes
      -o cleanup_service_name=auth-cleanup

    Now anywhere else in master.cf add the following:

    auth-cleanup unix n - - - 0 cleanup
      -o header_checks=pcre:/etc/postfix/auth_header_checks.pcre

     

    Restart postfix now and make sure it is working and if not check /var/log/maillog and it will tell you what's wrong ( a common issue when copying and pasting is that the white space in the -o sections may be lost and that will cause errors and sometimes the dashes will turn into the long kind and these are not valid and need to be changed/fixed).


  • Samsung Galaxy Note Upgrade/Update Experience from 4.0.4 with aftermarket ROMs


    It really seems that 4.4.4 is not ready or stable for the i717 yet and this makes sense since it takes a lot of work/development and testing to get the factory stock ROMs working well.  In the end I used the 4.1.2 based Blackstra BlackJelly because it was fast, stable and just works and feels great.  The aftermarket support is great but many devs are focussed on adding features and customization that most of us don't want or need rather than getting things smooth and stable.

     

    CandyKat-quincyatt-4.4.4.release.v1.5.7-Official-20140801.zip
    Problems:
    No sound
    Hardware keys don't work
    Comments: I don't like the style/layout of the ROM, it is too bare-bones and the sweetener packs don't make sense (just include them).

    LS-KK-v3.1-OFFICIAL-quincyatt.zip
    Problems:
    Random reboot/freeze/crash
    H+ no LTE (network eventually stopped working altogether)
    Comments: Perfect layout and setup and functionality aside from frequent random freeze/crash/reboots.

    BeanStalk-4.4.4007-20140711-quincyatt.zip

    Problems:
    The only hardware key to work is the "back" button.
    Comments

    BlackStar BlackJelly ver 2.zip

    Problems:
    Saw the ATT Logo moving and then it freezes and never booted
    .......actually waited a few minutes longer after reboot and it worked.


  • Openvz 2014-08-12T19:05:55-0400 vzctl : CT 391801 : Unable to start init, probably incorrect template 2014-08-12T19:05:55-0400 vzctl : CT 391801 : Container start failed


    2014-08-12T19:05:55-0400 vzctl : CT 391801 : Unable to start init, probably incorrect template
    2014-08-12T19:05:55-0400 vzctl : CT 391801 : Container start failed

    This was caused by trying to run a 64-bit template on a 32-bit kernel hostnode which is obviously impossible.

    The solution is to use a 32-bit template or upgrade the hostnode to 64-bit.


  • Cannot mount iPhone or iPad in Linux



    Unable to mount iPad 4
    Unhandled Lockdown error (-4)

    This is because you need the libimobiledevice-utils package installed and a newer version of it.

    My older Ubuntu 10.10 uses a version that does not have "idevicepair" which seems to work perfectly and automatically with newer versions of the library.

    Basically if you install the above library it should be plug and play and if your imobiledevice-utils doesn't have 'idevicepair' it won't work.

    Here is how to manually do it if it doesn't work automatically:

    idevicepair unpair && idevicepair pair


  • PayPal subscriptions automatically cancelling after creation of profile


    There is a weird quirk with how this works, but there is a variable called "src" that defaults to 0 or disabled if not specified as 1.

    The default 0 means not to recur billing on a subscription.  It's too bad it's not more obvious anywhere nor is there an explanation or warning during payment or after to both the seller and buyer.

    Here's a proper subscription code example that does recur and does not cancel:

    Note the following

    a3= the recurring value

    p3= the period it recurs on

    t3 = the period timeframe (eg M for month or Y for year etc..)

    <form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="your-business-seller-id"> <input type="hidden" name="a3" value="19.99"> <input type="hidden" name="p3" value="3"> <input type="hidden" name="t3" value="M"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="item_name" value="Item Name"> <input type="hidden" name="amount" value="19.99"> <input type="hidden" name="src" value="1"> <input type="image" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> form>

  • .htaccess mod_rewrite preserve access to custom query string solution


    I struggled with this for awhile because sometimes you have rewritten URLs that you want to pass a query string but most of the info and examples do not support this.

    Take a typical example like this:

    RewriteRule ^(.*)-(.*)-(.*) /?module=$3&id=$2

    You need to add the QSA flag to make it work like below:

    RewriteRule ^(.*)-(.*)-(.*) /?module=$3&id=$2 [QSA]

    The QSA preserves the original query string but also appends it with whatever you add.

    eg http://yourdomain.com/rewritten-url?yourstring=value

    You can now access "yourstring" with GET whereas without the QSA in the rewrite you couldn't.


  • Stop Wordpress new user notification how-to


    It's just a simple plugin that you get from here.

    After that you can stopped having a barrage of annoying e-mails from WP :)


  • 2CO/2Checkout Howto Enable IPN/Notification Setup & Script Info


    https://www.2checkout.com/documentation/notifications/order-created

    It shows all the parameters that get passed so you can make a simple script to process it.

    To enable 2CO Notifications you need to do the following:

    1. Login
    2. Browse to the top right to an icon that looks like a "circle with horizontal lines inside" - Notifications.
    3. Enter the appropriate URL for your IPN/Notification processing script (you can have a custom script/location for each event but most just use a single script that intercepts the message type/notification).

    The above is quite similar to how PayPal does it and works quite well once you get it going.  The only drawback is that it doens't appear you can repost notifications or track them like you can with PayPal.


  • 2CO/2Checkout how to create recurring payment subscription button dynamically


    It was hard to find this as I find most online payment processors don't just put the basic information in plain view.

    Remember to set your sid (your seller id).  The below can easily be turned into a scripted PHP template to integrate into your own custom or existing payment solution.

    http://help.2checkout.com/articles/How_to/How-to-Sell-Recurring-Products-with-2Checkout/
















  • Thunderbird Error An error occurred while loading or saving configuration information for thunderbird. Some of your configuration settings may not work properly.


    This error seems to happen randomly and especially when trying to send e-mails.  Apparently it's a long-standing GNome bug but is also partially the default of Thunderbird depending on who you ask.  There is no known fix that I'm aware of except to upgrade gnome and the gvfs package but this is not an option for older versions/distributions.

    An error occurred while loading or saving configuration information for thunderbird. Some of your configuration settings may not work properly.

    Bad key or directory name: "/desktop/gnome/url-handlers/GMT+02/command": `+' is an invalid character in key/directory names
    Bad key or directory name: "/desktop/gnome/url-handlers/GMT+02/command": `+' is an invalid character in key/directory names
    Bad key or directory name: "/desktop/gnome/url-handlers/GMT+02/command": `+' is an invalid character in key/directory names
    Bad key or directory name: "/desktop/gnome/url-handlers/GMT+02/command": `+' is an invalid character in key/directory names
    Bad key or directory name: "/desktop/gnome/url-handlers/GMT+02/command": `+' is an invalid character in key/directory names
    Bad key or directory name: "/desktop/gnome/url-handlers/GMT+02/command": `+' is an invalid character in key/directory names


  • CPanel Link to all of the command line options


    CPanel says you can access 98% of the functions through CLI which experienced Unix/Linux admins prefer for simplicity and for scripting.  I've never found CPanel easy to use from the admin panel, it seems everything is hard to find and a simple task becomes a series of hunts.

    So for people like me here's the list: http://cpanel.net/system-administrators/command-line-scripts/

    Remember to invoke all scripts like this:

     

    /scripts/scriptname

     

    easyapache
    This powerful script allows you to compile, upgrade, and re-install Apache, PHP, and various modules. EasyApache makes it simple to compile Apache and PHP modules.
    check_cpanel_rpms
    The check_cpanel_rpms script validates cPanel-managed RPMs and provides a way to reinstall these RPMs if they have been altered.
    *up
    The *up script is used to manually update the various services on your cPanel & WHM server using various forms such as mysqlup, phpup and eximup. Although you can configure your services to update with cPanel, *up can be used for finer control.
    restartsrv_*
    The restartsrv_* script can be used to manually restart the various services on your cPanel server. This is the recommended method for restarting services through SSH.
    addpop
    The addpop script can be used to add email addresses through SSH. Through interactive prompts, addpop will create the new address and set the email address password under the proper user account.
    delpop
    The delpop scripts can be used to remove email accounts through SSH. Similar to the addpop script, delpop will remove the email address from the proper account.
    wwwacct
    The wwwacct script can be used to create accounts for your cPanel & WHM server. We’ve designed this script to allow you define common parameters used for account creation.
    killacct
    The killacct script can be used in similar fashion as the wwwacct script to automate removal of accounts.
    restorepkg
    The restorepkg script can be used to manually restore an account from backup.
    cpbackup
    When using cPanel & WHM’s legacy backup system the cpbackup script can be used to manually trigger system wide backups.
    pkgacct
    The pkgacct script is used within the cpbackup script and can be manually executed to create account specific backups.
    upcp
    The upcp script can be used to trigger the update process on your server. You can also configure whether you want server software and the OS updated by the upcp script.
    setupmailserver
    The setupmailserver script allows you to switch between courier and dovecot, or disable POP3 and IMAP functionality altogether.
    setupftpserver
    The setupftpserver script allows you to switch between pure-ftpd and proftpd, or disable ftp functionality altogether.
    setupnameserver
    The setupnameserver script allows you to switch between bind, mydns, and nsd, or disable nameserver functions altogether.
    suspendacct
    The suspendacct script can be used to automate suspension of accounts on your cPanel & WHM server.
    unsuspendacct
    The unsuspendacct script can be used to automate unsuspension of accounts on your cPanel & WHM server.
    restartsrv_*
    The restartsrv family of scripts can be used to restart various services on your cPanel & WHM server, such as Apache, Exim and Dovecot. For administration using the command line, this is the preferred method for restarting services. For a complete list please consult our documentation. Included are:

     

     


  • PayPal Convert BuyNow Button to Plain HTML Link


    Say if you have a form/button like this:

            


                   

               

    To use it as a plain HTML link just use:

    https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=THEBUTTONID


  • OpenVZ Unable to stop container


    vzctl stop ctid
    Killing container ...
    Child 1033348 exited with status 7
    Unable to stop container

    vzctl enter ctid
    enter into CT 29831 failed

    Some have suggested using vzctl stop ctid --fast which does not work.
    The only thing that seems to work is restarting the vz service.


  • Sipura/Linksys VOIP Adapter How to Check your IP Address


    Dial * * * *

    Then 110#

    It will then say what your current IP address is.


  • Ubuntu Linux Slow/Delayed SSH ping response Solution


    I've only ever seen this in Ubuntu for some reason and it is because of the /etc/nsswitch.conf settings.

    So the issue is that if the hostname's reverse DNS cannot be found that you need to go back to DNS which was not the default in this nsswitch.conf file for some strange reason.

    Edit /etc/nsswitch.conf and replace your "hosts" line with this:

    #hosts:          files dns mdns4_minimal [NOTFOUND=return] mdns4
    hosts: files mdns4_minimal [NOTFOUND=return] dns [NOTFOUND=return] mdns4

    I kept the original hosts line commented out in case I need to return to the original although I doubt it.

    After editing like above then ping responds right away without a several second delay.


  • Webalizer Error "Error: Unable to restore run data (10)" no longer updating


    Error: Unable to restore run data (10)

    I keep getting this error but so far there is no obvious solution.  Sometimes I've had to remove the *.hist files so I'll try that again.


  • phpBB guests unable to view forums without logging in Anonymous account solution


    This is still a weird quirk about phpBB, you can allow everyone+guests to see a forum.

    What also controls the first layer is this weird built-in "Anonymous" account.  You have to actually give that account specific rights to view all the forums or otherwise the above will happen and you'll wonder why your group permissions don't seem to apply. 


  • phpBB create new email hash manually when modifying or adding user manually directly through MySQL


    Many may ask why would you need to do this?  When upgrading from phpBB 2 to 3 the conversion does not keep the admin user you create.  If your old admin user has an email address associated that no longer works or is accessible this makes it impossible to reset the admin password.

    Some may just say "I'll just manually edit the e-mail address" but it won't work and phpBB will fail to find that user if you don't update the "user_email_hash" field but how do you do that?

    Use this PHP code:

    $email='yournewemailaddress';

    echo sprintf('%u', crc32(strtolower($email))) . strlen($email);
    ?>

    It will output the corresponding hash you need to use.


  • cp ignore symlink and copy the actual file


    This can be very tricky, say you are doing development on a file that is symlinked.  Doing a "cp dev.file dev.file-bk" won't do what you expect, it just links back to the same file so you haven't copied or backed anything up.

    You need the "-H" switch to copy the actual file that is referenced by the symlink:

    cp -H dev.file dev.file-bk


  • iptables how to forward port to another IP address with DNAT


    -A PREROUTING -d 98.98.98.5/32 -p tcp -m tcp --dport 1050 -j DNAT --to-destination 192.168.1.50:3389

    The above forwards port 1050 on IP 98.98.98.5 to 192.168.1.50 port 3389 (you can obviously edit things to meet your needs).


  • SolusVM error error: Failed to create domain from /home/kvm/kvm101/kvm101.xml error: cannot open file '/dev//dev/kvmcontainer/kvm101_img': No such file or directory


    error: Failed to create domain from /home/kvm/kvm101/kvm101.xml
    error: cannot open file '/dev//dev/kvmcontainer/kvm101_img': No such file or directory

    This is caused by what we consider a quark in SolusVM that I helped a client with.

    SolusVM has as config for the "LVM volume name" and does not enforce any convention.

    Naturally most technical people would use the actual path eg "/dev/kvmcontainer".

    However this causes the error above where it ends up using the path like "/dev//dev/kvmcontainer" so it never works.

    Just enter the actual name of the LV in SolusVM and not the actual path to fix it.

    Really SolusVM should catch this and fix it transparently or force the user to enter the input as it should be.


  • drbd 8.3 hard drive failure recovery example


    drbd 8.3 hard drive failure recovery

    drbdadm attach r0
    DRBD module version: 8.3.10
       userland version: 8.3.8
    you should upgrade your drbd tools!
    0: Failure: (119) No valid meta-data signature found.

        ==> Use 'drbdadm create-md res' to initialize meta-data area. <==

    Command 'drbdsetup 0 disk /dev/sda3 /dev/sda3 internal --set-defaults --create-device --on-io-error=call-local-io-error' terminated with exit code 10

     drbdadm create-md r0
    DRBD module version: 8.3.10
       userland version: 8.3.8
    you should upgrade your drbd tools!
    Writing meta data...
    initializing activity log
    NOT initialized bitmap
    New drbd meta data block successfully created.
     

    drbdadm attach r0


  • mytop install errors


    mytop-1.4-2.el5.rf.noarch from rpmforge has depsolving problems
      --> Missing Dependency: perl(DBI) is needed by package mytop-1.4-2.el5.rf.noarch (rpmforge)

    solution:

    #disabling excludes is required on CPanel type boxes which exclude most updates including perl-DBI
     yum --disableexcludes=main install perl-DBI


    mytop-1.4-2.el5.rf.noarch from rpmforge has depsolving problems
      --> Missing Dependency: perl(Term::ReadKey) is needed by package mytop-1.4-2.el5.rf.noarch (rpmforge)

    # solution

    yum --disableexcludes=main install perl-Term-ReadKey

    mytop Error in option spec: "long|!"
    vi /usr/bin/mytop

    comment the following:

     "long|!"              => $config{long_nums},
     


  • Argument list too long solution - rm -rf new/* -bash: /bin/rm: Argument list too long


    Have you ever tried to run a command like rm to delete several hundred thousand files?  I am not sure what the limit is but any time it is exceeded you need to use a work around like below (which will delete any number of files).

    Solution

     find . -maxdepth 1 -name "*.*" -print0 | xargs -0 rm


  • Windows 2008 Server Trial How To Activate & Extend the Trial


    To activate your Windows 2008 server trial which gives you 180 days:

    1. Start -> Right Click (My Computer).
    2. Click "Activate Windows now"

    To renew your license for 6 days (can be done 3 times):

    1. Start -> Type this command:
    2. slmgr.vbs -rearm
    3. Wait a few minutes until it says it is successful (unless you get that message it has not worked or been done)
    4. Restart

    Note that if you don't activate your Windows on time each hour it will log you off and physically power itself down (a big pain for servers in a datacenter or remote location of any sort).


  • The Best NoSQL Solution


    To first start off, there are many misconceptions about NoSQL and especially its strengths and weaknesses.

    Even the popular NoSQL solution MongoDB is fraught with issues that no one seems to be concerned about aside from a few but there are serious issues with database integrity and verified writes.  MySQL was considered dangerous or incomplete at one point without having the transactional safety features of Oracle for example.

    However the NoSQL implementations seem to take this a vast step further.  NoSQL is distributed and fast, but data integrity and fault tolerance are highly questionable and many question that the way the data is stored without having any relation is crazy.

    This is where many are taking advantage of the current issues with PostreSQL and MySQL now branching out into the NoSQL forray and it looks like they will likely do it better where they retain the SQL features but also have a NoSQL interface and datastore.


  • mysql how to kill individual process/query


    Enter the console as root

    mysql -u root -p

    Then kill the process (where 1234 = the thread ID)

    kill 1234

    It's also a good idea to use a tool like "mtop" to monitor which processes and queries are slow, killing them is a temporary fix while you try to isolate the actual problem.


  • CPanel mysql root password location how to find


    It is located in /root/.my.cnf

    This is truly a horrible idea and a security flaw and on top of that MySQL port 3306 is wide open by default with CPanel.


  • WHMCS Sending Blank E-mails Solution


    After the "latest" update one of our clients asked us to figure out the issue and it turns out it is related to the mail settings.

    Basically all e-mails were being sent with blank text/no body.

    The solution

    Go to "Setup -> General Settings -> Mail" and just click on "Save" and it will work again.

    Note that this assumes you didn't break things yourself by changing any settings.  WHMCS may tell you to use "8bit encoding" but you probably already have that as the default.  It seems that something in the database gets fixed when saving the settings again even if they're already correct/unchanged.


  • Acer Aspire E1-522-5603 Howto Enter BIOS - Press F2


    Press F2, you wouldn't know this because like most new computers, it doesn't announce the required key unless you enable it from the BIOS.

     


  • How to update Open Office in Ubuntu/Debian if your repository is outdated or no longer supported


    http://sourceforge.net/projects/apacheoo-deb/files/debian/dists/wheezy/main/binary-i386/

    To install AOO on your computer, you need to add the following entry to the /etc/apt/sources.list file:

    deb http://downloads.sourceforge.net/project/apacheoo-deb/debian wheezy main

    sudo apt-get update && sudo apt-get install openoffice-en* openoffice-brand-writer openoffice-brand-calc openoffice-brand-impress openoffice-brand-base openoffice-brand-draw openoffice-brand-math openoffice-pyuno openoffice-ooofonts openoffice-ooolinguistic openoffice-debian-menus


  • error: Legacy syntax is unsupported: copyright error: line 10: Unknown tag: Copyright: distributable


    Usually just modify the .spec file to resolve this:

    vi specfile.spec

    Change "Copyright: GPL" to "License: GPL" and try again.


  • drbd won't create device if previous partition is on it Command 'drbdmeta 0 v08 /dev/md160 internal create-md' terminated with exit code 40


    This is what fixed it:

    [root@box13 ~]# dd if=/dev/zero of=/dev/md160 bs=512 count=500

    Basically you need to wipe out more than just the 512 byte partition table so 512 bytes * 500 is more than enough to make DRBD happy and think the partition is now empty.

    The reason this happens is because it gets confused when there is a previous partition with data on the device you are using.


     

    root@box13 ~]# dd if=/dev/zero of=/dev/md160 bs=512 count=1
    1+0 records in
    1+0 records out
    512 bytes (512 B) copied, 0.241883 s, 2.1 kB/s
    [root@box13 ~]# drbdadm create-md r0
    DRBD module version: 8.3.13
       userland version: 8.3.16
    preferably kernel and userland versions should match.
    md_offset 1395733229568
    al_offset 1395733196800
    bm_offset 1395690598400

    Found ext3 filesystem
      1363020736 kB data area apparently used
      1362979100 kB left usable by current configuration

    Device size would be truncated, which
    would corrupt data and result in
    'access beyond end of device' errors.
    You need to either
       * use external meta data (recommended)
       * shrink that filesystem first
       * zero out the device (destroy the filesystem)
    Operation refused.

    Command 'drbdmeta 0 v08 /dev/md160 internal create-md' terminated with exit code 40
    drbdadm create-md r0: exited with code 40
    [root@box13 ~]# mount^C
    [root@box13 ~]# ^C
    [root@box13 ~]# mount
    /dev/md0 on / type ext4 (rw)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    tmpfs on /dev/shm type tmpfs (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    [root@box13 ~]# dd if=/dev/zero of=/dev/md160 bs=512 count=500
     


  • heatbeat ERROR: NV failure (msgfromsteam): [>>> ] ha_msg_add_nv_depth: line doesn't contain '='


    Apr 17 11:55:47 Cluster01 heartbeat: [1426]: WARN: ha_msg_add_nv_depth: line doesn't contain '='
    Apr 17 11:55:47 Cluster01 heartbeat: [1426]: info: >>>

    Apr 17 11:55:47 Cluster01 heartbeat: [1426]: ERROR: NV failure (msgfromsteam): [>>>
    ]

    I have never been able to reproduce the above but it happened on heartbeat-3.04-2 when I took a node down for testing.

    One thing I believe caused it was by configuring ha.cf to do bcast br0 (which means all other heartbeat nodes on the network will communicate when they shouldn't).  I verified this by fluke when I was shocked to see communication from the bad heartbeat node with other unrelated nodes.

    I believe that is what introduced the above errors so I switched to ucast and specific IPs only rather than bcast.


  • drbd won't sync 8.3.13 on OpenVZ kernel


    I used the matching 8.3.13 utilities and it didn't work but strangely the newer 8.3.16 which makes DRBD complain works just fine.

    GIT-hash: 83ca112086600faacab2f157bc5a9324f7bd7f77 build by root@sighted, 2012-10-09 12:47:51
     0: cs:SyncSource ro:Secondary/Primary ds:UpToDate/Inconsistent A r-----
        ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:5236960
        [>....................] sync'ed:  0.1% (5112/5112)M
        finish: 26977:37:03 speed: 0 (0) K/sec

    You would think the errors in the logs below indicate a kernel module error but I don't think that's the case as the newer utilities resolve the sync issue and don't produce messages like below:

    No response from the DRBD driver! Is the module loaded?

    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.695070] INFO: task drbd0_receiver:1301 blocked for more than 120 seconds.
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.695893]       Not tainted 2.6.32-042stab085.20 #1
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.696479] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698359] drbd0_receive D ffff88001f166140     0  1301      2    0 0x00000080
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698371]  ffff88001b4fbcb0 0000000000000046 0000000000000000 0000000000000000
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698377]  ffff88001c615638 0000000000000246 0000000000000000 ffff88001c615630
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698382]  0000000000000246 0000000100032bc1 ffff88001f166708 000000000001ec80
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698387] Call Trace:
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698404]  [] ? prepare_to_wait+0x4e/0x80
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698421]  [] receive_sync_uuid+0x189/0x320 [drbd]
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698427]  [] ? autoremove_wake_function+0x0/0x40
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698438]  [] drbdd+0xe5/0x380 [drbd]
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698454]  [] ? printk+0x41/0x4a
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698459]  [] ? printk+0x41/0x4a
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698470]  [] drbdd_init+0xa4/0x1d0 [drbd]
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698475]  [] ? schedule_timeout+0x19a/0x2e0
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698482]  [] ? process_timeout+0x0/0x10
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698494]  [] drbd_thread_setup+0xdc/0x260 [drbd]
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698500]  [] child_rip+0xa/0x20
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698511]  [] ? drbd_thread_setup+0x0/0x260 [drbd]
    Apr 15 20:31:02 src="/style-2014-l1b/Cluster01 kernel: [ 1200.698515]  [] ? child_rip+0x0/0x20
    Apr 15 20:33:02 src="/style-2014-l1b/Cluster01 kernel: [ 1320.698098] INFO: task drbd0_receiver:1301 blocked for more than 120 seconds.
    Apr 15 20:33:02 src="/style-2014-l1b/Cluster01 kernel: [ 1320.699942]       Not tainted 2.6.32-042stab085.20 #1
    Apr 15 20:33:02 src="/style-2014-l1b/Cluster01 kernel: [ 1320.701509] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    Apr 15 20:33:02 src="/style-2014-l1b/Cluster01 kernel: [ 1320.704374] drbd0_receive D ffff88001f166140     0  1301      2    0 0x00000080
    Apr 15 20:33:02 src="/style-2014-l1b/Cluster01 kernel: [ 1320.704382]  ffff88001b4fbcb0 0000000000000046 0000000000000000 0000000000000000
    Apr 15 20:33:02 src="/style-2014-l1b/Cluster01 kernel: [ 1320.704389]  ffff88001c615638 0000000000000246 0000000000000000 ffff88001c615630
    Apr 15 20:33:02 src="/style-2014-l1b/Cluster01 kernel: [ 1320.704394]  0000000000000246 0000000100032bc1 ffff88001f166708 000000000001ec80

    [ 1800.722067] INFO: task drbd0_receiver:1301 blocked for more than 120 seconds.
    [ 1800.723910]       Not tainted 2.6.32-042stab085.20 #1
    [ 1800.725484] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [ 1800.728368] drbd0_receive D ffff88001f166140     0  1301      2    0 0x00000080
    [ 1800.728377]  ffff88001b4fbcb0 0000000000000046 0000000000000000 0000000000000000
    [ 1800.728383]  ffff88001c615638 0000000000000246 0000000000000000 ffff88001c615630
    [ 1800.728388]  0000000000000246 0000000100032bc1 ffff88001f166708 000000000001ec80
    [ 1800.728393] Call Trace:
    [ 1800.728405]  [] ? prepare_to_wait+0x4e/0x80
    [ 1800.728422]  [] receive_sync_uuid+0x189/0x320 [drbd]
    [ 1800.728428]  [] ? autoremove_wake_function+0x0/0x40
    [ 1800.728439]  [] drbdd+0xe5/0x380 [drbd]
    [ 1800.728446]  [] ? printk+0x41/0x4a
    [ 1800.728450]  [] ? printk+0x41/0x4a
    [ 1800.728465]  [] drbdd_init+0xa4/0x1d0 [drbd]
    [ 1800.728470]  [] ? schedule_timeout+0x19a/0x2e0
    [ 1800.728477]  [] ? process_timeout+0x0/0x10
    [ 1800.728488]  [] drbd_thread_setup+0xdc/0x260 [drbd]
    [ 1800.728495]  [] child_rip+0xa/0x20
    [ 1800.728505]  [] ? drbd_thread_setup+0x0/0x260 [drbd]
    [ 1800.728510]  [] ? child_rip+0x0/0x20


  • heartbeat ERROR: make_io_childpair: cannot open ucast br0


    ERROR: make_io_childpair: cannot open ucast br0

    You cannot specify ucast br0 without an IP address associated with it.


  • Openvz Can't load ploop library: libploop.so: cannot open shared object file: No such file or directory


    Can't load ploop library: libploop.so: cannot open shared object file: No such file or directory

    The above happens when you haven't installed the ploop tools:

    yum -y install ploop


  • How to script fdisk in Linux bash


    (echo n; echo p; echo 1; echo 1; echo; echo wq) | fdisk /dev/sdb

    The above would make a new partition 1 on /dev/sdb and save the changes to disk, you can of course make changes to do almost anything in fdisk.


  • heartbeat compile errors with rpmbuild


    c1: warnings being treated as errors
    stonith_signal.h:34: error: 'stonith_signal_set_simple_handler' defined but not used
    gmake[3]: *** [apcmaster.lo] Error 1
    gmake[3]: Leaving directory `/root/rpmbuild/BUILD/heartbeat-1.2.4/lib/plugins/stonith'
    gmake[2]: *** [all-recursive] Error 1
    gmake[2]: Leaving directory `/root/rpmbuild/BUILD/heartbeat-1.2.4/lib/plugins'
    gmake[1]: *** [all-recursive] Error 1
    gmake[1]: Leaving directory `/root/rpmbuild/BUILD/heartbeat-1.2.4/lib'
    make: *** [all-recursive] Error 1
    error: Bad exit status from /var/tmp/rpm-tmp.vHLZRh (%build)

     


  • OpenVZ avoid vzctl 4.7 and ploop


    OpenVZ has made vzctl version 4.7 default to using ploop which is a big annoyance.  No one wants it otherwise we'd use Xen or KVM.

    Make sure to manually specify vzctl 4.6.1 or you will have issues with old scripts breaking since it defaults to using ploop (a single image like Xen/KVM).

    Here's a list to old versions of vzctl.


  • Wordpress Security Hole, Plug it by manually installing themes and plugins


    It's always bothered me how Wordpress basically forces the user to provide their hosting credentials to install themes and plugins.  How do know for sure the data is not being saved, intercepted and being provided backdoor access to the NSA or other agencies or even just being misused by others with access?

    Here's how to close the security hole above and if you're already given Wordpress your credentials make sure you change everything associated it with it.  Eg. change your ftp username and password, database password and if the same login gives you access to your hosting account/control panel you'll need to change all of your e-mail passwords too.

    1. Search for themes from their website directly.
    2. Download it to your computer, extract the zip file.
    3. FTP/Upload the extracted directory to your hosting account to the "wp-content/themes" directory for your domain.
    4. Activate it from your Wordpress

    Yes the above takes a few extra steps but is well worth the peace of mind.

     


  • LVM Tutorial how to create a Physical Volume (PV), Volume Group (vg), and a Logical Volume (LV) within it


    # first we need a physical volume which we use the pvcreate tool to create

    # I create mine on /dev/sdb3
    pvcreate /dev/sdb3
      dev_is_mpath: failed to get device for 8:19
      Physical volume "/dev/sdb3" successfully created

    # pvdisplay shows the newly created volume
    pvdisplay
      "/dev/sdb3" is a new physical volume of "1.35 TiB"
      --- NEW Physical volume ---
      PV Name               /dev/sdb3
      VG Name              
      PV Size               1.35 TiB
      Allocatable           NO
      PE Size               0  
      Total PE              0
      Free PE               0
      Allocated PE          0
      PV UUID               gpMwTX-JNA7-oTXT-YoCJ-RsKF-ceJd-3hin8w

    # we need to create a new volume group within the physical volume of /dev/sdb3
    # below I call it "kvmvm" on /dev/sdb3
    vgcreate kvmvm /dev/sdb3
      Volume group "kvmvm" successfully created

    # we can see below with vgdisplay that it has been created
    vgdisplay
      --- Volume group ---
      VG Name               kvmvm
      System ID            
      Format                lvm2
      Metadata Areas        1
      Metadata Sequence No  1
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                0
      Open LV               0
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size               1.35 TiB
      PE Size               4.00 MiB
      Total PE              352925
      Alloc PE / Size       0 / 0  
      Free  PE / Size       352925 / 1.35 TiB
      VG UUID               2d42cr-3f92-wF25-l288-JThZ-GGGQ-ttYvI6

    # now that I have a volume group I need to create a logical volume (basically a mini-usable/resizeable partition within LVM's PV /dev/sdb3 on the VG kvmvm

    # create a 60GB partition on the VG kvmvm and call it "kvmuserrdp"  
    lvcreate -L 60G kvmvm -n kvmuserrdp
      Logical volume "kvmuserrdp" created

    # shows the newly created lv (logical volume) which is accessible like a normal drive under /dev/kvmvm/kvmuserrdp

    lvdisplay
      --- Logical volume ---
      LV Path                /dev/kvmvm/kvmuserrdp
      LV Name                kvmuserrdp
      VG Name                kvmvm
      LV UUID                HQhCr0-S2WS-DJEn-eHcc-axYn-uA8M-6bnYro
      LV Write Access        read/write
      LV Creation host, time testbox, 2014-03-26 16:52:56 +0800
      LV Status              available
      # open                 0
      LV Size                60.00 GiB
      Current LE             15360
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           253:0
     


  • Howto Convert Xen Image to KVM


    #count=10000 makes an image of 10000MB make sure your image is at least the same as your existing
    dd if=/dev/zero of=yourimage.img bs=1M count=10000


    # losetup -fv newimage.raw
    # fdisk -cu /dev/loop0


    # kpartx -a /dev/loop0

    # dd if= of=/dev/mapper/loop0p1
    # e2fsck -f /dev/mapper/loop0p1
    # resize2fs /dev/mapper/loop0p1



    # a lot of guides tell you to edit /etc/fstab and /boot/grub/menu.conf and make everything vda or vda1 but I have no idea why
    # You need to make it /sda1 or whatever the root partition is

    for i in dev sys proc; do mount -o bind /$i mnt/$i; done
    mount -o bind mnt/mnt
    chroot mnt

    yum -y install grub

    [root@testbox /]# echo "(hd0) /dev/vda" > /boot/grub/devices.map
    [root@testbox /]# grub --no-floppy
    Probing devices to guess BIOS drives. This may take a long time.


        GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

     [ Minimal BASH-like line editing is supported.  For the first word, TAB
       lists possible command completions.  Anywhere else TAB lists the possible
       completions of a device/filename.]
    grub> device (hd0) /mnt/kvmuser5900.img
    device (hd0) /mnt/kvmuser5900.img
    grub> root (hd0,0)
    root (hd0,0)
     Filesystem type is ext2fs, partition type 0x83
    grub> setup (hd0)
    setup (hd0)
     Checking if "/boot/grub/stage1" exists... no
     Checking if "/grub/stage1" exists... no

    Error 15t: File not found
    grub>

    grub
    Probing devices to guess BIOS drives. This may take a long time.


        GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

     [ Minimal BASH-like line editing is supported.  For the first word, TAB
       lists possible command completions.  Anywhere else TAB lists the possible
       completions of a device/filename.]
    grub> device (hd0) /mnt/kvmuser5900.img
    device (hd0) /mnt/kvmuser5900.img
    grub> root (hd0,0)
    root (hd0,0)
     Filesystem type is ext2fs, partition type 0x83
    grub> setup (hd0)
    setup (hd0)
     Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  27 sectors are embedded.
    succeeded
     Running "install /boot/grub/stage1 (hd0) (hd0)1+27 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
    Done.
    grub> quit
    quit



    #edit grub.conf with the right options obviously dev=xvda is wrong you'll likely want /dev/sda1 as your root or whatever the partition is
    [root@testbox /]# vi /boot/grub/grub.conf
    #edit fstab to mount the right partition
    [root@testbox /]# vi /etc/fstab
    #setup inittab properly
    #Comment the line containing xvc0.
    [root@testbox /]# vi /etc/inittab
    [root@testbox /]# exit


    [root@testbox kvmuser5900]# umount mnt/*
    umount: mnt/bin: not mounted
    umount: mnt/boot: not mounted
    umount: mnt/etc: not mounted
    umount: mnt/home: not mounted
    umount: mnt/lib: not mounted
    umount: mnt/lost+found: not mounted
    umount: mnt/media: not mounted
    umount: mnt/mnt: not mounted
    umount: mnt/opt: not mounted
    umount: mnt/root: not mounted
    umount: mnt/sbin: not mounted
    umount: mnt/selinux: not mounted
    umount: mnt/srv: not mounted
    umount: mnt/tmp: not mounted
    umount: mnt/usr: not mounted
    umount: mnt/var: not mounted

    [root@testbox kvmuser5900]# umount mnt/
    [root@testbox kvmuser5900]# kpartx -d /dev/loop0
    [root@testbox kvmuser5900]# losetup -d /dev/loop0


  • yum error "Error: database disk image is malformed" solution


    yum -y install mathtools
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: centos.mirror.rafal.ca
     * epel: mirror.steadfast.net
     * extras: mirror.agmn.ca
     * rpmforge: repoforge.mirror.constant.com
     * updates: centosb5.centos.org
    extras                                                                                        | 3.4 kB     00:00    
    rpmforge                                                                                      | 1.9 kB     00:00    
    updates                                                                                       | 3.4 kB     00:00    
    updates/primary_db                                                                            | 1.9 MB     00:00    
    vz-base                                                                                       |  951 B     00:00    
    vz-updates                                                                                    |  951 B     00:00    
    Error: database disk image is malformed

    Solution:
    yum clean all


  • drbd howto solve splitbrain or WFConnection


    On primary node

    drbdadm connect all


    On secondary node
    drbdadm -- --discard-my-data connect all

     


  • How to view GPT/EFI Windows Partition Table


    fdisk unfortunately can't do this and I'm not sure if there's any updated version that handles it but parted can do it.

    Here's an example of how to do it:

    parted /dev/sda print

    1      17.4kB  1024MB  1024MB  ntfs         primary
    2      1024MB  16144MB  15120MB  ntfs          primary

    /dev/sda1 would be the first partiton

    /dev/sda2 would be the second partition

    You can then just access them like any other normal partition.


  • Howto Restore Acer Aspire E1-531-4406


    Hit Alt + F10 before the system boots and you'll boot into the recovery drive and be able to restore your system, of course note that all of your data will be wiped out.


  • How to Enable RDP Remote Desktop in Windows 2008 Server


    Start -> Administrative Tools -> Server Manager

    Under "Computer Information" click "Configure Remote Desktop".

    Under "System Properties" choose the type of "Allow connections" you want.

    That's all there is to enabling RDP Access in 2008 server.


  • virtio KVM drivers download location


  • "Detecting hardware, please wait..." Ubuntu Install Error Solution


    "Detecting hardware, please wait..."

    Solution

    This occurs if you are installing with low RAM such as 128MB
    Bump it up at least to 512MB for the install


  • lvm how to resize and extend a volume


    lvextend -L +10G /dev/kvmvm/w2k8r2evalstandard
      Extending logical volume w2k8r2evalstandard to 20.00 GiB
      Logical volume w2k8r2evalstandard successfully resized

    The above adds 10GB to the logical volume.  Of course you must resize the filesystem using other tools to take advantage of the space.


  • Asterisk VOIP Sipura/Linksys PAP2T Calls Not Being Received Solution


    This problem seemed to happen recently but was likely causing issues before.

    Now there are a few reasons why this can happen especially if your adapter has DND mode enabled (disable it).

    However that wasn't my issue and I only figured it out the other day  when  by fluke if you're on the phone (making a call) then  calls will come in.

    That's when I figured out the solution:

    This likely applies to other adapters but in a Sipura/Linksys you'll find this under "Advanced" settings for your line.

        NAT Mapping Enable:   NAT Keep Alive Enable:

    Enable both of those especialy the Keep Alive as otherwise the PBX/Asterisk/server won't realize your phone is alive and ready to receive calls.

    The above seems to have solved it for me.


  • OpenVZ mismatched kernel and dev when compiling.


    ./configure
    ./configure: line 91: cd: /lib/modules/2.6.32-042stab084.25/build: No such file or directory

    Error: kernel version not found.
    Please make sure your kernel is configured.

    dr-xr-xr-x.  4 root root   4096 Feb 21 06:13 ..
    lrwxrwxrwx   1 root root     45 Feb 21 06:13 build -> ../../../usr/src/kernels/2.6.32-042stab084.25
    drwxr-xr-x   2 root root   4096 Feb 12 20:18 extra
    drwxr-xr-x  11 root root   4096 Feb 21 06:13 kernel
    -rw-r--r--   1 root root 567702 Feb 21 06:15 modules.alias
    -rw-r--r--   1 root root 547061 Feb 21 06:15 modules.alias.bin
    -rw-r--r--   1 root root   1376 Feb 12 20:19 modules.block
    -rw-r--r--   1 root root     69 Feb 21 06:15 modules.ccwmap
    -rw-r--r--   1 root root 198500 Feb 21 06:15 modules.dep
    -rw-r--r--   1 root root 289392 Feb 21 06:15 modules.dep.bin
    -rw-r--r--   1 root root     68 Feb 12 20:19 modules.drm
    -rw-r--r--   1 root root    665 Feb 21 06:15 modules.ieee1394map
    -rw-r--r--   1 root root    141 Feb 21 06:15 modules.inputmap
    -rw-r--r--   1 root root   1775 Feb 21 06:15 modules.isapnpmap
    -rw-r--r--   1 root root     29 Feb 12 20:19 modules.modesetting
    -rw-r--r--   1 root root   1929 Feb 12 20:19 modules.networking
    -rw-r--r--   1 root root     74 Feb 21 06:15 modules.ofmap
    -rw-r--r--   1 root root  75547 Feb 12 20:17 modules.order
    -rw-r--r--   1 root root 405413 Feb 21 06:15 modules.pcimap
    -rw-r--r--   1 root root   6259 Feb 21 06:15 modules.seriomap
    -rw-r--r--   1 root root 220302 Feb 21 06:15 modules.symbols
    -rw-r--r--   1 root root 280714 Feb 21 06:15 modules.symbols.bin
    -rw-r--r--   1 root root 837314 Feb 21 06:15 modules.usbmap
    lrwxrwxrwx   1 root root      5 Feb 21 06:13 source -> build
    drwxr-xr-x   2 root root   4096 Feb 12 20:18 updates
    drwxr-xr-x   2 root root   4096 Feb 21 06:13 vdso
    drwxr-xr-x   2 root root   4096 Feb 12 20:18 weak-updates
    [root@testbox 2.6.32-042stab084.25]# ls /usr/src/kernels/2.6.32-
    2.6.32-042stab084.26/  2.6.32-431.el6.x86_64/
    [root@testbox 2.6.32-042stab084.25]# ls /usr/src/kernels/2.6.32-042stab084.26/
    arch   c rypto   firmware  include  ipc     lib       Makefile.common  Module.symvers  samples  security  System.map  usr
    block  drivers  fs        init     kernel  Makefile  mm               net             scripts  sound     tools       virt
    [root@testbox 2.6.32-042stab084.25]# ls
    build          modules.alias.bin  modules.dep.bin      modules.isapnpmap    modules.order     modules.symbols.bin  vdso
    extra          modules.block      modules.drm          modules.modesetting  modules.pcimap    modules.usbmap       weak-updates
    kernel         modules.ccwmap     modules.ieee1394map  modules.networking   modules.seriomap  source
    modules.alias  modules.dep        modules.inputmap     modules.ofmap        modules.symbols   updates
    [root@testbox 2.6.32-042stab084.25]# ls ../../../usr/src/kernels/2.6.32-042stab084.25
    ls: cannot access ../../../usr/src/kernels/2.6.32-042stab084.25: No such file or directory

    Linux testbox 2.6.32-042stab084.25 #1 SMP Wed Feb 12 16:04:42 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux
    [root@testbox 2.6.32-042stab084.25]# ls /boot/grub/
    device.map     fat_stage1_5  grub.conf         jfs_stage1_5  minix_stage1_5     splash.xpm.gz  stage2         vstafs_stage1_5
    e2fs_stage1_5  ffs_stage1_5  iso9660_stage1_5  menu.lst      reiserfs_stage1_5  stage1         ufs2_stage1_5  xfs_stage1_5
    [root@testbox 2.6.32-042stab084.25]# ls /boot/grub/^C
    [root@testbox 2.6.32-042stab084.25]# ls /boot/
    config-2.6.32-042stab084.25   initramfs-2.6.32-042stab084.25.img     symvers-2.6.32-042stab084.25.gz   vmlinuz-2.6.32-042stab084.25
    config-2.6.32-431.el6.x86_64  initramfs-2.6.32-431.el6.x86_64.img    symvers-2.6.32-431.el6.x86_64.gz  vmlinuz-2.6.32-431.el6.x86_64
    efi                           initrd-2.6.32-042stab084.25kdump.img   System.map-2.6.32-042stab084.25
    grub                          initrd-2.6.32-431.el6.x86_64kdump.img  System.map-2.6.32-431.el6.x86_64
    [root@testbox 2.6.32-042stab084.25]# rpm -aq|grep vzkernel
    vzkernel-2.6.32-042stab084.25.x86_64
    vzkernel-devel-2.6.32-042stab084.26.x86_64
    [root@testbox 2.6.32-042stab084.25]# yum -y install vzkernel-2.6.32-042stab084.25.x86_64
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.hustunique.com
     * extras: mirror.bit.edu.cn
     * openvz-kernel-rhel6: ftp.iij.ad.jp


    yum installed the wrong version, the devel does not match the actual running kernel!
     


  • Microsoft Updates suddenly stops at 50% downloading solution


    This seems to mainly affect new installs of Windows and especially on XP randomly.

    There are whole pages dedicated to the subject but none of them have a simple proper solution.

    They and Microsoft say to use "Microsoft Fix It", the only problem is it requires .NET and many new installs of Windows don't have it by default.

    The simple solution you asked for

    Just reboot Windows and that is how I fixed it.


  • Enable Multiple RDP Sessions on Windows XP, Vista, 7 Howto


    http://deepxw.blogspot.ca/search/label/Universal%20Termsrv.dll%20Patch

    The above site has the patch that does this essentialy turning a Desktop Windows into a full fledged RDP server.


  • mencoder howto trim split edit time of mp4 from Samsung Note


    mencoder -fps 30 -ss 00:00:38 -oac lavc -ovc copy 152408.mp4 -o soundedit.mp4

    The -ss flag means to start at 38 seconds (so the first 38 seconds of video will be removed).


  • How to read a conf file without the comments


     cat /etc/some.conf|grep -Ev '^#|^;|^$'

    This assumes that comments start with # or ; (adjust as necessary).  Also note that the ^$ omits blank lines.


  • yum Centos 386 and 64 bit conflict resolution


    This can happen when you install RPMForge or other repos with the wrong architecture and here's how you fix it (simply uninstalling won't usually fix it):

    solution
    yum clean all

    yum -y install openvpn
    Loaded plugins: fastestmirror, presto
    Loading mirror speeds from cached hostfile
     * base: mirror.its.sfu.ca
     * extras: centos.mirror.nexicom.net
     * rpmforge: mirror.cpsc.ucalgary.ca
     * updates: centos.arcticnetwork.ca
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package openvpn.x86_64 0:2.2.2-1.el5.rf will be installed
    --> Processing Dependency: lzo for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libcrypto.so.6()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libssl.so.6()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libpkcs11-helper.so.1()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: liblzo2.so.2()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Running transaction check
    ---> Package lzo.x86_64 0:2.06-1.el5.rf will be installed
    ---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
    ---> Package pkcs11-helper.x86_64 0:1.08-1.el5.rf will be installed
    --> Processing Dependency: libgnutls.so.13(GNUTLS_1_3)(64bit) for package: pkcs11-helper-1.08-1.el5.rf.x86_64
    --> Processing Dependency: libgnutls.so.13()(64bit) for package: pkcs11-helper-1.08-1.el5.rf.x86_64
    --> Finished Dependency Resolution
    Error: Package: pkcs11-helper-1.08-1.el5.rf.x86_64 (rpmforge)
               Requires: libgnutls.so.13()(64bit)
    Error: Package: pkcs11-helper-1.08-1.el5.rf.x86_64 (rpmforge)
               Requires: libgnutls.so.13(GNUTLS_1_3)(64bit)
     You could try using --skip-broken to work around the problem
    ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
    rpmforge-release-0.5.2-2.el6.rf.x86_64 is a duplicate with rpmforge-release-0.5.1-1.el5.rf.i386
    yum -y install openvpn
    Loaded plugins: fastestmirror, presto
    Loading mirror speeds from cached hostfile
     * base: mirror.its.sfu.ca
     * extras: centos.mirror.nexicom.net
     * rpmforge: mirror.cpsc.ucalgary.ca
     * updates: centos.arcticnetwork.ca
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package openvpn.x86_64 0:2.2.2-1.el5.rf will be installed
    --> Processing Dependency: lzo for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libcrypto.so.6()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libssl.so.6()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libpkcs11-helper.so.1()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: liblzo2.so.2()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Running transaction check
    ---> Package lzo.x86_64 0:2.06-1.el5.rf will be installed
    ---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
    ---> Package pkcs11-helper.x86_64 0:1.08-1.el5.rf will be installed
    --> Processing Dependency: libgnutls.so.13(GNUTLS_1_3)(64bit) for package: pkcs11-helper-1.08-1.el5.rf.x86_64
    --> Processing Dependency: libgnutls.so.13()(64bit) for package: pkcs11-helper-1.08-1.el5.rf.x86_64
    --> Finished Dependency Resolution
    Error: Package: pkcs11-helper-1.08-1.el5.rf.x86_64 (rpmforge)
               Requires: libgnutls.so.13()(64bit)
    Error: Package: pkcs11-helper-1.08-1.el5.rf.x86_64 (rpmforge)
               Requires: libgnutls.so.13(GNUTLS_1_3)(64bit)
     You could try using --skip-broken to work around the problem
    ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
    rpmforge-release-0.5.2-2.el6.rf.x86_64 is a duplicate with rpmforge-release-0.5.1-1.el5.rf.i386


  • OpenVZ Quick Install Copy & Paste for Centos 6


    yum -y install wget
    wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo
    rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ
    yum -y install vzkernel vzctl

    After that just reboot and you may also have to enable ip_forward in /etc/sysctl.conf


  • NVIDIA GeForce GT 610 not working in Linux solution - use older 304.117 driver


    I used the slightly older "304.117" version and it worked.

    With the newest version I couldn't get X to start and kept getting these errors in messages/dmesg.

    [ 2346.083660] nvidia 0000:01:00.0: irq 44 for MSI/MSI-X
    [ 2350.608342] NVRM: RmInitAdapter failed! (0x12:0x2b:1831)
    [ 2350.608354] NVRM: rm_init_adapter failed for device bearing minor number 0
    [ 2350.608369] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5


  • nf_conntrack: table full, dropping packet solution


    nf_conntrack: table full, dropping packet

    The above in some cases I've seen is a sign of a DOS attack or can occur if users are using services like torrenting, proxy, VPN etc...  Do not take it lightly as the above can knock a server offline if the table becomes full and I've also seen full crashes and kernel panics shortly after.

     


  • yum error installing php solution - exclude php from being installed from third party repos


    Error: Package: php-Monolog-dynamo-1.7.0-1.el6.noarch (epel)
               Requires: php-aws-sdk
    Error: php-pecl-zendopcache conflicts with 1:php-eaccelerator-0.9.6.1-1.el6.x86_64
    Error: php-xcache conflicts with php-pecl-apc-3.1.9-2.el6.x86_64
    Error: php-pecl-zendopcache conflicts with php-pecl-apc-3.1.9-2.el6.x86_64
    Error: Package: php-horde-Horde-Vfs-2.1.2-2.el6.noarch (epel)
               Requires: php-pecl(ssh2) >= 0.12
               Installing: php-pecl-ssh2-0.11.0-7.el6.x86_64 (epel)
                   php-pecl(ssh2) = 0.11.0
    Error: php-pecl-apc conflicts with 1:php-eaccelerator-0.9.6.1-1.el6.x86_64
    Error: php-pecl-apcu conflicts with php-pecl-apc-3.1.9-2.el6.x86_64
    Error: php-pecl-gmagick conflicts with php-magickwand-1.0.9-1.el6.x86_64
    Error: php-xcache conflicts with 1:php-eaccelerator-0.9.6.1-1.el6.x86_64
    Error: php-pecl-zendopcache conflicts with php-xcache-3.0.4-1.el6.x86_64
    Error: php-xcache conflicts with php-pecl-zendopcache-7.0.3-1.el6.x86_64
    Error: php-pecl-http1-devel conflicts with php-pecl-http-devel-2.0.4-1.el6.x86_64
    Error: php-ZendFramework2-common conflicts with php-ZendFramework-1.12.3-1.el6.noarch
    Error: php-pecl-apcu-devel conflicts with php-pecl-apc-devel-3.1.9-2.el6.x86_64
    Error: php-pecl-gmagick conflicts with php-pecl-imagick-2.2.2-4.el6.x86_64
    Error: php-pecl-http1 conflicts with php-pecl-http-2.0.4-1.el6.x86_64
    Error: php-pecl-http conflicts with php-pecl-http1-1.7.6-4.el6.x86_64
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest


    Edit all repos in /etc/yum/repos.d/* to exclude=php* (the problem is that repos like rpmforge elrepo, epel have PHP and it ends up conflicting and creating upgrade/install issues with the PHP that comes from the main Centos repo)


  • Centos 6 server crash - " kernel:[735188.961824] Kernel panic - not syncing: Fatal exception in interrupt Write failed: Broken pipe"


     kernel:[735188.961824] Kernel panic - not syncing: Fatal exception in interrupt
    Write failed: Broken pipe

    I'm not sure what is causing this and have never seen it on any server before.


  • CPanel Apache httpd won't start solution: Starting httpd: Syntax error on line 2 of /etc/httpd/conf/httpd.conf: Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration


    root@hkhosting [/]# service httpd start
    Starting httpd: Syntax error on line 2 of /etc/httpd/conf/httpd.conf:
    Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration
                                                               [FAILED]

     

     

    root@hkhosting [/]# vi /etc/httpd/conf/httpd.conf

     

    One way with CPanel is just to use /scripts/easyapache and rebuild everything since who knows what else has gone wrong if the config file got messed up like that.

    This is the entire contents of httpd.conf, it became corrupted somehow.


    Alias /mailman/archives /usr/local/cpanel/3rdparty/mailman/archives/public/
    Alias /pipermail /usr/local/cpanel/3rdparty/mailman/archives/public/
    ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /scgi-bin /usr/local/cpanel/cgi-sys/scgiwrap
    Alias /java-sys /usr/local/cpanel/java-sys/
    Alias /img-sys /usr/local/cpanel/img-sys/
    ScriptAlias /cgi-sys /usr/local/cpanel/cgi-sys/
    ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
    ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi
    Alias /bandwidth /usr/local/bandmin/htdocs/
    Alias /sys_cpanel /usr/local/cpanel/sys_cpanel/
    ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    Include "/usr/local/apache/conf/includes/errordocument.conf"
    ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAlias /mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/

    RewriteEngine on
    RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect


     


  • Setting Ulimit


    I never found a solution to do it live (nothing worked that I found) so it looks like a relogin is required.

    Check your maximum file limit

     cat /proc/sys/fs/file-max
    824460

     

    This is different than your actual's user limit which you'll see below

    ulimit -n
    1024

    Try and set it higher but it won't work

    ulimit -n 65000
    -bash: ulimit: open files: cannot modify limit: Operation not permitted

    Set system wide defaults

    sudo vi /etc/security/limits.conf
    *             hard    nofiles           600000
    *             soft    nofiles           500000

    Making it live from a shell session (it won't work for your GNOME/XWindows session itself)
    sudo su
    root@homebox:/home/one# ulimit -n
    1024
    root@homebox:/home/one# ulimit -n 60000

    ulimit -n
    60000

    root@homebox:/home/one# ulimit -n 60000
    root@homebox:/home/one# ulimit -n
    60000
    root@homebox:/home/one# su - one
    one@homebox:~$ ulimit -n
     


  • Centos Howto Upgrade to PHP 5.3 from 5.2


    It's not as simple as "yum install" as you can see below and it doesn't stop there.

     yum install php53
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * rpmforge: mirror.us.leaseweb.net
     * extras: centos.mirror.rafal.ca
     * updates: centos.mirror.nexicom.net
     * base: centos.mirror.nexicom.net
     * addons: centos.mirror.nexicom.net
    Setting up Install Process
    Parsing package install arguments
    Resolving Dependencies
    --> Running transaction check
    ---> Package php53.i386 0:5.3.3-22.el5_10 set to be updated
    --> Processing Dependency: php53-cli = 5.3.3-22.el5_10 for package: php53
    --> Processing Dependency: php53-common = 5.3.3-22.el5_10 for package: php53
    --> Running transaction check
    ---> Package php53-cli.i386 0:5.3.3-22.el5_10 set to be updated
    ---> Package php53-common.i386 0:5.3.3-22.el5_10 set to be updated
    --> Processing Conflict: php53-common conflicts php-common
    --> Restarting Dependency Resolution with new changes.
    --> Running transaction check
    ---> Package php-common.i386 0:5.1.6-43.el5_10 set to be updated
    --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-mysql
    --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-cli
    --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-pdo
    --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-imap
    --> Running transaction check
    ---> Package php-pdo.i386 0:5.1.6-43.el5_10 set to be updated
    ---> Package php-imap.i386 0:5.1.6-43.el5_10 set to be updated
    ---> Package php-mysql.i386 0:5.1.6-43.el5_10 set to be updated
    ---> Package php-cli.i386 0:5.1.6-43.el5_10 set to be updated
    --> Processing Conflict: php53-common conflicts php-common
    --> Finished Dependency Resolution
    php53-common-5.3.3-22.el5_10.i386 from updates has depsolving problems
      --> php53-common conflicts with php-common
    Error: php53-common conflicts with php-common

    Run what is below to avoid dependency hell that I decided not to paste.

    yum -y install package-cleanup
    package-cleanup --problems
    package-cleanup --dupes
    package-cleanup --orphans
    rpm -Va --nofiles --nodigest
    #this fixed it
    yum clean all

    This will require downtime but I couldn't fiind another way that worked:

     echo y|yum remove php-*;echo y|yum install php53*

    yum -x php53-odbc64 install php53*


    Stopping httpd:                                            [FAILED]
    Starting httpd: [Wed Jan 22 16:35:58 2014] [warn] module php5_module is already loaded, skipping
    httpd: Syntax error on line 994 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /www/conf/a*********-best.com.conf: Syntax error on line 1 of /usr/local/zend/etc/sites.d/zend-default-vhost-80.conf: Include directory '/usr/local/zend/etc/sites.d/http/__default__/0' not found
                                                               [FAILED]

    To solve the above you have to remove some weird stuff that Zend adds to your default vhost.

     

    #ZEND-{DC789661BC47C707017CAF9F2BB500D1}
    #Include "/usr/local/zend/etc/sites.d/zend-default-vhost-80.conf"
    #ZEND-{DC789661BC47C707017CAF9F2BB500D1}


    #ZEND-{15168DADCE0E562BD3FC24EB9302589D}
    #Include "/usr/local/zend/etc/sites.d/globals-*.conf"
    #Include "/usr/local/zend/etc/sites.d/vhost_*.conf"
    #ZEND-{15168DADCE0E562BD3FC24EB9302589D}

    Your php.ini will probably be wiped out and overwritten so make sure you enable short tags or PHP code with


    /etc/php.ini
    short_open_tag = On


  • Directadmin Install Error Cannot find /usr/include/openssl/ssl.h. Did you run the pre-install commands?


    Cannot find /usr/include/openssl/ssl.h.
    Did you run the pre-install commands?
    http://help.directadmin.com/item.php?id=354


    yum -y install openssl*


  • cPanel VPS Server Cannot Login as root


    I was worried the server was hacked, I was logged in already as root but couldn't login to CPanel or a new SSH session.  I even reset the password from the shell and it did not work still.

    The reason is CPanel Hulk, it detected a brute-force attack so it locked down the root account entirely even from the correct password.  According to cPanel the best way around this is to whitelist your IP.

    http://forums.cpanel.net/f5/password-not-working-whm-cpanel-root-administrator-297262.html

    I was aware of CPanel Hulk but didn't know it completely locks an account even if the password is correct from non-offending IPs so this is something to be aware of, someone could potentially create a denial of service against any of your services/accounts just be intentionally bruteforcing them.


  • Gnome Terminal Cannot Open Error "There was an error creating the child process for this terminal" "Failed to create pipe for communicating with child process (Too many open files)"


    There was an error creating the child process for this terminal

    Failed to create pipe for communicating with child process (Too many open files)

    I get this when trying to open a new tab or new window even.  I've had far more sessions open (literally dozens) before without getting this error.


  • Howto edit/rotate Samsung/Android Videos in mencoder solution


    Movie-Aspect is undefined - no prescaling applied.
    videocodec: libavcodec (720x1280 fourcc=34504d46 [FMP4])
    [mpeg4 @ 0x2c91c00] timebase not supported by mpeg 4 standard
    Could not open codec.
    FATAL: Cannot initialize video driver.

    That is the error I would get, I thought it was a codec error something else.  By fluke I saw something about ffmpeg where someone recommended manually telling it to the "fps" and it worked.  My phone uses 30fps so I knew to do the following:

    mencoder -fps 30  -vf rotate=1 -o output-copy.avi -nosound -ovc copy 25825.mp4
    All I had to do was specify "-fps 30" and it worked whereas before the resulting video was just 1 frame with nothing basically.

    This seems like it will be common with Samsung phones or maybe a lot of Androids.


  • SSH HowTo Create Port Forwards


    ssh -L 5905:localhost:5900 root@yourserver.com

    The "-L" means to create a port forward to a port on your server.

    The 5905 means the port on your computer that will be used to access the port 5900 on the remote server.

    localhost is the IP that you use to access the port forward (you can change it to 0.0.0.0 which will be all IPs on your system/computer but localhost is good for security and privacy unless a whole network of people need access).


  • /usr/local/cpanel/bin/apache_conf_distiller 100% cpu


    On some CPanel installs we see complaints of "/usr/local/cpanel/bin/apache_conf_distiller" causing 100% cpu usage without any solution.

    Killing the process causes it to spawn again, actually it seems it tends to spawn multiple processes itself.

    Restarting CPanel itself is a temporary but not permanent solution.