Skip to main content

Posts

HHVM PHP Convert to ByteCode Building the Repo and Deployment Process

Step 1: Manually Building the Repo.          Two type method of building the Repo. :- Sub Step 1:  Everything Under a Root  To build a repo including all files recursively under /path/to/root, invoke HHVM like this: $ sudo hhvm --hphp -t hhbc -v AllVolatile=true --input-dir /var/www/html Sub Step 2:  Manual List of Files Instead of a directory, you can also pass it an explicit list of filenames to put in the repo or a master file that contains all of the files, one per line, that should be put in the repo. (Keep in mind that the commands below are generating two separate repos -- you can't add to or remove from a repo once it's been generated!) $ sudo hhvm --hphp -t hhbc -v AllVolatile=true test.php OR  $ sudo hhvm --hphp -t hhbc -v AllVolatile=true --input-list test.txt Example : The test.txt should look like this : /var/www/html/index.php /var/www/html/isrc/a.php /var/www/html/isrc/b.php /var/...

Install HHVM (HipHop Virtual Machine) On Ubuntu 14.04 Using Apache Or Nginx

Step 1 First we need to add the HHVM key to your Ubuntu Server with the following command: $ sudo wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add - Step 2  Next we are going to add the HHVM source to your sources list with the following command: $ sudo echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list Step 3  Now that we added the key and sources it is a good idea to run and update with the following command: $ sudo apt-get update Step 4  Now we can install HHVM with the following command: $ sudo apt-get install hhvm Step 5   Make it start on boot by running the command: $ sudo update-rc.d hhvm defaults Step 6  HHVM includes an excellent script to install FastCGI based on web server you have installed. Run it with the following command: $ sudo /usr/share/hhvm/install_fastcgi.sh Step 7  Note: On Apache there have been issues with hhvm_proxy_fcgi.conf not matching the defaul...

How to Install Mantisbt Bug Tracker On Ubuntu & Windows

Ubuntu 16.04 :- MantisBT is an open source issue tracker.We will look at installation of Mantis on ubuntu 16.04 OS. You can download mantis from This download contains a zip file containg the php code for mantis Extract the zip file and Copy the directory to  /var/www/html/mantis directory sudo unzip mantisbt-2.4.0.zip mv mantisbt-2.4.0 /var/www/html/mantis Pre Requisites mantis requires the mbstring module of php . Run the following command to install and enable the same sudo apt-get install libapache2-mod-php5 sudo apt-get install php5 libapache2-mod-php5 sudo php5enmod mbstring sudo apt-get install php5-mysql sudo apt-get install php5-xcache Access the url from the webbrowser to initiate the setup http://localhost/mantis/admin/install.php Enter the server and database details and click on “Install/Upgrade” button to finish installation This will do the necessary installation. To access mantis login page access the url http://localhost/mantisbt/log...

How to Reset a MySQL root password

The MySQL root password allows the root user to have full access to the MySQL database. You must have (Linux) root or (Windows) administrator access to the Cloud Server to reset the MySQL root password. (A.) Reset a MySQL root password c ommand line  :- Step (1.) Stop the MySQL service (Ubuntu and Debian) Run the following command: sudo /etc/init.d/mysql stop OR sudo /etc/init.d/mysqld stop Step (2.) Start MySQL without a password Run the following command. The ampersand (&) at the end of the command is required sudo mysqld_safe --skip-grant-tables & Step (3.) Connect to MySQL Run the following command: mysql -uroot Step (4.) Set a new MySQL root password Run the following command: use mysql; update user set password = PASSWORD ("newpassword") where User='root';  flush privileges;  quit Error : - ERROR 1045 (28000): Access denied for user 'root'@'localhost' I also tried to start with mysql_safe (error.lo...

How to Allow Cross Domain Ajax Requests

ENABLE CROSS-DOMAIN   Browser does not allow cross domain AJAX requests due to security issues. Cross-domain requests are allowed only if the server specifies same origin security policy. To enable CORS, You need to specify below HTTP headers in the server. Access-Control-Allow-Origin – Name of the domain allowed for cross domain requests. * indicates all domains are allowed. Access-Control-Allow-Methods – List of HTTP methods can be used during request. Access-Control-Allow-Headers – List of HTTP headers can be used during request. In PHP, you can use the below code to set the headers. header('Access-Control-Allow-Origin: *'); //I have also tried the * wildcard and get the same response header("Access-Control-Allow-Credentials: true"); header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS'); header('Access-Control-Max-Age: 1000'); header('Access-Control-Allow-Headers: Content-Type, Content-Range, Content-Di...

How To Create a New User In OrientDB

Step (1.) Console - conn the Console starts in interactive mode. In this mode, the Console loads to an orientdb>prompt. From there you can execute commands and SQL statements as you might expect in any other database console. cd /opt/orientdb/bin/ ./console.sh OrientDB console v.X.X.X (build 0) www.orientdb.com Type 'HELP' to display all the commands supported. Installing extensions for GREMLIN language v.X.X.X orientdb> Step (2.) Connect to a remote database: Creates a user in the current database, using the specified password and an optional role. When the role is unspecified, it defaults to writer CONNECT REMOTE:localhost/<database_name> <user> <password> orientdb> CONNECT REMOTE:192.168.1.1/GratefulDeadConcerts admin my_admin_password Connecting to database [remote:192.168.1.1/GratefulDeadConcerts]...OK Step (3.) Create User Creates a user in the current database, using the specified password and an optional role. When the role is unspec...

How To Create a New User and Grant Permissions in MySQL

Step (1.) How to Create a New User :- we did all of the editing in MySQL as the root user, with full access to all of the databases. However, in the cases where more restrictions may be required, there are ways to create users with custom permissions. Let’s start by making a new user within the MySQL shell: CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; this point new user has no permissions to do anything with the databases. In fact, if new user even tries to login (with the password, password), they will not be able to reach the MySQL shell. Therefore, the first thing to do is to provide the user with access to the information they will need. GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; The asterisks in this command refer to the database and table (respectively) that they can access—this specific command allows to the user to read, edit, execute and perform all tasks across all the databases and tables....