0 */3 * * *Would be passed like this to the URL:
mkdirwhich allows it to recurse into any child folders and remove them as well if they are empty (it will throw an error if not empty). Handy if you have a folder structure a few levels deep that is empty and want to quickly remove all the folders in one hit. By the way if you didn’t know about
mkdir -pit will let you create directories recursively as many levels deep as you need e.g.
mkdir -p level1\level2\level3
There are many reasons for this, so first check that MySQL/MariaDB is running properly, that you are using the correct credentials and that the the appropriate
user@localhost has access.
Also check you aren’t using
bind-address in your
my.cnf file if accessing from outside of the
localhost. These are things you will find with a google search.
Apart from this one other reason why
127.0.0.1 will work and
localhost will not work is if you are using something other than the default
socket=/var/lib/mysql/mysql.sock location in your my.cnf.
If that is the case, you’ll need to update the relevant
default_socket= parameter in
php.ini (for each driver) to match that socket – see the entries under
[mysqld] sections for the socket parameter. This is more likely to occur if you are using MariaDB for example.
Unfortunately you can’t do this the same way as an apache configtest, but there are a few sites out there to validate .htaccess files:
I use this one:
Just a good idea to check before deploying and nuking your site!
Here’s a pretty nice combination of parameters for command line grep using egrep (which supports regex):
egrep -rHnC1 "bprajb"
This will search in the current directory recursively through all files that match the word “praj” (regex boundary b tags) and return the file name and context (1 line either side of the match) with line numbers.
For example here’s the resut with the matching word highlighted as well on the terminal.
You can add the following to your
.vimrc file to force the vim background to match the terminal background (e.g. black):
highlight Normal ctermbg=None
Here’s one method of comparing strings by case in MySQL. You can use the md5 function to hash the string and compare to its lower case value.
This example is for checking for usernames that are not lower case in moodle.
select username, md5(username), md5(lower(username)) from mdl_user where deleted = 0 and suspended = 0 and md5(username) != md5(lower(username));
If the md5 hash when the string is lower cased is different to the current md5 hash you will get a result.