PHP and DL()

May 21st, 2008

The problem
I’ve tryied to execute a php script containing a dl() call to a .so from the command line and I’ve got the message:

Warning: dl(): Dynamically loaded extensions aren't enabled in /home/roberto/tmp/helloworld.php on line 6

The cause

The web host has not enabled dynamically loaded extensions.

The solution
I asked to the php interpreter where to find the configuration:

php --ini

Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File:         /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
...

So with a simple sudo vi /etc/php5/cli/php.ini I changed the parameter enable_dl=Off to enable_dl=On.

Enjoy,
Rob.

Open source can change your life

May 15th, 2008

This post is really enlightning of how open source can really change/improve your life.

wxWidgets and Ubuntu

April 21st, 2008

To keep your wxwidgets up-to-date on your ubuntu, simply add

deb http://apt.wxwidgets.org/ gutsy-wx main

to your /etc/apt/sources.list file. Then run

sudo apt-get update

to get the wx package list. Then type:

sudo apt-get install libwxgtk2.8-0 libwxgtk2.8-dev wx2.8-headers wx-common

or open synaptic to update your wx libraries.

Note that also the python bindings will be available for upgrade :)

Enjoy,
Rob.

Iron Python: the output stream.

April 7th, 2008

I needed to embed IronPython in my Second Messenger project. So i wrote a small interactive console looking like this:

Python Console

where in the upper section i write my code and sending the output stream on the bottom section.

Read the rest of this entry »

Second Messenger: Linux Version

March 22nd, 2008

A preview of the linux version is out! I’m waiting for feedbacks on it.

Enjoy,
Marte

Using Gecko.WebControl on Mono

March 19th, 2008

I’ve tried to use gecko.WebControl on Mono under Ubuntu Linux and I kept on getting:

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Gecko.WebControl ---> System.DllNotFoundException: /usr/lib/firefox/libgtkembedmoz.so
  at (wrapper managed-to-native) Gecko.WebControl:gtk_moz_embed_get_type ()
  at Gecko.WebControl.get_GType () [0x00000]
  at GtkSharp.GeckoSharp.ObjectManager.Initialize () [0x00000]
  at Gecko.WebControl..cctor () [0x00000] --- End of inner exception stack trace ---
  at <0x00000> 
  at SecondMessenger.gtk.MainWnd.initAdvertising () [0×00000]
  at SecondMessenger.gtk.MainWnd..ctor (SecondMessenger.SMClient client) [0×00000]
  at SecondMessenger.gtk.GTKClient.initUI () [0×00000]
  at SecondMessenger.SMClientManager.NewClient (System.String clientType) [0×00000]
  at SecondMessenger.SMClientManager..ctor (System.String clientType, System.Collections.Generic.List`1 accounts, System.Stringc) [0×00000]
  at SecondMessenger.Program.Esegui (System.String[] args) [0×00000]
  at SecondMessenger.Program.Main (System.String[] args) [0×00000]

That’s why even if the /usr/lib/firefox/libgtkembedmoz.so library is there is not visible to the LD_PATH.
Read the rest of this entry »


 
Roberto Rocco Angeloni is proudly powered by WordPress
Entries (RSS) and Comments (RSS).