How to install all required PHP extensions for Laravel?

The Laravel server requirements specify the PHP extensions, including BCMath, Ctype, cURL, DOM, Fileinfo, JSON, Mbstring, OpenSSL, PCRE, PDO, Tokenizer, and XML, are required. These extensions are usually included and enabled during a PHP installation. You can use the following command in Ubuntu to check the necessary extensions. sudo apt install openssl php-bcmath php-curl php-json … Read more

Memory usage of current process in C

The getrusage library function returns a structure containing a whole lot of data about the current process, including these: long ru_ixrss; /* integral shared memory size */ long ru_idrss; /* integral unshared data size */ long ru_isrss; /* integral unshared stack size */ However, the most up-to-date linux documentation says about these 3 fields (unmaintained) … Read more

Enabling PostgreSQL support in PHP on Mac OS X

The PHP version that comes bundled with OS X doesn’t include PostgreSQL. You’ll have to compile the extension yourself. Here are some instructions: Find your version of PHP: php -v. Download the version of PHP that matches yours: curl -O http://us.php.net/distributions/php-5.3.3.tar.gz. (This example downloads PHP 5.3.3 but this must match your version) Extract the archive … Read more

Extending PHP with C++?

As Remus says, you can extend PHP with C/C++ using the Zend API. The linked tutorial by Sara Golemon is a good start, and the book Extending and Embedding PHP by the same author covers the subject in much more detail. However, it’s worth noting that both of these (and pretty much everything else I … Read more

Installing PHP Zip Extension

This is how I installed it on my machine (ubuntu): php 7: sudo apt-get install php7.0-zip php 5: sudo apt-get install php5-zip Edit:Make sure to restart your server afterwards. sudo /etc/init.d/apache2 restart or sudo service nginx restart PS: If you are using centOS, please check above cweiske‘s answer But if you are using a Debian … Read more