All posts by PF

cronjob – emails to /dev/null or /dev/null 2>&1

We can send the output of our cron jobs to /dev/null, but this way error and other debug messages aren’t lost and we will be notified when the occur!

If you don’t want to receive them add  2>&1 to it.

* * * * * /bin/ping -c 10 www.digitalwhores.net > /dev/null 2>&1 – no emails will be sent
* * * * * /bin/ping -c 10 www.digitalwhores.net > /dev/null – error and debug messages will be sent.

Peace.

nignx timeouts

Some tweaks to avoid times out on nginx/php.

Add the following lines to your nginx.conf  (mine is /etc/nginx/nginx.conf) inside http { 

client_header_timeout 3000;
client_body_timeout 3000;
fastcgi_read_timeout 3000;
client_max_body_size 32m;
fastcgi_buffers 8 128k;
fastcgi_buffer_size 128k;

Lets hope it solves it…

WordPress – languages, translations – edit them!

I’m using Poedit to make the translations.
You can download it from their official website http://www.poedit.net/.

Well, lets start!

Locate your .po file of your theme folder.
I had to make some changes on it, with a text editor – I used coda -.
I had to change the “X-Poedit-SearchPath-0” to my correct path one or poedit crashed.

Make the translations!
You can hit Validate and Update but only when you close Poeditor the .mo file is updated!

I’v uploaded the new file to my theme_name/languages/ folder under pt_PT.po and pt_PT.mo.

This way I was seeing the translated items in the Admin board etc.

 

Linux add user and change its home dir

I usually need to create Linux users for FTP access…
FTP is unsecure, we should use sftp bla bla blaa…

Add user
useradd username
Set/change password
passwd username
Set user’s home dir
usermod -m -d /new/path/ username

This way we will set the new path (/new/path/) to the user named username.

-m defines that content from the old home directory will be mobed to the new one.
-d the new home dir’s path

 See user’s information
finger username

 

 

Directory Lister

 Simple Installation

Our clear and simple installation instructions will help you get up and running with Directory Lister in minutes.

 List Any Directory

Upload files to any web-accessible directory and Direcectory Lister will generate listings for you on-the-fly.

 Customizable

Theme support is built in to fit your uniqe style. Control your listing with custom sort ordering of files/folders.

 Hidden Files

Don’t want to share everything with the world? Easily define hidden files to be excluded from your listings.

ionCube loader on Ubuntu 13.10 64bits with PHP-FPM and nginx

rock ssd

Site error: the file /data/httpd/domain.com/public_html/application/controllers/frontpage.php requires the ionCube PHP Loader ioncube_loader_lin_5.6.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.

1. Download the following archives of Loaders for Linux x86-64
cd /usr/local
sudo wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz

 

2. Copy or move the Loader files

PHP modules’ folder can be found using

php -i | grep extension_dir

Example of an output
Example of an output 

mv /usr/local/ioncube/* /usr/lib/php/20151012/

font-family – social icons

Found a nice font-face of social icons!

MONO SOCIAL ICONS FONT

It’s free for whatever use ( commercial or personal ), both for web or for printing purpose. Licensed under the Open Font License. It is also hosted on GitHub.

This font is based on Mono Social Icons byIconDock and Double-J Design. It adds two more icons to the set : Google Plus andGitHub Alternative Icon.

See it: http://drinchev.github.io/monosocialiconsfont/