CyberKeeda In Social Media
Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Create Oracle Virtualbox Guest Machines from Browsers



Install phpVirtualBox in Ubuntu 16.04 LTS

Video Tutorial.

It's a webbased tool, we need to install Apache HTTPD webserver, PHP and some additional php modules.
Lets go ahead.
  • Install Mandatory packages.
cybeerkeeda@Linux-Maniac:~ sudo apt-get install apache2 php php-mysql libapache2-mod-php php-soap php-xml
  • Download the phpVirtualBox latest version from phpVirtualBox download page.
cybeerkeeda@Linux-Maniac:~ cd /tmp wget
  • Unzip it.
cybeerkeeda@Linux-Maniac:~ unzip
cybeerkeeda@Linux-Maniac:~ mv phpvirtualbox-5.0-5  phpvirtualbox
  • Move the extracted phvirtualbox folder to your apache webserver root folder.
cybeerkeeda@Linux-Maniac:~ mv phpvirtualbox  /var/www/html/
  • Assign the proper permissions to the phpvirtualbox folder.
cybeerkeeda@Linux-Maniac:~ chmod 777 /var/www/html/phpvirtualbox/
  • Configure phpVirtualBox.

Copy the sample config file as shown below.
cybeerkeeda@Linux-Maniac:~ cvar/www/html/phpvirtualbox/config.php-example var/www/html/phpvirtualbox/config.php 
  • Edit phpVirtualBox config.php file:

cybeerkeeda@Linux-Maniac:~vim /var/www/html/phpvirtualbox/config.php

Find the following lines and replace the
username and password with your system user 

In my case, my username is kunal, and password is redhat.

var $username = 'kunal';
var $password = 'redhat';

Save and close the file.

Create a new file called /etc/default/virtualbox:

cybeerkeeda@Linux-Maniac:~vim /etc/default/virtualbox

Add the following line. Replace ‘kunal’ with your own username.


Finally, Reboot your system or restart all services to complete the configuration.

sudo systemctl restart vboxweb-service
sudo systemctl restart vboxdrv
sudo systemctl restart apache2

You can disable the authentication mechanism.

// Disable authentication
var $noAuth = true;

I will open it directly from my browser without any authentication.

Here we go.. We have installed it..
Read more ...

SOLVED PHP Installed but still php : command not found

I have encountered the problem while upgrading PHP version from 5.3 to 5.4 or 5.5

By default RHEL keeps its stable version of PHP within system, even after upgradation.
This is the reason why it show the default last version even after upgrading.

cybeerkeeda@Linux-Maniac:~ php -v
PHP 5.3.3 (cli) (built: Nov 29 2012 14:12:23)
Copyright (c) 1997-2010 The PHP Group

But Wait... we know we have upgraded the version of PHP to 5.4

For some user , while running the same command , it shows command not found

cybeerkeeda@Linux-Maniac:~ php -v
bash: php: command not found

Fix : Fix it permanently by enabling it by sourcing the path.

cybeerkeeda@Linux-Maniac:~ source /opt/rh/php54/enable
Run again the php command to verify
cybeerkeeda@Linux-Maniac:~ php -v

PHP 5.4.14 (cli) (built: May 23 2013 15:42:19)
Copyright (c) 1997-2013 The PHP Group

Hope it gonna work for you too.

Read more ...

PHP How to install, configure and enable ZIP Extension from source code within centos / rhel 6

So Enabling ZIP within PHP 5.6 dose not meet with the common approach of enabling a extension, Since it requires the libzip packages with a greater version of 0.11 or more.

RHEL ships libzip greater then 0.9 with RHEL 7.3 or more, hence the approach for enabling this must be slight different.

To avoid these challenges, we must go the way of installation of modules using PECL

Download Packages as required from --

Here I have downloaded     zip-1.11.0.tgz

Now just execute the below mentioned PECL command.

# pecl install zip-1.11.0.tgz

# pecl uninstall XXXX

Though it will guide it to rest of the work but still I too want to add.

Locate your php.ini file and the

You should add "" to php.ini

Once you are done, remember to reload/restart apache to apply the effect / changes.

Verify -: You should see, something like below within your phpinfo.php page

Read more ...

configure: error: and their fixes for RHEL / CentOS

This post is dedicated to the various config errors that we encounter while compiling any specific software from source code, the application / software may be different.
But their errors and fixes are same for everyone.

Here are some config errors and their fixes.

  • configure: error: mcrypt.h not found. Please reinstall libmcrypt

   #  yum install libmcrypt
    #   yum install  libmcrypt-devel

For Ubuntu
   #  sudo apt-get install libmcrypt-dev

   #  sudo apt-get install libmcrypt
  • configure: error: xml2-config not found. Please check your libxml2 installation

   #  yum install libxml2
    #   yum install libxml2-devel

For Ubuntu
   #  sudo apt-get install libxml2*

  • configure: error: Please reinstall the libcurl distribution – easy.h should be in /include/curl/


   #  yum install curl-devel
    #   yum install curl

For Ubuntu
   #  sudo apt-get install curl-dev

Read more ...

How to Install OCi8 extension within PHP and Apache

Necessity is the mother of Invention ( * googling ).

I get to know this how to install oci8 from various blogs and forums, hence consolidated all the points from different blogs and forums, so that you don't have to look for it.

Oracle extension has a dependency of Oracle Client Packages.

Download the oracle client packages from Oracle Offcl website

I have downloaded the below mentioned packages


Ignore the package conflicts between old and new, hence use U with rpm

# rpm -Uvh oracle-instantclient12.1-basic-
# rpm -Uvh  oracle-instantclient12.1-basic-

Same way, install the remaining packages too.

Once done, confirm the ORACLE_HOME as it will be required for oci8 installation


If it shows the old versions path as 10.1 or 9.01 path or any other, atleast for the installation we have to set the path temporarily to new location where Oracle client package exists

Set environment variable temporarily for Oracle clinet 12 version

# export ORACLE_HOME="/usr/lib/oracle/12.1/client64/"

Verify using command


It must show  /usr/lib/oracle/12.1/client64/

-* It might be even required to set the set the LD_LIBRARY_PATH

# export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib

*** Remember it is temporary environment variable not permanent, once user exits from the terminal it will show the permanent path

You can set the permanent path in bash environment files.

Installation of oci8 package from PECL.
Now Download the oci8 packages from Pecl official website

Remember, you must download the linux package with an extension of tgz else pecl will not recognize the package provided to it for installation.

Run the last command to install and enable oci8 extension.
# pecl install  oci8-2.0.5.tgz 

If the installation completed successfully, locate your php.ini and add the following line.

#locate php.ini

In my case, i found it within /usr/local/lib/php.ini, run the below command to add the above line

# echo "" >>  php.ini

That’s it !!! Enough

But for me, it was not even enough for the installation I got some additional errors as

checking Oracle ORACLE_HOME install directory... /usr/lib/oracle/12.1/client64/lib/
checking ORACLE_HOME library validity... configure: error: Expected an ORACLE_HOME top level directory but /usr/lib/oracle/12.1/client64/lib/ appears to be an Instant Client directory. Try --with-oci8=instantclient,/usr/lib/oracle/12.1/client64/lib/
ERROR: `/var/tmp/oci8/configure --with-oci8=/usr/lib/oracle/12.1/client64/lib/' failed

Here is the fix for it, again a temporary path for PECL

# echo "instantclient,/usr/lib/oracle/12.1/client64/lib" | pecl install oci8-2.0.5.tgz

Here I just passed , what it is asking for :)

Confirm the same, using phpinfo.php page you must get a category of oci8 extension like the below mentioned screenshot.

Read more ...
Designed By Jackuna