How to Install Apache 2.4.37 + PHP 7.3 + MYSQL 8.0.13 on Windows

If you are a PHP/MySQL developer, it is very important to be able to work on your application locally in your own environment, since you can make changes and update to your application quickly and effectively. The instruction below will help you to setup your environment with the latest version of Apache, PHP, and MySQL. For any reasons, you are still using the older versions, you can follow the old setup of Apache, PHP, and MySQL here.

Since I put together that instruction 4 years ago, it no longer works with the newer version of PHP 7.3 and MySQL 8.0.13. So here is the updated instruction:

[Continue Reading…]

Using Webmin to Manage Partition and Drives in Ubuntu Server

  1. Create and mount the volume
    • Create volume:
      • Hardware -> Logical Volume Management -> Logical Volumes -> Create a logical volume in Media-server-vg (your server name)
      • Volume name: ServerData, Click “Create
      • Click on that newly created volume, make sure the drop down selected Linux Native (ext3) and click the Create filesystem of type, Click Create again to create a new empty partition.
    • Mount volume
      • System -> Disk and Network Filesystems
      • Select Linux Native Filesystem (ext3)/New Linux Native Filesystem (ext4) from drop down, and click on “Add mount
      • Select /media or/mnt for Mounted as and then type to finish it as “/media/ServerData” , then click OK
      • Check “LVM logical volume” and select your newly created Logical Volume for Linux Native Filesystem
      • Click “Create“. Your drive is ready to use.
    • Format the volume
  2. Add additional drives
    • Hardware -> Partitions on Local Disks -> select the new “Disk name” – > click on Add primary partition -> Create. You have just created the partition
    • To format, click on your newly created partition -> click on Create Filesystem with the option Linux Native selected -> click Create Filesystem -> Create Create Filesystem.
    • To mount, you did the same as above except this time, you select “Partition with ID” instead of “LVM logical volume“.

How to Install Ubuntu Home Media Server

The following are what I did to install my home media server.

  1. Install Ubuntu Server:
    • Download Ubuntu Server 14.04.1 LTS (LTS version is supported for 5 years)
    • Burn the downloaded Ubuntu Server ISO into a bootable CD.
    • Keyboard, screen, and Ethernet cable plugged into the server are needed.
    • Run the CD and follow the screen instruction to install the server
      • When asked if you want to “configure your home directory for encryption”, select “No
      • When asked “Unmount partitions that are in use?”, select “Yes
      • For Drive Partitions, select “Guided – use entire disk and set up LVM“, then give 30GB for the OS installation
      • For Managing Update, select “No automatic updates
      • For software to install, Select OpenSSH Server & Samba File Server, to select press Spacebar
  2. Upgrade your Ubuntu Server
    sudo apt-get update
    sudo aptitude safe-upgrade

    If you get the error from the above command, use the following command

    sudo apt-get install aptitude

    To check the Ubuntu Server version:

    lsb_release -a

    To reboot the Ubuntu Server:

    sudo reboot -h now
  3. Recommended Software:
    • vim for text editor
      sudo apt-get install vim
  4. To manage Ubuntu Server:
    • Use Putty
    • Use Webmin – The Debian package suitable for Debian, Ubuntu or other derived Linux
      • InstallWebmin
        wget http://prdownloads.sourceforge.net/webadmin/webmin_1.730_all.deb
        sudo apt-get update
        sudo dpkg -i webmin_1.730_all.deb

        If there is errors preventing it from installing, then run the following command line to re-install it automatically:

        sudo apt-get install -f
      • ChangeWebmin root password:
        sudo /usr/share/webmin/changepass.pl /etc/webmin root YourNewPassword
      • DeleteWebmin installation files:
        rm webmin_1.730_all.deb
      • OpenWebmin:
        https://yourserverhostname:10000/
  5. Using Webmin to Manage Partition and Drives in Ubuntu Server
  6. Share Drives and Folders in Ubuntu Server across the Network

PhotoRec – Select Specific Sector

For any reason you want to start PhotoRec at a specific sector. You could do so as follow:

  1. Run PhotoRec, let it run for couple minutes and stop it.
  2. Run PhotoRec again and select “Y” to resume the last session. If this works, stop and quit again.
  3. Open photorec.ses and change the sector range. Each sector range will be on each line. Delete them all and put the range that you wish to search for and save it.
  4. Run PhotoRec again, and put “Y”. It will run for couple seconds to minutes, then switch to your desired range.

This works for me. I hope it works for you as well.

How to Recover Deleted Files using PhotoRec

You accidentally deleted files or formatted your disk or partition. You want to recover your lost files. You could use PhotoRec to recover them. PhotoRec is a powerful file carver which can search bit by bit and ignores the file system and goes after the underlying data, so it will still work even if your media’s file system has been severely damaged or reformatted. The following instruction will help you to recover your lost files.

Step 1: Download PhotoRec

Step 2: Run photorec_win.exe

[Continue Reading…]

How to Install PHP OAuth Library

OAuth is a secure authorization protocol that allows applications to access data without requiring the storage of usernames and passwords. To install the PHP OAuth library, follow these steps:

  • Download the PHP OAuth 1.2.3 DLL Thread Safe (TS) x86.
  • Extract the downloaded file and copy the “php_oauth.dll” file to the “C:\php\ext” directory.
  • Open the php.ini configuration file and add the following line under the windows extensions section, after “;extension=php_xsl.dll
extension=php_oauth.dll
  • Save the changes to the php.ini file, restart the web server, and check the phpinfo() function. The new extension should be listed in its own section.
Page 2 of 2 1 2