Category: Howto

  • Debian/Ubuntu: Basic Apache 2 security

    Update 2010-10-25: I’ve added “TraceEnable Off” to the configuration (which is not the default on Debian). If you run an Apache 2 web server on a production system, it is always a good idea to make some easy configuration changes in /etc/apache2/conf.d/security to increase the server’s security: # Disable access, directory indexing and .htaccess files […]

  • Debian/Ubuntu & Apache 2: Transparent reverse proxy with mod_proxy

    Here is a tutorial how to use the apache module mod_proxy to set up a transparent reverse proxy that passes all requests to another web server. Under Debian or Ubuntu you have to enable the modules proxy and proxy_http: # sudo a2enmod proxy # sudo a2enmod proxy_http A use case for a transparent proxy is […]

  • Ubuntu 10.04: Setup APC for PHP 5.3 and Apache2

    Installing the APC (Alternative PHP Cache) using the php-apc package is straightforward: # sudo aptitude install php-apc # sudo /etc/init.d/apache2 restart Using the package php-apc installs APC 3.1.3p1. If you would like to use the most recent version 3.1.4 you can manually set up the PECL package as follows: Install the required packages: # sudo […]

  • PHP 5: Send HTTP post request with file_get_contents

    The following code snippet shows an easy way how to send a HTTP post request using the PHP function file_get_contents: $url = ‘http://server.com/path’; $data = array(‘key1’ => ‘value1’, ‘key2’ => ‘value2’) // use key ‘http’ even if you send the request to https://… $options = array(‘http’ => array( ‘method’ => ‘POST’, ‘content’ => http_build_query($data) )); […]

  • Ubuntu 10.04 & PHP 5.3: Installing pecl_http

    To install the pecl_http PHP extension on Ubuntu 10.04 follow the instructions below: Install the required packages: # sudo apt-get install php-pear php5-dev libcurl4-openssl-dev Install pecl_http: # sudo pecl install pecl_http Create file /etc/php5/conf.d/http.ini with the following content: extension=http.so Restart Apache2: # sudo /etc/init.d/apache2 restart After restarting the Apache2 web server a “http” section should […]

  • Microsoft CRM 4.0: Fix “TrySetFocusOnSubject” error after installing Update Rollup 12

    After installing the Update Rollup 12 for Microsoft Dynamics CRM 4.0, I get an error (“Microsoft Dynamics CRM has encountered an error”) in the web frontend when closing an activity (e.g. a task). The error report says: <CrmScriptErrorReport> <ReportVersion>1.0</ReportVersion> <ScriptErrorDetails> <Message>Object expected</Message> <Line>1</Line> <URL>[…]</URL> <PageURL>[…]</PageURL> <Function>function anonymous() { TrySetFocusOnSubject() }</Function> <CallStack> <Function>function anonymous() { TrySetFocusOnSubject() }</Function> </CallStack> </ScriptErrorDetails> <ClientInformation> <BrowserUserAgent>[…]</BrowserUserAgent> <BrowserLanguage>en-us</BrowserLanguage> […]