Tag Archives: apache

How do you configure Apache/PHP to accept slashes in query strings?

Questions: I have two Apache servers running PHP. One accepts forward-slashes in the query string and passes it along to PHP in the expected way, for example: http://server/index.php?url=http://foo.bar works and in PHP this expression is true: $_REQUEST[‘url’] == “http://foo.bar” However, in the other Apache server, the same URL results in a 403 Forbidden error! Note… Read More »

Setting custom path to php.ini (not in Apache)

Questions: I’m trying to learn Symfony that “requires” using php in the command line / terminal for some tasks. I like to store my php.ini in the /apache2/conf directory, to have all the server configs at one place (and not having to deal with Windows’ UAC everytime I change something). In Apache, it’s no problem… Read More »

Prevent output buffering with PHP and Apache

Questions: I have a PHP script which sends a large number of records, and I want to flush each record as soon as it is available: the client is able to process each record as it arrives, it does not need to wait for the entire response. I realize it takes slightly longer for the… Read More »

Unexpected Connection Reset: A PHP or an Apache issue?

Questions: I have a PHP script that keeps stopping at the same place every time and my browser reports: The connection to the server was reset while the page was loading. I have tested this on Firefox and IE, same thing happens. So, I am guessing this is an Apache/PHP config problem. Here are few… Read More »

Symfony2: How to deploy in subdirectory (Apache)

Questions: What is the best way to deploy symfony2 application in a subdirectory or an alias ? Lets say that my application will run under: http://domain/symfonytest symfonytest is an alias to some directory in my filesystem. Is there some CLI operation that I can use ? When I try to configure it manually I see… Read More »

How to clear php's gettext cache without restart Apache nor change domain?

Questions: This is a little code snippet from php manual: putenv(‘LC_ALL=zh_CN’); setlocale(LC_ALL, ‘zh_CN’); bindtextdomain(‘domain’, ‘./locale’); textdomain(‘domain’); echo gettext(‘Hello’); Which will output 你好 as defined in domain.mo file, but the problem is as long as the Apache is running, gettext() always return the cached result. If I change the translation of Hello to 您好 in domain.mo,… Read More »