Tag Info

Hot answers tagged

16

content-length can't be set if the Transfer-Encoding is set to be chunked. At the time of sending the headers, the server is unaware of how much data it will finally send. Each chunk has it's own length header field (see the RFC). If you think about it, unlike with a static HTML file, the web server has no way of knowing how much data will be generated by a ...


8

As someone mentioned already, the server built into the command line interface of PHP is a development only server, it is not fully featured. It exists so that we can internally test things that require a webserver, primarily; it is useful for internals developers. It is useful for PHP programmers to test during development, but it is not intended for ...


8

To address the most basic part of your question: Yes, you can send commands to a Windows Server from a web interface using the PowerShell Web Access feature in Windows Server 2012 and 2012 R2. For what you want (linking a user control in a web page to the execution of a specific action on the server), you might want to look into executing PowerShell from ...


7

The questions is a little bit strange, it's not clear if you're asking only for PHP or your question is more general. I will give you a brief overview from the PHP side. First, the two protocols: CGI scripts is a way how to run a server side script when a HTTP request comes; this has nothing to do with PHP FastCGI is a "better CGI" - CGI is known to be ...


7

This is due to a limitation of RPM/YUM on Amazon Linux, and the way that the multiple versions of php are packaged. One of the features of Amazon Linux is that there are multiple versions of several languages and other opensource software packages. In many cases these packages have to conflict with one another, as the software is not designed to be installed ...


7

When php is already installed, you can just run brew install php55-pdo-pgsql


7

If you can avoid it, you should not be running the web server processes as the root user, since that means the compromise of any vulnerability in the web service will completely compromise the server. With where you are now, I'd recommend starting from scratch on a new server - the attacker could have given themselves persistent root access through any ...


7

You can block all outgoing SMTP traffic with a simple rule: iptables -I OUTPUT -p tcp --dport 25 -j DROP You could extend this to only drop packets sent by the www-data user which will be the user running the websites: iptables -I OUTPUT -p tcp --dport 25 -m owner --uid-owner www-data -j DROP What will help with your main problem (the sites becoming ...


6

Error message above looks like a client (PHP script invoked by roundcube) fails to verify peer certificate because unknown CA. There are many reasons why this error happened. Regarding openssl, Roundcube version 1.0-RC and later shipped with SSL connection option. Parameter smtp_conn_options and imap_conn_options was added in version 1.0-RC and 1.0.3 ...


6

I came across this error after updating my PHP installation to 5.5.14, on RedHat EL v6. I had installed PHP via the Yum package manager, and then needed to re-install some of the PHP extensions I was using. In searching for tips on how to solve this issue, I came across this question, and now that I have discovered a working solution I wanted to share my ...


6

Your web host may install custom extensions for you, it can't hurt to ask. But most, generally, will recommend you upgrade to a VPS which allows you full root access, the ability to install anything you want, and less risk that you will negatively impact performance for other users of the server. VPSs can require extra administration effort and technical ...


6

The strace command lists the systemcalls the application make as it is running. If you're not de developer: Section 2 of the system manual documents systemcalls helping you understand what is happening. man 2 poll DESCRIPTION poll() performs a similar task to select(2): it waits for one of a set of file descriptors to become ready to perform ...


6

You have installed PHP from the remi repository. Now you need also to install additional packages form this repository, like so: yum install php-posix --enablerepo=remi


5

Carry out the following: apt-get install php5-imap However it's not enabled by default so enable it with: php5enmod imap Then bounce apache: service apache2 restart Done.


5

A long time ago, I saw apache lock-ups resulting from an apache process making a call via http to another URL serviced by an apache process on the same server. I sometimes wound up with a bunch of processes waiting on such calls with no available apache processes to service them. In my case I had a translation layer in front of some web pages, but calling ...


5

While this approach lends itself to generating bad feelings, if this is a necessary evil, I'd begin by making sure that the server is segmented from the network -- either accessible only by a few hosts in a LAN or listening only to hosts that have authenticated against a VPN (or SSH tunnel). In short, try not to let this host be low-hanging fruit. It is ...


5

If you're using ubuntu, what you can do is: dpkg -l | grep php | cut -d' ' -f 3 | xargs apt-get install --reinstall That will reinstall all packages that have php in their name, and return your .so files. You should run this command as a root user. If you run it as a regular user add sudo before apt-get.


5

You don't. The web server is allowed to decode percent-encoded characters which don't decode to special characters before applying rewrite rules, and is allowed to decode the remainder of percent-encoded characters before passing the data to your web application. (See RFC 3986.) What you should be doing is applying the front controller pattern in your web ...


5

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 ...


4

PHP-FPM doesn't (as far as I know) speak http, it speaks fastcgi. A web browser therefore can't talk to it directly -- you need to have something like nginx in between to convert http requests to fastcgi requests.


4

No, there is no way to do this. If your users are trying to deploy malicious code, you may consider getting new users. What is your use case here? Code review should happen completely outside of this process. A couple additional thoughts in regards to your below comment: If you think there may be an automated "virus scanner" type way to do this, ...


4

The safety of upgrading depends on who is providing the upgraded patches. With the defaults on Debian stable, there is a security team that ensures all major security fixes get backported to those versions. If you install from a third party repo, you are trusting them, rather than the Debian Security Team to provide these patches. It is a possibility you ...


4

libcurl is not curl. To update libcurl, use your OS's package management utilities.


4

Set a route to the payment processor via the dedicated IP. The ip route add command is your friend.


4

Anything under /root is usually owned by the root user. PHP does usually not (and for security reasons should never) run under the root user. You should install the gsutil in a location where PHP has execute rights. For example, copy it to /var/www: cp /root/gsutil/gsutil /var/www/gsutil I think that under Ubuntu PHP usually runs as the www-data user (not ...


4

You're using mod_php, so Apache is also handling your PHP workloads at the same time. Since PHP needs lots of RAM (well, most like this do, including mod_perl), you'll see higher RAM usage than serving just static files.


4

You need to change PHP's .ini file to include this (or change existing definition): short_open_tag=1


4

del line 3 and 4 on that snippet. Your config should looks like this <Directory /> Options Includes Indexes FollowSymLinks MultiViews AllowOverride None </Directory>


4

Beside the release cycle of PHP, you should also consider the life cycle of the base OS you are using. As an example, PHP 5.3 on RHEL/CentOS 6 will be supported with security fixes by RedHat/CentOS until Nov 30, 2020. Since even today, many PHP apps need something newer than 5.3, this is of limited use for newer versions of stuff like Typo3 etc. but ...


4

When PHP 5.4.33 was released on 18 Sep 2014, the following was announced: This release is the last planned release that contains regular bugfixes. All the consequent releases will contain only security-relevant fixes, for the term of one year. With simple math, one year ahead is September 2015.



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