I’m using iPhone OS 3.x on my iPhone and recently i had problems to get my .mp4 files displayed in mobile Safari. I tried different settings for encoding the files but not a single one worked. When i clicked the link to the .mp4 file in mobile Safari, all i got was the “file can’t get downloaded” error. After some googling i found a clue that it might has something to do with MIME types and the apache server hosting the videos.
Solution:
- encode your videos for iPhone / iPod Touch (Compressor, Quicktime, Adobe Media Encoder, …)
- test them on the device (add the video to your iTunes library and upload it to your iPhone and watch it!)
- upload the video to your webserver
- make sure you have the following line in your apache config or in a .htaccess file in your directory on your webserver:
1
| AddType video/mp4 mp4 mp4v mpg4 m4v |
That’s it, now progressively watching .mp4 videos from your webserver on your iPhone should work (again).
I use a public plain apache server with mod_rewrite to serve my wordpress as i don’t trust php enough to expose it to the world
I wrote and updated a previous post describing what i’ve done to make things work for me, but now with WordPress 2.8 it’s broken, so i had to figure out a fix for this problem again. This is how i’ve done it:
on my public webserver i use this line in the virtual host config:
1
| RewriteRule ^(.*)$ http://sotf.labnet.uclv.net/wordpress$1 [L,P] |
The magic is done in my wp-config.php file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| /* That's all, stop editing! Happy blogging. */
// hack for using wordpress behind another apache / mod_rewrite
// config hack:
// set subdir of this worpress installation absolute to this webserver (normally /wordpress)
$local_subdir = '/wordpress';
// set subdir on remote server (normally /)
$remote_subdir = '/';
//print_r($_SERVER);
if ( isset( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
$old_host = $_SERVER['HTTP_HOST'];
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
$_SERVER['SCRIPT_URI'] = str_replace($old_host, $_SERVER['HTTP_X_FORWARDED_HOST'], $_SERVER['SCRIPT_URI']);
}
$_SERVER['REQUEST_URI'] = str_replace($local_subdir.'/', $remote_subdir, $_SERVER['REQUEST_URI']);
$_SERVER['SCRIPT_URL'] = str_replace($local_subdir.'/', $remote_subdir, $_SERVER['SCRIPT_URL']);
$_SERVER['SCRIPT_URI'] = str_replace($local_subdir.'/', $remote_subdir, $_SERVER['SCRIPT_URI']);
$_SERVER['SCRIPT_NAME'] = str_replace($local_subdir.'/', $remote_subdir, $_SERVER['SCRIPT_NAME']);
$_SERVER['PHP_SELF'] = str_replace($local_subdir.'/', $remote_subdir, $_SERVER['PHP_SELF']);
// end of hack
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
require_once(ABSPATH . 'wp-settings.php'); |
IMPORTANT: the hacking of the $_SERVER variables has to be done before requiring wp-settings.php!
Update
I had some trouble that rewriting pretty permalinks didn’t work at first. The problem was that I had to enable the use of .htaccess for my wordpress directory in the apache config of my local server:
1
2
3
| <Directory /data01/www/wolfgang.reutz.at />
AllowOverride FileInfo
</Directory> |
And i had to enter the public webaddress into both of the blog url fields in the general settings of the wordpress admin interface. After that i had to manually tweak my .htaccess file in my wordpress installation:
1
2
3
4
5
6
7
| # BEGIN WordPress
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
# END WordPress |
I had the need to move my blog running wordpress 2.0.x to a different server, but keeping the domain name on the “old” server. I used mod_rewrite and with a lot of trial and error and some updates i finally got this working solution:
Read more…
In the past i had to install Flash Media Server 2 on Ubuntu and Markus Bertheau’s Blog came to help with publishing a patch to make this work.
Time went by and now i had to install Flash Media Server 3 on my Ubuntu box. Again Markus has a patch for the fms3 installer script available, Markus’s article can be found at http://www.bluetwanger.de/blog/2008/02/11/flash-media-server-3-on-ubuntu-710-gutsy/:
first make sure you have libnspr4-dev installed, if not:
1
| sudo apt-get install libnspr4-dev |
download and unzip the Flash Media Server 3 app from adobe and upload FlashMediaServer3.tar.gz to your Ubuntu server, then:
1
2
3
4
5
| tar xfz FlashMediaServer3.tar.gz
cd FMS_3_0_0_r1157
wget http://www.bluetwanger.de/~mbertheau/flash-media-server-3-ubuntu.patch
patch -p1 < flash-media-server-3-ubuntu.patch
sudo ./installFMS |
thanks again Markus for providing these patches!
Safari 3.1 adds some important updates for web developers:
- Adds option in Safari preferences to turn on the new Develop menu which contains various web development features
- Allows access to Web Inspector
- Allows access to Network Timeline
- Allows editing CSS in the Web Inspector
- Allows custom user agent string
- Improves snippet editor
I was very happy to see that editing CSS in the web inspector is now possible – just inspect a part of your website with ctrl-click – inspect element and double click on a style in the styles bar to edit it and see the update immediately in the browser window.
Warning: you have to inspect a element and then be sure to use the styles, not the computed styles to see the changes! Unfortunately the computed styles are at the top of the window – so stay away from the computed styles, editing is not possible for these!
As you might already know, Anarchy Media Player is a way cool javascript-based player solution for playback of media files like .mp3, quicktime movies, flash movies and so on. The very cool thing about that is, all you have to do is to include the anarchy player javascript file into your html document and each and every link to a file ending with .mp3, .mov, .wmv, .flv, … will be magically converted into a media player (thanks to the HTML DOM and javascript
).
I use the 1.6.5 version and found that when you add a class with “amplink” to your link, the media player will ignore this link! This comes handy if you want to explicitly put a link to a movie file for which you don’t want the mediaplayer magic to happen. Imagine you have a link to a flash video and two links for quicktime movies in high and low quality for download. The link to the .flv should be converted into a media player, the two quicktime links should be left intact – just put a “amplink” class on the two quicktime links and you’re set!
Yousif Al Saif from tredosoft.com has programmed an installer allowing you to run multiple Internet Explorer versions in parallel on your Windows XP:
Download Multiple IE installer (10.3MB)
please read Yousif’s original article here and check out the comments on this article as well, you will find some useful information there as well.
since i’m not very experienced with Zope 3 (yet) i had some troubles to turn a text input field in my own content type into a Rich Text Editor using z3c.widget.tiny. This is how i finally got it working (thanks to dobee):
Read more…
The installation script for Flash Media Server works only on RedHat Enterprise by default. With some modifications it works fine on Ubuntu Edgy:
1
2
3
4
5
6
7
| apt-get install libnspr4 libstdc++5 libstdc++5-3.3-dev
wget http://download.macromedia.com/pub/flashmediaserver/updates/2_0_3/linux/flashmediaserver2.tar.gz
tar xfz flashmediaserver2.tar.gz
cd FMS*
wget http://www.bluetwanger.de/~mbertheau/fms.patch
patch -p1 < fms.patch
sudo ./installFMS |
Live aus der Marschrutka – Installing Flash Media Server 2 on Ubuntu 6.10 Edgy
this howto is written bei Markus Bertheau, please check the original article and his blog here. with his great patch my installation of FMS2 on my Mac Book Pro running Ubuntu 6.10 server inside Parallels Desktop worked like a charm
If you like to use your arrow keys in an interactive Python on OS X, you definately need readline. But what do you do, when installing py-readline via DarwinPorts doesn’t work??
Today i found this:
I had the same problem. If you download the patch files yourself from ftp://ftp.cwru.edu/pub/bash/readline-5.1-patches (readline51-00[1-4]) and put them in /opt/local/var/db/dports/distfiles/readline, then port install readline will work.
DarwinPorts in Ruby on Rails
this might be useful for other packages which can’t be fetched with the ‘port install <package>’ command