PHP Warning: shell_exec() has been disabled for security reasons
To start shell command execution in php code you need to edit php.ini and remove "shell_exec" from disable_functions line. below is the example of line
disable_functions = show_source,system,shell_exec,proc_open
to
disable_functions = show_source,system,proc_open
After remove...
Thursday, 20 August 2015
Wednesday, 6 May 2015
Creating a Redhat package repository
First check the repolist with below command.
# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.repolist: 0
Run below command to check your CD or ISO file mounted on you machine.
# mount |...
Monday, 4 May 2015
PDOException: SQLSTATE[42000]: 1148 The used command is not allowed with this MySQL version in AWS RDS
To Resolve this error you have to connect mysql with below command then you can able to run LOCAL INFILE command in mysql console or drupal.
# mysql --local-infile=1 -h rds-amazon-url.com -uroot -p
Now you can able to run LOCAL INFILE command in RDS.
#mysql>LOAD DATA LOCAL INFILE '/tmp/foo.txt' INTO TABLE foo COLUMNS TERMINATED BY '\t';
...
Thursday, 30 April 2015
How to run a simple PHP web server
# php -S localhost:8000 -t /path/to/folder/directory
Above command give output like below
PHP 5.6.4-4ubuntu6 Development Server started at Thu Apr 30 15:10:00 2015
Listening on http://localhost:8000
Document root is /var/www/html
Press Ctrl-C to quit.
Now you can open the localhost:8000 in your browser to check the webpage...
Wednesday, 22 April 2015
Install apache2 Webserver, php5 and php module with script for beginner
Install apache2 Webserver with script for beginner
Find the script to install apache2 Webserver and php5 with php modules like cgi php5-mcrypt php5-mysql php-pear php5-gd php5-curl php5-cgi php5-cli php5-common php5-json php5-memcache php5-memcached
Click to Download Scri...
Tuesday, 21 April 2015
Use PHP5-FPM with Apache 2 on Ubuntu 14.04
Install Apache by following command #sudo apt-get update #sudo apt-get install apache2-mpm-eventTo use PHP5-FPM with Apache, we need to install libapache2-mod-fastcgi module. The libapache2-mod-fastcgi module is not available in the Ubuntu package. Therefore, we need to update the apt sources. Follow these steps. ...
Tuesday, 7 April 2015
Give permission yo users to run command with SUDO
All linux user got this error while run command with restricted user.
"User not in the sudoers file. This incident will be reported"
To provide permission to user to run command with SUDO, Do as followed
#sudo /usr/sbin/visudo or visudo
Find below line,
"# Allow members of group sudo to execute any command"
Then add below...
Create SFTP User with chroot in AWS EC2
Create User with below command
#adduser --shell=/bin/false theitideas
Provide permission of home directory
#chown root:theitideas /home/theitideas/
#chmod 755 /home/theitideas/
Create Folder to be access via sftp and provide permission
#mkdir /home/theitideas/workspace
#chown theitideas:theitideas /home/theitideas/workspace/
#chmod 755 /home/theitideas/workspace/
Generate...
Saturday, 4 April 2015
How to Delete ElasticBeanstalk bucket
How to Delete ElasticBeanstalk bucket.
If you can’t delete Elastic Beanstalk created bucket, first remove all files inside the bucket then remove the bucket policy.
Go to the bucket’s policy (bucket –> properties –> permissions –> edit bucket policy)
Save the change to the Bucket Policy.
Now right click on the bucket and press delet...
Wednesday, 1 April 2015
How to Use Python ‘SimpleHTTPServer’ to Serve Files Instantly
How to Use Python ‘SimpleHTTPServer’ to Serve Files Instantlyfirst check is python available or not.
#python –VIf command return version means you have python installed.Now reach to your source folder which you wants to serve via http to others. like below#cd theitideas <---- folder
Then enter below command to start serve your source...
Tuesday, 31 March 2015
Create new user in AWS EC2
Create new user in AWS EC2
First of all user in your Instance
#sudo su
#adduser theitideas <-- keep password with you to fire command with sudo
Login with new user
#su theitideas
Generate private and public key for new user.
#ssh-keygen -t rsa
#cd /home/theitideas/.ssh/
#touch authorized_keys
#cat id_rsa.pub > authorized_keys
#exit
Make...