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-03-13 12:41:13

ArcanuS_ME
Member
From: Podgorica, Montenegro, Europe
Registered: 2009-11-24
Posts: 22

Lighthttpd, PHP and MySQL on DNS-313 problem

Hi boys and girls!

I wanted to install PHP and MySQL on my DNS-313, so I installed the latest version of lighthttpd from Fonz website:
lighttpd-1.4.25-1
zlib-1.2.3-3
I configured lighthttpd to listen on port 8088 (and configured my router according to that)

After that, I followed instructions from http://81.216.140.39/dns-323/mysql_and_php/ to install PHP and MySQL. I installed following version:
mysql-5.1.28-rc-1
php-5.2.6-mysql51-1

I copied sample config file for MySQL: cp /ffp/etc/examples/my.cnf /ffp/etc/.
I copied sample config file for PHP: cp /ffp/etc/examples/php.ini-recommended /ffp/etc/php.ini

Then I added following lines to end of pnp.ini file (using vim):

Code:

extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/mysql.so
extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/pdo.so
extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so
extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/zlib.so

Then I run  mysql_install_db and set root password for MySQL.

Then I created index.php in cd mnt/HD_a2/www/pages/ with following code in it:

Code:

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?> 
 </body>
</html>

I started lighthttpd:
sh ffp/start/lighttpd.sh start

I started MySQL:
sh ffp/start/mysqld.sh start

Then I opened my browser on http://192.168.1.3:8088/
but all I'm getting is 403 - Forbidden error.

Checking mnt/HD_a2/www/logs doesn't give me any clues (error.log is empty)...

Please, help me how to figure out this!

Last edited by ArcanuS_ME (2010-03-13 12:43:22)

Offline

 

#2 2010-03-13 13:24:40

ArcanuS_ME
Member
From: Podgorica, Montenegro, Europe
Registered: 2009-11-24
Posts: 22

Re: Lighthttpd, PHP and MySQL on DNS-313 problem

Problem solved!

Instead of using sample lighthttpd config file from examples: /mnt/HD_a4/ffp/etc/examples/lighttpd.conf I used this example file:
lighttpd.conf-with-php and copied it to /etc/lighttpd.conf

I also used this php.ini: wget http://81.216.140.39/dns-323/mysql_and_php/php.ini and placed it into /etc folder.

Now, I'm getting ''Hello world!'' response wink

Now, placing following code into index.php I'm getting what I want (for now):

Code:

<html>
 <head>
  <title>PHP Info</title>
 </head>
 <body>
 <?php
  phpinfo() ;
 ?>
 </body>
</html>

Result is:
http://i913.photobucket.com/albums/ac338/ArcanuS_ME/Image1-3.jpg

Last edited by ArcanuS_ME (2010-03-13 13:33:29)

Offline

 

#3 2010-07-02 02:34:06

Rdubs33
New member
Registered: 2010-07-01
Posts: 3

Re: Lighthttpd, PHP and MySQL on DNS-313 problem

Hey ArcanuS_ME

I'm having a little trouble with a program called musicserver, but followed the same steps to get mysql, php and lighttpd up on my dns-323.

I'm getting the following errors:

Warning: Your PHP installation lacks the Multibyte String Functions extension
Warning: Your PHP installation lacks the Internationalization Functions extension

...which leads me to believe I don't have the php.ini file correct.  This is what the end of my php.ini file looks like:

Code:

; Local Variables:
; tab-width: 4
; End:

extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/gd.so
extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/mysql.so
extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/pdo.so
extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so
extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/mbstring.so
extension=ffp/lib/php/extensions/no-debug-non-zts-20060613/zlib.so

These are my extensions in ffp/lib/php/extensions/no-debug-non-zts-20060613

calendar.a     ftp.a          mbstring.a     pdo.a          pdo_sqlite.a   tokenizer.a
calendar.so    ftp.so         mbstring.so    pdo.so         pdo_sqlite.so  tokenizer.so
ctype.a        gd.a           mysql.a        pdo_mysql.a    sqlite.a       zlib.a
ctype.so       gd.so          mysql.so       pdo_mysql.so   sqlite.so      zlib.so

It looks like I'm enabling the mbstring.so extension in the php.ini, but I don't have an extension for the Internationalization error.  Do I have to do anything other than place the extension code in the php.ini file?

Any help is much appreciated, I'm new to linux and only know it because I'm trying to hack all this fun stuff on the nas.

Thanks in advance!

Offline

 

#4 2010-07-09 15:54:35

Rdubs33
New member
Registered: 2010-07-01
Posts: 3

Re: Lighthttpd, PHP and MySQL on DNS-313 problem

I was unable to find these examples, maybe you can point me in the right direction.  I couldn't find what I was looking for, hence, my post on this forum.  Any specific answers to my question and errors above?

Again, I'm not a Linux pro, so this is quite new to me.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB