Category: Web


This is great, it shows you what speed and which broadband provider ISP your neighbours have on a map.

Finally we might be able to start making some educated guesses as to exactly how fast our service will go when we pay for it!

Please have a go and make this a really great tool.

http://www.top10-broadband.co.uk/speedtest/

If you want to have different setup for php on the command line: add a file called php-cli.ini This will be used by php from the command line, if it is not present it will use php.ini.

If you are getting

mysql_connect() http://function.mysql-connect2002 No such file or directory (trying to connect via unix:///tmp/mysql.sock)"

Then you probably need to modify the “mysql.default_socket” value in your /etc/php.

With Mac XAMPP I set it to:

mysql.default_socket = /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock

in /Applications/XAMPP/xamppfiles/etc/php.ini.

This might be a good time to check the correct php is going to run from the command line, by default it will run the Apple supplied php not the XAMPP one. So I put:

 /Applications/XAMPP/xamppfiles/bin

at the top of the /etc/paths file

If you want lots of urls to be redirected to www.abc.com, do this:

<VirtualHost *:80>
ServerName abc.com
ServerAlias *.abc.com
ServerAlias abc.net *.abc.net
and so on...
Redirect permanent / http://www.abc.com
</VirtualHost>

In JavaScript use:

var agent=navigator.userAgent.toLowerCase();
var is_iphone = (agent.indexOf('iphone')!=-1);
if (is_iphone) { conditional code goes here }

In CSS/HTML use:

<!--#if expr="(${HTTP_USER_AGENT} = /iPhone/)"-->
<style type="text/css">
<!--
 for the iPhone
-->
</style>
<!--#else -->
<style type="text/css">
<!--
not for iPhone
-->
</style>
<!--#endif -->

Other conditionals are:

! (negation)
Use the negation to select all versions except the one specified, e.g.
[If !IE 6] will select IE 5, 5.5 and 7.
lt (less than)
Select any versions less than the one specified, e.g. [If lt IE 6] will select IE 5 and 5.5.
lte (less than or equal)
e.g. [If lte IE 6] will select IE 5, 5.5 and 6.
gt (greater than)
Select any versions greater than the one specified, e.g. [If gt IE 6] will select IE 7 (and any later versions that may appear).
gte (greater than or equal)
e.g. [If gte IE 6] will select IE 6 and 7 (and later).
LoadFile /usr/lib/libxml2.dylib
LoadModule proxy_html_module modules/mod_proxy_html.so

I forgot to load the libxml2 file first, so put this in httpd.cont:

LoadFile /usr/lib/libxml2.dylib

LoadModule proxy_html_module modules/mod_proxy_html.so

Which is like this if you used MacPorts to install Apache:

 LoadFile /opt/local/lib/libxml2.dylib

 LoadModule proxy_html_module  modules/mod_proxy_html.so

...also add this line to the bottom of /opt/local/apache2/httpd.conf

 <IfModule proxy_html>

   Include conf/extra/proxy_html.conf

 </IfModule>
Follow

Get every new post delivered to your Inbox.