Saturday, September 30, 2006

Eclipse & Php: Php Ide

Eclipse is a wonderful IDE for programmers (extensible with plugins and for new programming languages) and I really enjoy using it! A sort of the Emacs of the new millennium (I'll keep on using Emacs too, though :-)

The Zend plugin for programming in Php with Eclipse, Php Ide also looks very promising! I started using it few weeks ago and found really helpful and powerful. It features syntax completion and an easy to use debugger (although I still haven't succeeded in debugging php programs as web servers).

Here's a screenshot during debugging:


I found it very productive and it is always kept upgraded (the version I'm trying is 0.2.4).

One of the problems I had was due to the use of MySql: when I run a php application I used to get this error:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in...
This was due to the fact that the configuration of php used by php ide expects the socket for connecting to MySql server in /tmp/mysql.sock, but the Debian system I'm using is configured so that the mysql socket is actually in /var/run/mysqld/mysqld.sock.

Since I didn't find a way to configure this option in the php used by php ide, I simply create a symbolic link before starting php ide:

ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

With this "hack" I have no problem at all :-)

12 comments:

Unknown said...

Senti, scusa l'intrusione... ma se invece di parlare di robe strane, tu lanciassi una discussione sui graziosi tappetini per il mouse raffiguranti foto di simpatici animaletti? Anche questo riguarda l'affascinante mondo dei pc! E almeno per una volta capirei di cosa stai parlando!! ;oD
Ok... ora so per certo che mi toglierai il saluto.... :oD

betto said...

Ottima IDEA!!!
Hai qualche consiglio per partire? :-)

Anonymous said...

ciao lore, complimenti per il blog!

trova un modo per eliminare lo spamming dal mio sito per sempre e ti sovvenziono un viaggio "musical"!!!

'ciuz!
alina

p.s. io vorrei un tappetino per il mouse con janis joplin...

betto said...

ohi ohi, il problema dello spamm e' davvero terribile :-(
Pero' un finanziamento per i musical... :-D

questa cosa dei tappetini sta prendendo piede! :-D

Unknown said...

Bello il tappetino personalizzato con i musicisti preferiti!!! Ma dubito che ne troverei uno con i Rammstein... Dovrei scendere a patti e scegliere un soggetto meno da *intenditore altamente specializzato*... ;o) Per ora mi dovrò accontentare del mio tappetino del wwf con il cucciolo di foca bianca... se pensi che prima avevo quello di Winnie Pooh, ho già fatto un passo avanti! ;oD

betto said...

Lo sapevo che c'avevi il tappetino dei Pooh!!! :-P

Unknown said...

E lo sapevo io!! NO-OOOO!!!! Winnie Pooh!!! Quello tenerone, pelacchioso e che NON canta!! :oD
Il tappetino giusto per una della mia età, no? ;oD

betto said...

ah... quindi non i Pooh eh?
:-(
ma come sei cosi' vec... ehm... giovane!!! :-P

Unknown said...

Fettina di pane, burro e marmellata... attento a quello che dici perchè rischi le botte! (e una vasta serie di torture...) ;oD

betto said...

e che te la prendi cosi' tanto per i Pooh?!
:-P

betto said...

Un certo Alessandro mi ha mandato una mail dopo aver letto questo post, chiedendo un aiuto riguardo all'errore "Call to undefined function mysql_connect()".

Purtroppo ha usato un indirizzo di seeweb.it che pero' e' sbagliato: ho provato a risponderti ma le mail mi tornano indietro.

Riscrivimi controllando la correttezza del tuo indirizzo.

clod said...

My favorite IDE is Codelobster IDE