For Mac OS X, this is what I do:
Make a script /usr/local/etc/php/fpm-restart:
echo "Stopping php-fpm..."
launchctl unload -w ~/Library/LaunchAgents/homebrew-php*.plist
echo "Starting php-fpm..."
launchctl load -w ~/Library/LaunchAgents/homebrew-php*.plist
echo "php-fpm restarted"
chmod ug+x /usr/local/etc/php/fpm-restart
Usually, service php5-fpm restart will do fine, on an up-to-date distribution.
But somtimes, it fails, telling you restart: Unknown instance: (or such).
Now, if you do not like to reboot your server, just kill the processes and have a fresh start (edited as of here):
$ sudo pkill php5-fpm; sudo service php5-fpm start
PHP 5.5 has built-in opcode optimizer OPcache making APC obsolete.
According to APC changelogs, PHP up to only 5.4 is supported.
Please use OPcache with PHP 5.5+ http://www.php.net/manual/en/opcache.installation.php
It could also mean that /etc/php5/cli/php.ini (on Debian/Ubuntu) or /etc/php.ini (on RHEL/CentOS/etc.) has display_errors = Off which means that any errors or warnings from command-line scripts will go nowhere, unless log_errors = On (see also the error_log setting).
Try running your scripts with a wrapper script that uses php -d display_errors=on ...
I had a problem restarting php7-fpm, because I didn't knew how exactly the service was named. This function gave me the answer:
php7-fpm service in my Ubuntu was called php7.0-fpm, so I did:
service php7.0-fpm restart
When I run yum whatprovides */evp.h, I get several packages that provide this file, all different versions of openssl-devel. Did you yum install openssl-dev or openssl-devel? If the former, that's the wrong package name.
This happens because, in most web servers, the default action for folders is "Directory listing" which is disabled by default. The same would happen in Apache usually if you disable Directory indexing. What you can do in nginx is to put =404 at the end of your try_files directive.
You can do this by putting /index.php at the end of the try_files directive. ...
First check installed extensions in php with following command
After enter check Do you find follwing xml list?
if not then add following line
apt-get install php5.6-xml
After doing so, make sure to restart appache
service apache2 restart
Hope this will help you.
Got the same error in Linux(Ubuntu 14.04)
Check that ini exists
If it is so, check that you have symlink to ini.
Something like in directory /etc/php5/cli/conf.d
05-mcrypt.ini -> ../../mods-available/mcrypt.ini
If there is no symlink create it. After installing the php5-mcrypt extension I have no symlink, only ini ...
First you have to remove Apache and all of it's dependencies.
apt-get purge apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin
rm -rf /etc/apache2; rm -rf /etc/php5; rm -rf /var/lib/mysql; rm etc/mysql
And then reinstall.
If you have any issues with phpMyAdmin, try entering this into the Terminal:
php.ini-development file for php7 on ubuntu 16.04 is located in
So you can do the following: make backup copy of your current php.ini:
$ sudo mv /etc/php/7.0/apache2/php.ini /etc/php/7.0/apache2/php.ini.back
then copy production ini file:
$ sudo cp /usr/lib/php/7.0/php.ini-development /etc/php/7.0/apache2/php.ini
This is seems to be covered fairly well in install.txt included in the PHP zip downloads.
Quoting from that file ...
Manual Installation Steps
Upgrading from a previous PHP version: Previous editions of the
manual suggest moving various ini and DLL files into your SYSTEM
(i.e. C:\WINDOWS) folder and while this simplifies the ...
Your php-fpm.conf file is not set up to send errors to syslog. See below for an example of how to do this.
; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; in a local file.
; Note: the default prefix is /var
; Default Value: log/php-fpm.log
error_log = syslog
; syslog_facility is used to specify what ...
This was due to an OOM (out of memory) event causing the compiler process to be killed which I was able to determine with 'Some Linux Nerds' help. To circumvent this when you can't just add memory to the machine, I used a swap file. Here are the commands I used that I found here:
dd if=/dev/zero of=/swapfile bs=1024 count=262144
It's better to upgrade to php7. Install php7.x-fpm and use the mpm_event (or mpm_worker) module:
apt-get install php7.x-fpm # install the php-fpm
a2dismod php7.x # disables mod_php.
a2enmod mpm_event # enable event MPM. You could also enable mpm_worker.
php-fpm will restart if you send a USR2 signal to the main process:
sudo kill -USR2 php-fpm_main_process_id
So we just need to instruct php-fpm to record its pid somewhere. In this example, I'll assume you want to save it at /etc/private/php-fpm.pid, and that php-fpm runs as user _php. First, add this line to the configuration file:
pid = /etc/php-fpm.pid
APC doesn't have support for PHP 5.5, the last version it was updated to work with was 5.4, and it hasn't seen updates since except for bug fixes in 2012.
If you did want to make it work with 5.5 you could try redefining IS_CONSTANT_ARRAY and IS_CONSTANT_INDEX to be IS_CONSTANT_AST since this has superseded them, however that's no guarantee of success if it ...
I had the same error after updating my server and found the following error in /var/log/nginx/error.log:/var/run/php5-fpm.sock failed (13: Permission denied)
What solved the issue was uncommenting the following lines in /etc/php5/fpm/pool.d/www.conf and restart php5-fpm
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
This appears to do the trick:
Download & unarchive PHP source.
Ensure libpq5 and libpq-dev are installed.
sudo make install
edit php.ini to add extension=pgsql.so and any necessary other pgsql directives.
Other problem is memory usage. When a process is created, 80M is allocated for apache2. I think is too much.
Is that real or virtual memory? Honestly, it's not very much; more to the point, you should focus on fixing things that are causing problems, not just things that you "think" should be different.
If you want Apache processes to take up less memory, ...
I finally figured this out.
The problem was a conflict between two plugins installed on the site (and specifically in the way the two plugins were configured.) The iThemes Security plugin (http://ithemes.com/security) is configured to make site backups periodically. The code to make the DB backup does a dump of every table in the database, and it assumes ...
If you are not planning to use APC then this can be safely removed from your PHP configuration.
First, find your php.ini file and edit it.
Find "apc" in the php.ini file, you should find a line that looks like this:
You can comment out this line by adding a semi-colon in front, e.g.
If you cannot find the "apc.so" ...
/tmp/apc.XXXXXX -> This mmap file mask is a normal filesystem based mmap and uses mkstemp to create a unique temporary file which is mmap'd. The 6 'X's are replaced by the unique string to make the filename unique. This is just writing data to a file in filesystem.
/tmp/apc.shm.XXXXXX -> Note that it_must_ be only /apc.shm.XXXXXX on linux systems. The ...
You installed PHP 5.4, but the PHP functions you are trying to use were introduced in PHP 5.5.
Use the remi and remi-php55 repositories to update your system to PHP 5.5 (or choose a later version).
It should be sufficient to install the appropriate remi-release RPM, enable the remi and remi-php55 repositories, and then yum update.