Posts

Showing posts from November, 2017

How to delete a user in linux

Step 1: Delete the User userdel myuser If you want to remove all of the files for the user, then use -r: userdel -r myuser Step 2: Remove Root Privileges to the User visudo Find the following code: ## Allow root to run any commands anywhere root ALL=(ALL) ALL myuser ALL=(ALL) ALL In this case, we’re removing root privileges from the user mynewuser . Remove the following: myuser ALL=(ALL) ALL Then exit and save the file with the command : wq . How can I delete a user in linux when the system says its currently used in a process First use pkill or kill -9 <pid> to kill the process. Then use following userdel command to delete user, userdel -f cafe_fixer   According to userdel man page: -f, --force This option forces the removal of the user account, even if the user is still logged in. It also forces userdel to remove the user's home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user. If USERGRO...

Laravel 5 clear cache from route, view, config and all cache data from application

Reoptimized class loader: php artisan optimize Clear Cache facade value: php artisan cache:clear Clear Route cache: php artisan route:cache Clear View cache: php artisan view:clear Clear Config cache: php artisan config:cache Reference Link / More information : https://laravel.com/docs/5.5/cache

How to activate account when error "account pending" keeps occurring?

I tried to add another user as a moderator and this error keeps occurring: ACCOUNT PENDING: Your account is currently not active. An administrator needs to activate your account before you can login. Here is one of the solution (not an exact) Depending on your security plugin (I use All in One WP Security), I had to manually approve the newly-registered users in WP Security > User Registration.

404 not found on this server in wordpress

404 not found , the requested URL <<url name>> not found on this server in wordpress This is not the exact solution I recently moved my wordpress site to another server, In that time I am faced this 404 error I tried the below procedure, It was successfully worked for me To fix that, edit you httpd.conf (usually it is in /etc/apache2 and centos it is in /etc/httpd/conf), find <Directory "path/to/your/document/root">        # ....      AllowOverride None     # .... </Directory> and change AllowOverride None to AllowOverride All Then restart your web server and try again.

How to Move a Live WordPress Site to Local Server with out using any plugin

You would need is to back up your website manually. Export your WordPress database. phpMyAdmin is recommend or your own choice To export your live site’s WordPress database, you need to log into your cPanel dashboard and click on phpMyAdmin. Inside phpMyAdmin you need to select the database you want to export and then click on the export tab on the top. phpMyAdmin will now ask you to choose either quick or custom export method. We recommend using custom method and choosing zip as the compression method. Sometimes WordPress plugins can create their own tables inside your WordPress database. If you are not using that plugin anymore, then the custom method allows you to exclude those tables. Leave rest of the options as they are and click on the Go button to download your database backup in zip format. Once you have downloaded your database backup, the next step is to download your WordPress files. To do that you need to connect to your WordPress site using an FTP client like Filezilla. D...

Database general error: 2006 MySQL server has gone away

This MySQL/MariaDB error: Error: 2006 - MySQL server has gone away This error is caused by an insufficiently large max_allowed_packet setting in your MySQL server's my.cnf file. Solution : Increase max_allowed_packet variable. Note: Make sure the variable is under [mysqld] section, not [mysql]. file path in linux OS : /etc/my.cnf if you couldn't found the line in file simple add under the [mysqld] section max_allowed_packet=64M Note : Don't forgot to restart mysql and apache server   MySQL/MariaDB Restart     sudo systemctl restart mariadb apache server restart    systemctl restart httpd

How to get POST request variables in laravel

Take a look at the $_GET and $_REQUEST superglobals. Something like the following would work for your example: $start = $_GET['start']; $limit = $_GET['limit']; 1. This is one way to get the POST request variables use class on your controller method  The incoming request instance will automatically be injected by the service container:  use Illuminate\Http\Request;  $start = $request->input('start'); $limit = $request->input('limit'); see also : https://laravel.com/docs/5.5/requests#accessing-the-request 2. The another way to get the POST request variables you need to use Input::get(), e.g., use class on your controller method   use Illuminate\Support\Facades\Input; $start = Input::get('start'); $limit = Input::get('limit');  

How to change root password on Centos 7

Command for changing the root user password   passwd root when you type and hit the enter button in your terminal it will the prompt like this Changing password for user root. New password: Retype new password: once you change/update your password it shows the message like this passwd: all authentication tokens updated successfully.