PHP
How to update php cli in DirectAdmin
Check the current version PHP CLI version in shell From the official DirectAdmin help page ,https://help.directadmin.com/item.php?id=2094 the way to install multiple version of PHP in the machine. Set the php1_release to the version The version to set as the php1_release will be the version in CLI You may modify the /usr/local/directadmin/custombuild/options.conf Re-compile all the PHP …
PHP Startup: Unable to load dynamic library ‘imagick.so’ libMagickWand-6.Q16.so.5: cannot open shared
Another error regarding with imagick in Centos 7, I’ve been looking around in many forums to solve this warning, and I noted down here. Solved with this solution Then recompile your PHP.
PHP Warning: Version warning: Imagick was compiled against Image Magick version 1690 but version 1691 is loaded
After I update the PHP to the newest version 7.3.15 and this errr appear in my CentOS 7 Solved by this solution Here i noted down the step I solve this problem that found from centminmod forums
System error ‘[security.WindMcryptCbc.encrypt] extension ‘mcrypt’ is not loaded.’.
I don’t like error, but I have to fix the error, I note down here to do reference. I’m using CentOS 7, I think cause by upgraded from PHP 5 to PHP 7. I’m using DirectAdmin. What I found from internet The mcrypt extension has been abandonware for nearly a decade now, and was also …
System error ‘[security.WindMcryptCbc.encrypt] extension ‘mcrypt’ is not loaded.’. Read More »
How To Get Parent Category Name In WordPress
It is not difficult to get the name using the build in function from WordPress. You may use this for build your own plugin or list out the related post using the category data from the parent category. Here is the PHP Code that can display out the name of the parent category.
Publishing Failed in WordPress
When you post in WordPress with over 5MB text post, you may receive this error with red color. or you found in your php error log This is because WordPress need more time to execute and process and formatting your post over the maximum execution time. You may use the way below to solve this. …
Create WordPress widget template from scratch
I’ve save down the most basic widget code for WordPress, you can copy this to your plugin and modify it to start your first widget. You can save time on this tutorial to help you create wordpress widget from scratch. [code lang=”php”] <?php class example_widget extends WP_Widget { function __construct() { parent::__construct(false, $name = ‘Example …
Convert Text to Slug URL in PHP
Convert Text to slug URL, example: Brown & Cony’s Secret Date! will become: brown-conys-secret-date Will be nice url. [php] function slug_url($text) { // replace non letter or digits by – $text = preg_replace(‘~[^\\pL\d]+~u’, ‘-‘, $text); // trim $text = trim($text, ‘-‘); // transliterate $text = iconv(‘utf-8’, ‘us-ascii//TRANSLIT’, $text); // lowercase $text = strtolower($text); // remove …