Ubuntu20.04 Install Apache PHP MySQL on Digital Ocean Droplet

First create a Digital Ocean Droplet with OS Ubuntu20.04, choose password login for SSH into droplet. # apt update # apt install unzip -y # apt install curl -y Install Apache & MySQL Server # apt install apache2 -y # apt install mysql-server -y # mysql_secure_installation (it will ask you MySQL server login new password) … Read more

Serverless Radio

Welcome to really new Idea of Radio Streaming where no VPS or SSH required. Yes, it’s Serverless Radio. Serverless Radio Player provides JavaScript Radio Linear Audio (MP3) Stream like AutoDJ for your Internet Radio Listeners anywhere in the world. Serverless Radio don’t need any VPS or Dedicated Server to install & configure Radio Server or … Read more

Fatal error: Call to undefined function mysql_query() – PHP

I was working on my old project it was using old mysql extension function for PHP, but Server have latest PHP version 7. So I am getting below Errors…. Fatal error: Call to undefined function mysql_query() – PHP Fatal Error: Uncaught error: Call to undefined function mysql_connect() Here is quick & dirty fix for old … Read more

Installing Gender PHP Extension

Gender PHP extension is “gender.c” part program written by Joerg Michael. PHP gender extension finds gender from firstnames using gender database contains > 40000 firstnames for 54 countries. >> CentOS Linux release 7.4.1708 (Core) PHP 7.2 # yum –enablerepo=remi install php72-php-pecl-gender I am using Nginx with PHP 7.2 Check files exists # ll /etc/opt/remi/php72/php.d/40-gender.ini # … Read more

Send AWS SES Email attachments using Mail_Mime and AWS SDK PHAR for PHP

AWS SES allow AWS users to send emails with attachment using PEAR Mail_Mime, it will generate / manually chunking the raw message to pass it along to the AWS SDK for PHP PHAR “aws.phar”. First you need to request Amazon Web Services Support to increase your email sending quota per day in some AWS Region. … Read more

Convert AWS DynamoDB Table JSON to Simple PHP Array or JSON

Amazon DynamoDB support these datatype for data – String – Binary – Number – StringSet – NumberSet – BinarySet – Map – List – Boolean – Null AWS provides command line tool to SCAN DynamoDB Tables and export as JSON file # /usr/local/bin/aws dynamodb scan –table-name Users –query ‘Items[*]’ –region us-east-1 –output json Amazon DynamoDB … Read more

PHP Parse HLS M3U8 TS Links

Sometimes you have to grab HLS m3u8 files from external source, but those files are protected using domain lock. So somehow you need to grab m3u8 and ts files from master HLS link. I am providing you PHP HLS Parser to grab internal information of HLS streams. Input encoded-03-31-16-thu-jun-2017.m3u8 #EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=654000,RESOLUTION=568×320,CODECS=”avc1.4d0029,mp4a.40.2″ 1080p/encoded-03-31-16-thu-jun-2017.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2849000,RESOLUTION=568×320,CODECS=”avc1.42001f,mp4a.40.2″ 720p/encoded-03-31-16-thu-jun-2017.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1033000,RESOLUTION=568×320,CODECS=”avc1.42001e,mp4a.40.2″ … Read more

PHP in Amazon Lambda

Clone or Download this GitHub Repo https://github.com/svnlabs/aws-lambda-php-template Make new folder lambda in current working directory of EC2 server # mkdir lambda Upload 2 files from zip to Amazon EC2 server Instance in folder lambda lambda – index.js – php (binary) index.js ‘use strict’; exports.handler = function(event, context, callback) { var exec = require(‘child_process’).exec; exec(‘./php -v’, … Read more

Free SSL Certbot

Certbot, It was Let’s Encrypt Client previously. Automatically enable HTTPS on your website with EFF’s Certbot, deploying Let’s Encrypt certificates. Server Support – Apache – Nginx – Haproxy – Plesk OS Support – Web Hosting Service – Debian 7 (wheezy) – Debian 8 (jessie) – Debian 9 (stretch) – Debian testing/unstable – Debian (other) – … 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