Weird 404 and .htaccess not working properly – cpanel

Took a HUGE time to figure out why my .htaccess rules weren’t working on a CPanel environment.

Like I said on the previous post, CPanel requires the right file permissions on folders and files.

[Tue Jan 06 12:19:40 2015] [crit] [client 84.XX.XX.XXX] (13)Permission denied: /home/asiandee/subdomains/www.domain.com/folder/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

folder has to be with 755
and .htaccess has to be with 644

 

More readings

 

 

 

PHP – 500 internal server error – cPanel

I’v been struggling for hours to solve a weird problem with PHP in a cPanel environment.

This is how my log (/usr/local/apache/logs/error_log) looks like

[Tue Dec 30 21:13:09 2014] [error] [client 88.94.5.xxx] SoftException in Application.cpp:601: Directory "/home/dee/subdomains/www2.domain.com/members" is writeable by group
[Tue Dec 30 21:13:09 2014] [error] [client 88.94.5.XXX] Premature end of script headers: index.php
[Tue Dec 30 21:13:09 2014] [error] [client 88.94.5.XXX] File does not exist: /home/dee/subdomains/www2.domain.com/500.shtml

I thought that was some bad configuration on .htaccess … but that was wrong!
On some environments we need to have the right file/directory permissions so it work…

  • files: 644
  • directories: 755

Continue reading

Install FFMPEG on Centos / CPanel FFmpeg Static Builds

Download the latest FFmpeg Static Builds from http://johnvansickle.com/ffmpeg/.

How to know if we need to download the 32 or 64 bits?
Lets run:

cat /etc/*release*
CentOS release 6.6 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

Or using uname (more reliable)

uname -m

I’v download it do a specific folder and the run the following command to uncompress it:

tar xf ffmpeg-git-20141229-64bit-static.tar.xz

To run ffmpeg or ffprobe we need to give the full path to them!

It worked!
With the lastest versions!
FFMPEG & FFPROBE

ROCK!

PHP DropBox Backup Uploader: Backup local files as a ZIP archive to Dropbox

 

This class can backup local files as a ZIP archive sent to Dropbox

It handles the OAuth authorization process to obtain a token to access an API on behalf of the current Web user.

The class create a ZIP archive with files from a directory to backup.

The ZIP archive is sent to the DropBox server using requests sent to is API.

http://www.phpclasses.org/package/8922-PHP-Backup-local-files-as-a-ZIP-archive-to-Dropbox.html