PHP Warning: exec() unable to fork

Process limit “Is there a process limit I should look into” It’s suspected somebody (system admin?) set limitation of max user process. Could you try this? $ ulimit -a …. …. max user processes (-u) 16384 …. Run preceding command in PHP. Something like : echo system(“ulimit -a”); I searched whether php.ini or httpd.conf has … Read more

Upgrade python without breaking yum

I have written a quick guide on how to install the latest versions of Python 2 and Python 3 on CentOS 6 and CentOS 7. It currently covers Python 2.7.13 and Python 3.6.0: # Start by making sure your system is up-to-date: yum update # Compilers and related tools: yum groupinstall -y “development tools” # … Read more

Run bash script as daemon

To run it as a full daemon from a shell, you’ll need to use setsid and redirect its output. You can redirect the output to a logfile, or to /dev/null to discard it. Assuming your script is called myscript.sh, use the following command: setsid myscript.sh >/dev/null 2>&1 < /dev/null & This will completely detach the … Read more

How to redirect HTTPS requests to HTTP without a certificate (Apache VirtualHosts) and avoid a certificate warning

Fundamentally, that’s a problem. When communicating over HTTPS, the TLS communication layer is set up before anything is exchanged, i.e. the warning about the certificate happens before any information about the website is transferred. So a Certificate is needed to allow a browser to connect when https is defined, self signed or not. Ideally, and … 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

Open firewall port on CentOS 7 [closed]

Use this command to find your active zone(s): firewall-cmd –get-active-zones It will say either public, dmz, or something else. You should only apply to the zones required. In the case of public try: firewall-cmd –zone=public –add-port=2888/tcp –permanent Then remember to reload the firewall for changes to take effect. firewall-cmd –reload Otherwise, substitute public for your … Read more