DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-12-17 02:03:05

BigNoob
Member
Registered: 2008-11-17
Posts: 7

Php.ini + MySQL: how to load extension=*.so

Hello! :)

I have a problem to connect MySQL with PHP.

In order, I do this:

1.Download packages:
wget http://81.216.140.39/dns-323/mysql_and_ … ql51-1.tgz
wget http://81.216.140.39/dns-323/mysql_and_ … 8-rc-1.tgz

2.Install packages!
funpkg -i mysql-5.*.tgz
funpkg -i php-5.2.6-mysql5*.tgz

3. add lighttpd
cp ffp/etc/examples/lighttpd.conf-with-php ffp/etc/lighttpd.conf
/mnt/HD_a2 # chmod +x ffp/start/lighttpd.sh

4. create directory

/mnt/HD_a2 # mkdir -p www/pages
/mnt/HD_a2 # mkdir -p www/logs
/mnt/HD_a2 # chmod 0777 www/pages

5. Launch
/mnt/HD_a2 # ./ffp/start/lighttpd.sh start

6. Install database MySQL
mysql_install_db

7. cp /ffp/etc/examples/my.cnf /ffp/etc/
8. copy /exemples/php.ini-recommended to etc/php.ini

Now my HTTP + PHP Server is OK, SQL seem to be OK, I can show table and write, drop...

But after, PHP doesn't work with SQL, I try this edit php.ini and add in dynamic extension:

add extensions in:
extension=gd.so
extension=mysql.so
extension=pdo.so
extension=pdo_mysql.so

but when I lauch php -m I have errors like:
PHP Start up: Unable to load dynamic library ./*.so - file not found in Unknow on line 0

May be I must change extension_dir?
If yes, what is the path?

Thanks by advance for your help

Offline

 

#2 2008-12-17 02:45:35

asluiter
Member
From: Melbourne, Australia
Registered: 2008-11-08
Posts: 9

Re: Php.ini + MySQL: how to load extension=*.so

Hi,
I had the same problem. These modules (except gd.so) live in:

/ffp/lib/php/extensions/no-debug-non-zts-20060613/

so change the extension_dir to reflect this, restart lighttpd and you should be good.

Not sure where gd.so lives, and found it wasn't required for my pursposes anyway.

Good luck.

BTW - refer: http://81.216.140.39/dns-323/mysql_and_php/

Offline

 

#3 2008-12-17 05:17:37

BigNoob
Member
Registered: 2008-11-17
Posts: 7

Re: Php.ini + MySQL: how to load extension=*.so

Thanks for your answer! smile
With tis parameter:
extension_dir = "/ffp/lib/php/extensions/no-debug-non-zts-20060613/"
it work well (except gd.so)

Another Problem with PhpMyAdmin, I Have this message:

'Cannot load mcrypt extension. Please check your PHP configuration'

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB