Feed on Posts or Comments

Monthly ArchiveFebruary 2005




MacOS & PHP Daantje on 27 Feb 2005

PHP-GTK on MacOS X

1st try:
I’m building a project timer app in PHP with the php_gtk.so module. But I can’t compile it for my Mac… I have it running on my linux based machine, but not on my mac yet… I’ve found these pre-compiled libs, but it still doesn’t work…

I’m now checking the Fink stuff… I think I miss some GTK lib…

2nd try:
Found the gtk lib, but still no luck… If someone has an idea, please post!. I always get this error when I fire up a php-gtk script:

PHP Warning: Unknown(): Unable to load dynamic library ‘/usr/lib/php/extensions/no-debug-non-zts-20020429/php_gtk.so’ - dlcompat: dyld: php Undefined symbols

3th try “EUREKA! It works!”:

I have it working! This is what I did… I’ve downloaded the latest source from php.net. Unpaked it and compiled it with this configuration:

./configure 
--prefix=/usr 
--mandir=/usr/share/man 
--infodir=/usr/share/info 
--with-apxs2 
--with-ldap=/usr 
--with-kerberos=/usr 
--enable-cli 
--with-zlib-dir=/usr 
--enable-trans-sid 
--with-xml 
--enable-exif 
--enable-ftp 
--enable-mbstring 
--enable-mbregex 
--enable-dbx 
--enable-sockets 
--with-iodbc=/usr 
--with-curl=/usr 
--with-config-file-path=/etc 
--sysconfdir=/private/etc

Do a make and make install command to update the existing php binary.

Now download the latest php-gtk source and compile it.

./buildconf
./configure
make
make install

Now you should have this file: /usr/lib/php/extensions/no-debug-non-zts-20020429/php_gtk

rename the php_gtk to php_gtk.so

mv /usr/lib/php/extensions/no-debug-non-zts-20020429/php_gtk /usr/lib/php/extensions/no-debug-non-zts-20020429/php_gtk.so

Make sure that the file is executable;

chmod +x /usr/lib/php/extensions/no-debug-non-zts-20020429/php_gtk.so

Okay now your done… Don’t edit the php.ini to use the php_gtk.so at startup, or else you can’t use php in your Apache webserver! Use the php_gtk.so with this line in your source: dl(’php_gtk.so’);

To get it to work,

start up X11 (This is very important! php-gtk needs X11 or Xdarwin to run or else you get this error:

Fatal error: php-gtk: Could not open display in php-gtk-1.0.1/test/hello.php on line 4)

Xdarwin comes with Fink, a package management system for MacOS X based on the Debian apt tools.

Start your file in the terminal of X11 or Xdarwin and open a bottle of beer!

MacOS & PHP Daantje on 27 Feb 2005

PHP-GTK on MacOS X how to

Yes it works! Read my howto on how to make it work. Now I can build my project timer ;) I will make it GPL when I’m done…

Linux & Darwin & MacOS Daantje on 22 Feb 2005

How to make a secure SSH tunnel

This is how you can make a SSH tunnel to an other machine in an other network. This is my situation:

my-local-machine -> my-router -> INTERNET <- remote-router <- remote-local-machine

Syntax:
ssh -g -L [my-local-port]:[remote-local-machine]:[remote-local-port] [username]@[remote-router]

Example:
I do this on my local machine…

ssh -g -L 81:192.168.1.2:80 user@remote.router.wan.ip

Now you can do in your own browser http://localhost:81 and you should
get the webserver on the remote-local-machine from the other network.
This you can do with any local port to any remote port, only remember
that the local port should not be in use allready. This works on all Linux, MacOS-X and Unix systems.

Linux & Personal Daantje on 22 Feb 2005

Large file (>2G) in mkisofs

I’ve made a backup routine for my server. It produces 1 big tarball witch I split into chuncks of 4 Gigs. I thought I could make from one chunck one iso to put on my DVD. But every time I tried to make the iso, mkisofs was complaining that the file was too large - ignoring. First I thought it was because the iso was to large for my file system, but it didn’t, I use xfs and ext3 file systems. The ISO format doesn’t allow big files larger than 2 gigs in it’s contents. So the solution of making one big iso of 4 gigs, is split the tarbal in parts of 2 gigs so mkisofs can use them… The iso itself can be as large as you want, only the contents of the iso may not contain files larger than 2 Gigs! Cost me a week to figure this out… So simple, it’s not mkisofs whats doing it wrong, it’s the iso file format that doesn’t allow it!

Linux & Windows Daantje on 22 Feb 2005

How to install Internet Explorer 6 with wine

(version 20040716, debian sid) This is what I did… I’ve downloaded and runned this tool… wine-config-sidenet-1.2.3.tgz Then I installed dcom98.exe. Then I did a wineboot to reboot the fake windows… Then I installed MSIE6 SP1.
Did a wineboot again… Then I cd-ed to this: ‘cd ~/.wine/dosdevices/c:/Program Files/Internet Explorer’ Than I runned ‘wine IEXPLORE.EXE’. After that the wizzard popped up, I pressed ‘CANCEL’ and checked the box to not show the wizzard again, and then I opened a beer bottle ;) AI ;)

Debian Daantje on 21 Feb 2005

How to build a debian kernel package

Here are the 10 steps to get drunk:

  1. Open a console and become root with the su command.
    su
  2. Than download the source in /usr/src:
    cd /usr/src/
    wget ftp://dl.xs4all.nl/pub/mirror/linux-kernel/v2.4/linux-2.4.29.tar.bz2
    
  3. Unpack the bziped file:
    tar -jxvf linux-2.4.29.tar.bz2
  4. Don’t forget to symlink /usr/src/linux to the linux-2.4.29 dir, or else the compiler will fale!!
    ln -s linux-2.4.29 linux
  5. Now you’ll need some packages so you’ll be able to configure the kerel with a GUI and beable to make the .deb packages.
    apt-get install libncurses5-dev kernel-package
  6. Now configure the kernel for your machine…
    cd /usr/src/linux
    make menuconfig
      
  7. Now comes the compiling of the packages.
    make-kpkg clean
    make-kpkg --revision=custom.myfisrttry.1.0 kernel_image
       
  8. This can take a while, make some coffee…

  9. When you have modules enabled and downloaded to /usr/src/modules you also should compile the modules.
    make-kpkg --revision=custom.myfisrttry.1.0 modules_image
  10. Now you should have your .deb kernel packages in /usr/src. If
    there was an error, you should do the last step again! We have them?
    Let’s install them…

    dpkg -i kernel-image-2.4.29_custom.myfirsttry.1.0_i386.deb

    And if you have some module deps you should install them too!

  11. Reboot the machine and pray…
    reboot
  12. Drink beer!

Internet & MacOS Daantje on 21 Feb 2005

How to set the default browser under MacOS-X

I’ts so easy, but it cost me 30 minutes to find it… Start Safari, open the preferences (command - ,) and go to ‘General’.
There you have the option ‘Default web browser’. Not the most logic
place to have the configuration. I would liked it better when the
option was somewhere in the system preferences panel…

Personal Daantje on 21 Feb 2005

Added all my projects to Hotscripts.com

For some more exposure, I’ve added all my open-source projects to hotscripts.com. You should check that site for other cool scripts and examples.

Linux & Windows Daantje on 17 Feb 2005

Microsoft Blocking Wine Users From Downloads Site

Found this on /.: IamTheRealMike writes “In January, Microsoft announced a new anti-piracy initiative called Genuine Advantage. From this summer onwards all users of Microsoft Downloads will be required to validate using either an ActiveX control or a standalone tool. Yesterday Ivan Leo Puoti, a Wine developer, discovered that the validation tool checks directly for Wine and bails out with a generic error when found. This is significant as it’s not only the first time Microsoft has actively discriminated against users running their programs via Wine, but it’s also the first time they’ve broken radio silence on the project.”

This is one of the reasons to quit using Microsoft products… They always want to make more mony.

Personal Daantje on 17 Feb 2005

Changed my layout (again)…

Some people didn’t like the red layout. It was to bright. Now I’ve
changed the layout to gray, removed some images to load faster and
changed the menu. The menu (CSShiarchMenu) I’ve made opensource and you can download it here

Next Page »