This blog is NOFOLLOW Free!

The magic space of the IT find what you seek or get lost


Php mysql connect ignores port for localhost

I just tried to connect with php to an other mysql server which runs on my localhost on an other port then the standard 3306. I used this syntax:

mysql_connect('localhost:3307', 'mysql_user', 'mysql_password');

But the damn php always connected to the default mysql server with port 3306.
After a lot of google searching I found the solution.

Tagged as: , Continue reading

iphone iTunes sync – recover your Library Persistent ID

Usefull for example, if you...
- have formated your pc without backup of your iTunes folder
- want to sync your iphone to an second pc
- don´t have jailbreak on your iphone

Follow this easy steps and you will have your Libarary ID again, and that even if you dont have jailbreak on your phone!


Fix propel-gen error: Error reading project file build-propel.xml

I had just installed propel-gen and phing with the pear method onto a new system. But after running the propel-gen I only get this error:

$ propel-gen $PWD
Buildfile: /usr/lib/php/data/propel_generator/pear-build.xml
[resolvepath] Resolved /devel/build/propel

propel-project-builder > projdircheckExists:

propel-project-builder > projdircheck:

propel-project-builder > configure:

 [echo] Loading project-specific props from /devel/build/propel/
 [property] Loading /devel/build/propel/

propel-project-builder > main:

 [phing] Calling Buildfile '/devel/build/propel/build-propel.xml' with target 'main'
 [phing] Error reading project file [wrapped: Unable to open /devel/build/propel/build-propel.xml for reading: ]


Total time: 0.1085 seconds

My Installed software versions:

propel-gen -> 1.4.1
phing      -> 2.4

And exactly this was the problem. It seems that the phing version 2.4 breaks some stuff. Because of this I have installed the old version, and now it works perfect.

$ pear uninstall -n phing/phing
$ pear install phing/phing-2.3.3
Tagged as: , 9 Comments

Using independent clocks in xen domU (ntp)

Normally the xen domU´s are using the same clock as the dom0. But I had the problem, that there was a timeshift of 20 minutes on one of my hosts. I did not find out the reason for this, so I decided to simply setup ntp also on this.

To make this work you have to tell the kernel of the virtual machine to use its on clock. With this command you set the parameter online.

echo 1 > /proc/sys/xen/independent_wallclock

To make this also boot safe, you will have to add a sysctl code to your /etc/sysctl.conf

# Set independent wall clock time

After that you can already use your own clock. For example you can now setup openntp on it, which will not work otherwise.

Tagged as: , No Comments

Fix Firefox Java Plugin after Ubuntu 9.10 Upgrade

I had the problem, that my java plugin for firefox was no longer working after I had upgraded my Ubuntu from 9.04 to 9.10 (karmic). In the old version it was necessary to add some lines to the sources.list. In the new version of ubuntu this is no longer necessary to install java.

After I had found this out, I thought the solution could be easy: Simply reinstall it!

So first the uninstall:


UIQ3 cell phone as modem via usb

I got my new Sony Ericsson P1i a few weeks ago. Because I hate it to use Windows I wanted to get it working as an usb modem under linux. In my case again under gentoo 😉 My cell phone provider in Germany is Eplus. So if you use this with an other provider you will have to change some values of course. The cell phone itself has SymbianOS on it. The version its called UIQ3. The instructions should work for all QUI3 phones, as far as I know. I used very much sites to get this together, so I beg your pardon that I forgot which that all was.

So first check if you have the need kernel options enabled:


syscp with libnss-mysql

After installing a new rootserver with syscp, I decided to also install libnss-mysql support on the system. The advantage is, that it is easy to see which file belongs to which user. I hate to only see the uids and gids 😉

Because I use gentoo on the server, I emerged libnss-mysql. If you use an other distribution, you have to install it with your package mananger if it is avaiable. I used version 1.5 of it.

Now it was a bit tricky to find the right config for syscp for it. After a long search and many tries now it works good. Here are my configs:


WordPress 2.3 no working mod_rewrite

I wanted just set up my new blog and use a permalink structure like this:


The strange thing was that it want work. mod_rewrite is enabled from my hoster, other sites work with it without any problems. If I used a structure with the "index.php" in it, it worked without any problem. I googled a lot and read very much of the docu. Most of them only say, that the mod_rewrite, followsymlinks, and such things have to be enabled. But this is all how it should be! So where is the problem?

I don't really know it. All the docs says, that the new wordpress does not need an special .htaccess file for this kind of stuff. Or perhaps I always have over read it? I don't know. After a while I decided to put on a .htaccess which looks like this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

After I did it, it WORKED. I hope I will not get any other problems with this little code, but till know I am happy with it. It simply works 😉