PHP Weirdness

written by Jan on September 5th, 2006 @ 12:36 AM

Laatst vroeg een klant me of het mogelijk was om MDB2_Driver_mysqli, een PEAR module, te installeren op de server waar hij gehost zat. Flexibel als we zijn is dit uiteraard geen probleem.

Ik voer uit wat ik altijd uitvoer, en verwachtte geen problemen, maar stootte toch op eentje:
root@zuurstof:# pear install MDB2_Driver_mysqli pear/MDB2_Driver_mysqli requires PHP extension “mysqli” No valid packages found install failed root@zuurstof:#
Ik had blijkbaar geen mysqli geinstalleerd staan.. of toch?
root@zuurstof:# apt-get install php5-mysqli Reading package lists… Done Building dependency tree… Done php5-mysqli is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@zuurstof:#
Ik checkte even een PHPInfo die ik wist staan op een van de sites op die servers, zocht op mysqli en voorwaar, mysqli support was enabled. Ik geraakte er niet wijs uit. Toevallig dacht ik eraan even hetzelfde te doen op de command line:
root@zuurstof:# php -r “phpinfo();”|grep mysqli root@zuurstof:#
Ok, dat was vreemd. Even de php.ini bekijken! En toen kwam de spreekwoordelijke aap uit de spreekwoordelijke mouw:
root@zuurstof:# diff /etc/php5/cli/php.ini /etc/php5/cgi/php.ini |grep mysqli > extension=mysqli.so root@zuurstof:#
Hier zat dus mijn probleem. Snel even dat lijntje toegevoegd aan de cli php.ini, en voorwaar:
root@zuurstof:# pear install MDB2_Driver_mysqli downloading MDB2_Driver_mysqli-1.2.2.tgz … Starting to download MDB2_Driver_mysqli-1.2.2.tgz (28,053 bytes) .........done: 28,053 bytes install ok: channel://pear.php.net/MDB2_Driver_mysqli-1.2.2 root@zuurstof:#
Another job well done! And now on to new adventures!!!!!!


Comments

  • Bert on 05 Sep 12:07

    Mooi Jan! ;)

  • Pieter on 12 Dec 09:43

    Thanks, dat had me anders weer een halfuur gekost :-)

  • payday loans on 01 Oct 15:40

    Greetings all...

    So after nearly 5 years of focusing on the business sector and really enjoying every r‚sum‚ of it...the dated has sign in to unfold my horizons and learn the next trace in delivering titanic products for Microsoft. So as of very momentarily (date TBD) I will-power be striking to a Program Administration function in a further goods being developed in the Office division.

Post a comment

Options:

Size