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 2010-12-18 12:52:01

stefanth
Member
Registered: 2010-12-14
Posts: 63

Here is mcrypt.so

Dear sir or Madame

Those of you that is missing mcrypt.so (used by ajaxplorer and phphmyadmin among others)
Download the attachment and do the following.

Code:

cd /ffp
gunzip  mcrypt.tar.gz
tar -xvf mcrypt.tar

Sorry for not knowing how make a funpkg package, it is an ordinary gzip/tar file
Also, these files are created on a dlink NAS-320.

It will update 3 libmcrypt.so files in /ffp/lib and the file mcrypt.so in /ffp/lib/php/extensions/no-debug-non-zts-20060613

they are built on versions
mhash-0.9.9.9
libmcrypt-2.5.8
php-5.3.4

the mcypt.so is built with option --disable-posix-threads, will that be a problem ?

Regards Stefan

PS
Do not forget to add the extension mcrypt.so in the php.ini file and reboot the NAS before testing
DS

Last edited by stefanth (2010-12-18 13:16:20)

Offline

 

#2 2010-12-22 15:49:38

garath
Member
Registered: 2010-12-07
Posts: 5

Re: Here is mcrypt.so

Hi,

I'm sorry but i follow all your explanations but mcrypt is still not enabled in ajaXplorer tests.
I've added extension=mcrypt.so in php.ini, restarted the NAS (DNS-320), restarted lighttpd but nothing more, it is still not enabled for ajaXplorer.
Files are well in the right folders...

Any ideas?

Thanks!

Offline

 

#3 2010-12-22 18:59:40

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Dear garath

If you enter

Code:

php -v

or

Code:

php-cgi -v

Do you get any error messages ?

Also, try

Code:

php-cgi -m

, this will show wich modules have been loaded, is mcrypt among them

Are  the following lines in /ffp/etc/lighttpd.conf  uncomment ?

Code:

 
"mod_fastcgi"

fastcgi.server = ( ".php" => ((
    "bin-path"  => "/ffp/bin/php-cgi",
    "socket"    => "/tmp/php-cgi.socket",
    "max-procs" => 2
)))

in php.ini ,does extension_dir look like this

Code:

extension_dir = "/ffp/lib/php/extensions/no-debug-non-zts-20060613/"

?



If you enter

Code:

find / | grep mcrypt.so

does the follwoing files show up atleast (DMS-320)  ?

Code:

/mnt/HD/HD_a2/ffp/lib/libmcrypt.so.4.4.8
/mnt/HD/HD_a2/ffp/lib/libmcrypt.so.4
/mnt/HD/HD_a2/ffp/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so
/mnt/HD/HD_a2/ffp/lib/libmcrypt.so
/mnt/HD/HD_a2/test/mcrypt.so

Regards

Last edited by stefanth (2010-12-22 19:02:16)

Offline

 

#4 2010-12-22 19:06:55

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Dear garath

There is one other thing as well, I am starting lighthttp with my own script and not the standard one in /ffp/start/lighttpd.sh

Instead I have a (executable) script, /ffp/start/lighttpd2.sh that look like this

Code:

#!/ffp/bin/sh

# PROVIDE: lighttpd
# REQUIRE: LOGIN


/ffp/sbin/lighttpd -f /ffp/etc/lighttpd.conf &

The reason for this is that when I tested around with mcrypt the original ones messes things up with dlinks original
web browser that is of the type lighthttp as well so when I issues the stop command it affected dlinks as well.

Regards Stefan

Offline

 

#5 2010-12-22 19:21:38

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Dear garath

By the way, have you downloaded the toolchain to your NAS?
That is, are you able to build on your NAS, if so, the solution might be for you to compile the php yourself with those
seetings I used.

Regards

Offline

 

#6 2010-12-23 13:11:44

jamieburchell
Member
Registered: 2010-03-25
Posts: 37

Re: Here is mcrypt.so

I'm having this exact same issue, trying to get mcrypt working for AjaXplorer

php -v

PHP Warning:  PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so' - File not found in Unknown on line 0

ls -l /ffp/lib/php/extensions/no-debug-non-zts-20060613 | grep mcrypt.so

-rwxr-xr-x    1 root     root       116026 Dec 18 03:51 mcrypt.so


Any ideas?

php.ini

extension_dir = "/ffp/lib/php/extensions/no-debug-non-zts-20060613"
extension=mcrypt.so

find | grep mcrypt

./mcrypt.tar
./lib/libmcrypt.so.4.4.8
./lib/libmcrypt.so
./lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so
./lib/libmcrypt.so.4

Offline

 

#7 2010-12-25 23:39:23

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Dear jamieburchell

Try enter

Code:

ldconfig

and then reboot the nas.

Also, do you have the build environment setup on your NAS, if so,  I can show you how to built it yourself,
might something missing in the .tar file,

Regards

Offline

 

#8 2011-01-04 07:36:49

Fuzzbuckets
New member
Registered: 2011-01-04
Posts: 3

Re: Here is mcrypt.so

I have followed this as well. Thanks for the help. However, I am receiving the same error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so' - File not found in Unknown on line 0

What was the solution?  If it means anything, all of the other files in this folder have a "*.a" file associated with them.  The mcrypt.so is the only one that doesn't.

Regards.

Offline

 

#9 2011-01-04 11:41:01

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Dear Fuzzbuckets

I am sorry, it is difficult to know without closer look,
but I would assume that mcrypt.so is depending on something I did not have in my tar file.

Do you have installed the toolchain for compiling and building packages on your nas, if so you can try my build instructions
to build mcrypt.so yourself.


Regards

Offline

 

#10 2011-01-06 07:19:24

Fuzzbuckets
New member
Registered: 2011-01-04
Posts: 3

Re: Here is mcrypt.so

Not to go too far overboard, but...

I followed the explicit directions in post 1. Not sure if this means anything, but PHP "light" reading led me to this: "In order to get mcrypt to work in php, you have to configure and compile the libmcrypt source package with the following options:
./configure --disable-posix-threads --enable-dynamic-loading"

Notice is has --enable-dynamic-loading. No idea what that means, sorry.

Followed the suggestion from post 3 and got the same results as post 6.

Post 7 - Not sure where I should be in root access via telnet to run the ldconfig. Address of folder? /ffp/???

Any more help is greatly appreciated.

Last edited by Fuzzbuckets (2011-01-06 07:20:39)

Offline

 

#11 2011-01-06 11:49:40

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Dear all

It seems that something is greatly missing in the original tar file, I am not sure what however the following is the build instructions I did on my DNS-320

@Fuzzuckets, yes, several parts of mcrypt need to be configured and compiled differently, please see below
Some need be compiled static, otherwise the following ./configure will not work

Please try this and see if you still get the same error.

Note: you need a complete build environment on your NAS including toolchain.

If you get compilation errors during the built because fun_plug have a to old version of something like bison version,
please let me know and I can tell you how to build it
My system is so heavily patched so I am uncertain what is fun_plug and latest gnu version.

Do the following at your SHH prompt on the NAS

Notice, even you download the whole PHP implementation you will only compile a  fraction of it

You could put the follwoing instructions in a shell file if you want.
the "export TMPDIR=/ffp/tmp" is neccessary to have the compiler to use the mounted drive as scratch area, the ram /TMP is not enough


Code:

export LD_LIBRARY_PATH=/ffp/lib:/usr/local/lib:/lib
export TMPDIR=/ffp/tmp


mkdir /ffp/install
cd /ffp/install

wget http://sourceforge.net/projects/mhash/files/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
wget http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
wget http://sourceforge.net/projects/mcrypt/files/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
wget http://se2.php.net/get/php-5.3.4.tar.gz/from/se.php.net/mirror
wget http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz
wget http://sourceforge.net/projects/libpng/files/zlib/1.2.5/zlib-1.2.5.tar.gz

gunzip mhash-0.9.9.9.tar.gz
gunzip libmcrypt-2.5.8.tar.gz
gunzip mcrypt-2.6.8.tar.gz
gunzip php-5.3.4.tar.gz
gunzip re2c-0.13.5.tar.gz
gunzip zlib-1.2.5.tar.gz

tar -xvf mhash-0.9.9.9.tar.gz
tar -xvf libmcrypt-2.5.8.tar.gz
tar -xvf mcrypt-2.6.8.tar.gz
tar -xvf php-5.3.4.tar.gz
tar -xvf re2c-0.13.5.tar.gz
tar -xvf zlib-1.2.5.tar.gz

cd /ffp/install/re2c-0.13.5
./configure --disable-posix-threads --enable-dynamic-loading --prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include
make 
make install
ldconfig


cd /ffp/install/zlib-1.2.5
./configure --prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include
make 
makeinstall
ldconfig


cd /ffp/install/mhash-0.9.9.9
./configure --disable-posix-threads --enable-dynamic-loading --prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include --enable-static-link
make 
make install
ldconfig


cd /ffp/install/libmcrypt-2.5.8
./configure --disable-posix-threads --enable-dynamic-loading --prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include --enable-static-link
make 
make install
ldconfig


cd /ffp/install/mcrypt-2.6.8
./configure --disable-posix-threads --enable-dynamic-loading --prefix=/ffp --with-libmcrypt-prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include
make 
make install
ldconfig


cd /ffp/install/php-5.3.4/ext/mcrypt
phpize
aclocal
./configure --host=arm-unknown-linux --prefix=/ffp --disable-posix-threads --enable-dynamic-loading  --enable-shared --libdir=/ffp/lib --includedir=/ffp/include --disable-all --with-mcrypt=/ffp --with-php-config=/ffp/bin/php-config
make 
make install
ldconfig

Regards Stefan

Last edited by stefanth (2011-01-06 11:53:18)

Offline

 

#12 2011-03-30 08:52:30

kayaroti
Member
Registered: 2011-03-30
Posts: 25

Re: Here is mcrypt.so

stefanth wrote:

Dear sir or Madame

Those of you that is missing mcrypt.so (used by ajaxplorer and phphmyadmin among others)
Download the attachment and do the following.

Code:

cd /ffp
gunzip  mcrypt.tar.gz
tar -xvf mcrypt.tar

Sorry for not knowing how make a funpkg package, it is an ordinary gzip/tar file
Also, these files are created on a dlink NAS-320.

It will update 3 libmcrypt.so files in /ffp/lib and the file mcrypt.so in /ffp/lib/php/extensions/no-debug-non-zts-20060613

they are built on versions
mhash-0.9.9.9
libmcrypt-2.5.8
php-5.3.4

the mcypt.so is built with option --disable-posix-threads, will that be a problem ?

Regards Stefan

PS
Do not forget to add the extension mcrypt.so in the php.ini file and reboot the NAS before testing
DS

Hi,

Is the attachment still available ?

Offline

 

#13 2011-03-30 13:14:54

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Hi

Hmm, it is gone, ok, I will upload it later tonight


/Stefan

Offline

 

#14 2011-03-30 13:37:49

kayaroti
Member
Registered: 2011-03-30
Posts: 25

Re: Here is mcrypt.so

stefanth wrote:

Hi

Hmm, it is gone, ok, I will upload it later tonight


/Stefan

Great.  TIA !

Offline

 

#15 2011-03-31 19:59:18

kayaroti
Member
Registered: 2011-03-30
Posts: 25

Re: Here is mcrypt.so

Hi Stefan,

Hope you can upload the mcrypt tar file soon.

TIA !

Offline

 

#16 2011-04-01 11:09:34

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Hi


Here is a link to the tar, sorry for the delay

http://www.stefanolth.org/common/mcrypt.tar.gz

The tar is built "from" /ffp so copy the tarball to /ffp and execute
tar -zxvf mcrypt.tar.gz


Please note that I have "just" built the mcrypt.so, I have not tested it this time because nowadays I compile the support of it
directly into php and do not make a separate library of it as I did before.

After the following your should have mcrypt.co in /ffp/lib/extensions/debug-non-zts-20060613

/ffp/lib should look like this
# ls -lsa /ffp/lib | grep libmcrypt
    4 -rwxr-xr-x  1 root root      814 Feb  9 18:37 libmcrypt.la
    0 lrwxrwxrwx  1 root root       18 Feb  9 18:37 libmcrypt.so -> libmcrypt.so.4.4.8
    0 lrwxrwxrwx  1 root root       18 Feb  9 18:37 libmcrypt.so.4 -> libmcrypt.so.4.4.8
   60 -rwxr-xr-x  1 root root    56275 Feb  9 18:37 libmcrypt.so.4.4.8



/Stefan

Last edited by stefanth (2011-04-01 11:57:08)

Offline

 

#17 2011-04-01 14:25:20

kayaroti
Member
Registered: 2011-03-30
Posts: 25

Re: Here is mcrypt.so

I have untar the tarball, put a soft link in php/extension to point to mcrypt.so in /ffp/lib/extensions/debug-non-zts-20060613, restarted lighttpd.
But Ajaxplorer still complain need to install Mcrypt in order to use publiclet.

Do I have to update anything in Ajaxplorer to enabled the mcrypt or perform some installation steps ?

Offline

 

#18 2011-04-02 07:38:19

kayaroti
Member
Registered: 2011-03-30
Posts: 25

Re: Here is mcrypt.so

Hi Stefanth,

Thanks for taking the trouble to compile and upload the file.
The mcrypt still did not get enabled in ajaxplorer.  I will try to see if I miss any step.

Offline

 

#19 2011-04-02 23:54:45

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Hi

If you enter

Code:

php

and

Code:

php -i | grep crypt

What does it say ?

Did you kill all php and php-cgi script after the installation ?

If you do this , what does it return

Code:

 more /ffp/etc/php.ini |grep extension_dir

if it shows /ffp/lib/extensions/no-debug-non-zts-20060613/, what does it look like on your NAs if you enter

Code:

ls -lsa /ffp/lib/extensions/no-debug-non-zts-20060613/

/Stefan

Last edited by stefanth (2011-04-02 23:55:30)

Offline

 

#20 2011-04-03 07:30:05

kayaroti
Member
Registered: 2011-03-30
Posts: 25

Re: Here is mcrypt.so

Hi,

both returns

Code:

PHP Warning:  PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so' - File not found in Unknown on line 0

All the .so lib for my php installation are found in /ffp/lib/php/extensions/no-debug-non-zts-20060613

That is why I put a softlink  after untaring the tarball you have provided as follow

Code:

ls -l /ffp/lib/extensions/debug-non-zts-20060613/mcrypt.so

lrwxrwxrwx    1 root     root           52 Apr  1 11:15 mcrypt.so -> /ffp/lib/extensions/debug-non-zts-20060613/mcrypt.so

Last edited by kayaroti (2011-04-03 07:37:57)

Offline

 

#21 2011-04-03 22:22:32

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Hi

You do not have to put a softlink, just copy the file and remove the file comming from the tarball,
uhm, it might be copy and paste error, but it seems that you are linking to the file itself, that is,
the file /ffp/lib/extensions/debug-non-zts-20060613/mcrypt.so is linking to /ffp/lib/extensions/debug-non-zts-20060613/mcrypt.so

/Stefan

Offline

 

#22 2011-04-04 18:39:25

kayaroti
Member
Registered: 2011-03-30
Posts: 25

Re: Here is mcrypt.so

Its a cut and paste error.

I have now copied mcrypt.so into /ffp/lib/php/extensions/debug-non-zts-20060613 as my php extension_dir is pointing there. Result still the same.

Offline

 

#23 2011-04-04 22:24:52

stefanth
Member
Registered: 2010-12-14
Posts: 63

Re: Here is mcrypt.so

Hmmm, strange, and it looks like this on your server ?

Code:

/ffp/lib#  ls -lsa libmcrypt*.so*
 0 lrwxrwxrwx 1 root root    18 Feb  9 18:37 libmcrypt.so -> libmcrypt.so.4.4.8
 0 lrwxrwxrwx 1 root root    18 Feb  9 18:37 libmcrypt.so.4 -> libmcrypt.so.4.4.8
60 -rwxr-xr-x 1 root root 56275 Feb  9 18:37 libmcrypt.so.4.4.8

May I gain accrss to your server , that is ftp and ssh, or at lest ssh ?
You can e-mail me the info to misca@hotmail.com

/Stefan

Last edited by stefanth (2011-04-04 22:25:33)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB