Hot answers tagged

53

First of all you should check what websites are hosted on the server # apachectl -t -D DUMP_VHOSTS Then when you will find a site check corresponding configuration file for the option DocumentRoot. For example # apachectl -t -D DUMP_VHOSTS VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:80 is a ...


22

There are a lot of things you could be doing to improve your deployment process. A few of them are: Ensure your code is well tested. Ideally you should have 100% unit test coverage, as well as integration testing for every conceivable scenario. If you haven't got this, you should probably drop everything and get this taken care of. Look into behavior-...


12

sudo nano /etc/apt/sources.list add deb http://packages.dotdeb.org wheezy all deb-src http://packages.dotdeb.org wheezy all deb http://packages.dotdeb.org wheezy-php56-zts all deb-src http://packages.dotdeb.org wheezy-php56-zts all save and run sudo apt-get update sudo apt-get upgrade sudo apt-get install php5 more info here https://www.dotdeb.org/...


11

By default "php70" (Software Collection) don't install the mod_php. yum install php70-php And check you haven't any other mod_php (such as the one provided by "php" base package)


8

This might stop some specific backdoors that only accept POST requests. But it will not stop backdoors in general. A backdoor might accept parameters via GET request, e.g. bad.php?command=somecommand. Or it might execute commands sent via a custom HTTP Header.


8

i have by mistake emptetied my databases for where can i get database backups. Wherevery you did put them. my server team told i do not have backup activated now what to do to solve my issue YOU did not activate backups, now you whine. Sorry, there is nothing you can do. My server is on ubantu VPS 1: is there some server command that could ...


7

Install php5 after php5-fpm if you plan to use nginx for example, because php5 needs one of either libapache2-mod-php5, libapache2-mod-php5filter, php5-cgi, or php5-fpm. Apt just picks the first package that satisfies the dependency. $ sudo apt-get install php5-fpm php5


6

In Ubuntu 14.04 the file to change user and group in PHP-FPM is: /etc/php5/fpm/pool.d/www.conf. In this file change these parameters: user = www group = www listen.owner = www listen.group = www


6

Another reason ./configure might fail is because you don't have pkg-config installed, like in my case with PHP7 and Debian Jessie: sudo apt-get install pkg-config


6

It seems from what you say that you have a maintenance window from 1 am to 7 am every day the issue is not time but convenience. This is normal and many people just deal with it as part of business. You could have a 2 (or more backend) systems with a front end that directs traffic to whichever is currently live. Once you are happy that a release is going to ...


6

Update the code. Running an application based on old PHP can pose a security risk for your customer.


5

PHP 5.4 end-of-life date is September 14, 2015. You can find this information on the PHP site, here.


5

Amending the other answers: You should follow the blue-green deployment model. When you want to release a new version you deploy it to an internal staging website. Then, you can run automated tests on the next version production site. When the tests go through you point the load balancer to use the new website. This helps in the following way: Severe ...


5

There are separate configuration files for PHP when called via Apache and when called via the CLI. For example, in Debian (at least), these are in /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini, respectively. The fact that you manually declared imagick.so in apache2/php.ini might not mean anything - most distributions have some other way of managing ...


4

For Mac OSX brew services restart php56 worked for me.


4

For me, OSX's builtin php is configured to use a different unix-socket than homebrew's mysql. Thus it can't connect via localhost which utilizes that socket. I fixed it with a quick hack by symlinking php's configured socket-path to point to the one mysql actually uses. sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock The following diagnostic commands ...


4

Assuming that you already have the OpenSSL libraries and header files (on rpm systems the latter are in the xxxx-devel package)... The issue seems to arise from how configure resolves dependencies which are distributed around the filesystem. To compile the code, the comiler needs to know where the headers are. To link the code, the linker needs to know ...


4

To answer your actual question is to just change the user line in nginx.conf like so: user [username]; Example: user www-data; The preferred user for Nginx to run as actually differs between operating systems. Sometimes Nginx is supposed to run as www-data. Other times it is actually supposed to run as nobody. On some operating systems (such ...


4

I know this post is quit old, but i just have faced this problem on ubuntu when i called for PECL command. The only thing that helped me is to install php-xml package. First check if you have xml module already installed php -m if you don't find it then you have to sudo apt-get install php-pear it will automatically install php-xml package. or you ...


4

FYI for those looking to install PHP 7 using the remi-php70 repository (now that PHP 7.0.0 has been released), you can install packages using the same package names you know and love, for example: php php-cli php-common php-devel php-fpm php-gd php-mbstring php-pdo etc.


4

Confirm that your LAMP server is actually routing mail based on MX record and is not configured with a static mailroute to the old Exchange server. For sendmail you would check for MAIL_HUB or SMART_HOST settings or the mailertable feature, for Exim route_list settings.


4

I have test the same steps, it works for me :( Please check you have change all and only /opt/rh/httpd24/root/var/www to /var/www (despite I don't really understand why you want this): # grep www /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf | grep -v "^#" DocumentRoot "/var/www/html" <Directory "/var/www"> <Directory "/var/www/html"> # ...


4

Using php7 and any OS packages will be difficult until distros (or third party repos) are updated to handle this and you really shouldn't do this on a production system. My advice is to not attempt this and wait until a PHP7 infrastructure is in place. You could work around by installing most things like PHPMyAdmin by hand, but this is not good system ...


4

You may be getting some stderr\stdout output which might help identify the problem. Usually this ends up being mailed to yourself, but if not try adding specific redirection of all output to the end of your crontab entry to a file, e.g.: 0 */3 * * * /usr/bin/php /var/acme/cron/api_update_db.php &> /tmp/cron.output


4

Here is what the message in the DSA-3380 said: Note to users of the oldstable distribution (wheezy): PHP 5.4 has reached end-of-life on September 14th, 2015. As a result, there will be no more new upstream releases. The security support of PHP 5.4 in Debian oldstable (wheezy) will be best effort only, and you are strongly advised to upgrade to ...


4

I may be wrong, but I believe that sudoers also restricts parameters that can be passed to a command/script, not just the command itself. If you try to run your .sh without the parameter it will likely work e.g. sudo /bin/bash /var/www/my_bash_script.sh So, to tell sudoers to allow that script to be run with any parameters (by apache), you would need ...


4

What should I do to fix this? Add memory or reduce the load on memory from processes. Install monitoring Gather data. Use Scientific Method to work out where the bottlenecks are. Take appropriate action. Repeat as required.


3

I have Apache 2.4.6, but the patch to fix it is provided in Apache >= 2.4.8. The key here is to start your output immediately so that Apache (mod_proxy_fcgi) thinks the connection is active. For example, I am using PHP and the DB query for my AJAX call takes > 30 seconds. Because I know that the overall response will be "Content-Type: application/json", I ...


3

I ran into this issue trying to get PHP extensions involved in a Docker container. Here is what I had to do: apt-get install libldb-dev libldap2-dev ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \ && ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so


3

One solution is to add additional php-fpm instances to your docker-compose file and then use an nginx upstream as mentioned in the other answers to load-balance between them. This is done in this example docker-compose repo: https://github.com/iamyojimbo/docker-nginx-php-fpm/blob/master/nginx/nginx.conf#L137 upstream php { #If there's no directive here, ...



Only top voted, non community-wiki answers of a minimum length are eligible