Could not open archive dir for / Could not open archive mbox dir

How to fix the errors

Solution

If we have a list named list1_webinformat.com the error is

and we have to create 2 dirs

After we create the needed directories we run 2 commands

Let me know in comments if you need any help or if this helped you.
Happy coding ūüėČ

Hot link protection

Simple hot link protection using .htaccess

  • Replace your-domain with your actual¬†domain name
  • Replace http://your-domain/hotlinkdenied¬†with a valid url

How to fix no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

 

or

and¬†remove “SMB password synchronization”

no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory fix
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory fix

 

Ubuntu 12.04 – service mysql start start: Job failed to start

Recently after a backup restore MySql server failed to start with the following error message:

To fix start: Job failed to start I had to re-install the MySQL server.

I hope you have a backup of your data because you will lose all your MySQL data running the following commands

Ubuntu server no login console

After boot there was no console prompt to login.

The issue was related to the VGA resolution.

To fix Ubuntu server no login console

modify in /etc/default/grub

Of course, you can set resolution to suit your needs by replacing 1024x768x24 to whatever you need.

Check if php-fpm is running and start if it’s not running

There are several solution on how to check if php5-fpm is running but they all failed (link1, link2).
The solution to check if php-fpm is running is to use wget to get a file in your server. If wget fails then restart the service.

This is the script to properly¬†check if php-fpm is running and start php-fpm if it’s not running:

 

WordPress – give contributor permission to upload images without plugin.

WordPress contributor role lacks the permission to upload images.
There are a few plugins that can let you change role permissions, but I just needed to allow contributor role to upload images.

One minor change in the theme’s functions file is sufficient to give WordPress contributor role the permission to upload & insert images without plugin:

Get column names from table in MySql > 5

The following query will get column names from table in MySql > 5

where

  • database_name is your database
  • table_name is your table