Install SSH2 Extension for PHP 7 on CentOS 7

Install gcc, php71w-devel, libssh2 and libssh2-devel on CentOS 7 # yum install gcc php71w-devel libssh2 libssh2-devel Download php7 pecl-networking-ssh2 # wget https://github.com/Sean-Der/pecl-networking-ssh2/archive/php7.zip Unzip and Change folder # unzip php7.zip # cd pecl-networking-ssh2-php7 Building environment for SSH2 extension # phpize # ./configure Make SSH2 extension make sure build success # make Install SSH2 extension # make … Read more

Install Ruby Slate NodeJS on CentOS 7

Slate is Beautiful static documentation for your API Required – Linux or OS X or Windows – Ruby version 2.3.1 or newer – NodeJS – Bundler — gem install bundler # cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) Install Ruby 2.4 – CentOS 7 # yum update # yum groupinstall “Development Tools” # yum install … Read more

PHP Warning: PHP Startup: Unable to load dynamic library /usr/lib64/php/ modules/zip.so

CentOS 7 with PHP # php –ini PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/zip.so’ – /usr/lib64/php/modules/zip.so: undefined symbol: php_pcre_exec in Unknown on line 0 Configuration File (php.ini) Path: /etc Loaded Configuration File: /etc/php.ini Scan for additional .ini files in: /etc/php.d Additional .ini files parsed: /etc/php.d/10-opcache.ini, /etc/php.d/20-bcmath.ini, /etc/php.d/20-bz2.ini, /etc/php.d/20-calendar.ini, . . . Install … Read more

Install Apache, MySQL, PHP 5.6 on Centos 7

Install Apache # yum update # yum install httpd # systemctl start httpd.service Now Browser your Apache Server http://Server_IP_address/ Enable Apache to start at server boot # systemctl enable httpd.service Install Mariadb MySQL # yum install mariadb-server mariadb # systemctl start mariadb # mysql_secure_installation Enable MySQL to start at server boot # systemctl enable mariadb.service … Read more

CentOS 7 + SELinux + Apache + PHP write/access permission

CentOS 7 have SELinux, it is security enhancement to Linux which allows users more control over access control. SELinux make problem to access or write files or directories – Can’t serve files on directory – Can’t write to file SELinux is blocking the read/write operations # chcon -Rv –type=httpd_sys_rw_content_t /var/www/html/ (if you want to allow … Read more

Creating Zip Without Recording ROOT Paths

Simply use chdir() to change the working directory before you exec() Or you can use …. exec(“cd /var/www/html/media; zip -r -9 Media.zip . 2>&1”, $log); exec(“mv /var/www/html/media/Media.zip /var/www/html/Media.zip”); Get zip file size exec(“ls -ls /var/www/html/Media.zip | awk ‘{print $6}’ 2>&1”, $size); $zipsize = implode(” “, $size); Without this solution Length Date Time Name ——– —- … Read more

PHP Run Background Process using Exec

If you need to start process in background and get its PID to manage it later using PHP. <?php function runInBackground($command,$log,$priority=0) { if($priority)    $PID=shell_exec(“nohup nice -n $priority $command > $log 2>&1 & echo $!”); else    $PID=shell_exec(“nohup $command > $log 2>&1 & echo $!”); return($PID); } ?> echo $! will return process ID # Command & … Read more

Install Apache, PHP, MySQL on HP Cloud

I am playing with all cloud services these days, so today we will try to setup Apache, PHP, MySQL on HP Cloud. HP Cloud is based on OpenStack Compute Hope you already read our old article “Installing Apache, MySQL, PHP in CentOS 5.5 on Rackspace Cloud”? In the HP Cloud Console Area you can manage … Read more

FFmpeg – ERROR: librtmp not found

I was installing FFmpeg for segmenting Red5 Streams to stream live video from Red5 Server to iOS or Android devices. RTMP (Red5) -> FFMpeg -> Segementer -> .ts files -> iOS (m3u8) I really needed mp4 (AAC/H.264) and ogg (Vorbis/Theora) format for best HTML5 output. I checkout FFmpeg source and tryed below command to install … Read more