PHP
PHP PECL module install fix Warning: mkdir(): File exists in System.php
I wanted to install imagick (Image Magick) pecl module on my local machine.
I've tried with
$ pecl install imagick
but I got the following error
Build process completed successfully
Installing '/opt/homebrew/Cellar/[email protected]/8.1.29/include/php/ext/imagick/php_imagick_shared.h'
Installing '/opt/homebrew/Cellar/[email protected]/8.1.29/pecl/20210902/imagick.so'
Warning: mkdir(): File exists in System.php on line 294
PHP Warning: mkdir(): File exists in /opt/homebrew/Cellar/[email protected]/8.1.29/share/[email protected]/pear/System.php on line 294
Warning: mkdir(): File exists in /opt/homebrew/Cellar/[email protected]/8.1.29/share/[email protected]/pear/System.php on line 294
ERROR: failed to mkdir /opt/homebrew/Cellar/[email protected]/8.1.29/pecl/20210902
How to fix Unexpected item 'parameters › doctrine' in PHPStan doctrine extension
Today while I was configuring PHPStan with the phpstan-doctrine extension I stumbled upon the following error when running PHPStan:
Invalid configuration:
Unexpected item 'parameters › doctrine'.
How to execute multi search msearch query in ElasticSearch with PHP
ElasticSearch gives you the ability to execute multiple queries in a single request by using the Multi-Search API.
How to install PHP 8.3 on MacOS
PHP 8.3 will be released on November 23, 2023.
Until then, you can play around and test the beta versions which are already out. In this post, I'll show you how to install the beta version on your Mac.
What's new in PHP 9
PHP 9 will be the next major release of the PHP language.
The release date is still unknown, but we have hints about what's new. By looking into the PHP Wiki RFC section, we can get clues about what is coming next.
In this article, we'll cover the approved/implemented RFC (Request for Comments) and keep it updated with the latest information about PHP 9.
How to run ElasticSearch queries with PHP and cURL example
In the realm of modern data handling, Elasticsearch has emerged as a powerhouse, offering rapid data search and analysis.
As a PHP developer, integrating this robust search engine into your projects can elevate your data operations to new heights. In this article, we'll illustrate a concise example of how to create an index, create a document, get a document, and search for documents using PHP's cURL library.
The following examples will empower you to efficiently store, retrieve, and manipulate data through Elasticsearch's RESTful API, all within the familiar PHP environment.
mod_php vs php-fpm Performance Benchmark [Surprising Results]
Have you ever wondered if Apache mod-php
is faster than php-fpm
with Nginx? I surely did.
Each time this question arises, I do a quick research, and I cannot seem to find a definitive answer. It seems that the recommended way to run PHP websites nowadays is to use php-fpm
with Nginx, but is that the best method? Some articles state that php-fpm
is 300% faster than mod-php
, other articles state that mod-php
is faster, and so on.
This is why I've decided to conduct my own tests and performance benchmark and settle this debate once and for all.
The result surprised me.