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 2009-05-01 05:08:11

sil51
Member
From: France
Registered: 2009-04-25
Posts: 19
Website

PHP + Mysql : How to do with actual versions (fp0.5) ?

Hi,

Well... since few days, I'm trying to get working PHP + Mysql under my fresh funplug 0.5 install.... but not working for today sad

Ok, for now, fun_plug is working great, and php (5.2.6-3) under lighttpd is working too.
Problem comes with the install of Mysql...
After reading many "How To" or "Wiki", many versions of Mysql packages are not working with somes versions of php packages.

Today, I installed mysql-5.1.28-rc-1.tgz, install ok (from CH3SNAS:Tutorials/Mysql), but under php, unable to connect to database :

Code:

(mod_fastcgi.c.2618) FastCGI-stderr: PHP Fatal error:  Call to undefined function mysql_connect() in /mnt/HD_a2/www/pages/testmysql.php on line 3

It's reallly boring .... all I need is lighttpd working (actually ok,very easy with fun_plug 0.5), php running (seems to be ok with php-5.2.6-3.tgz), and Mysql (not working for now).

So, Is there any Wiki that should tell which version of php compatible with which version of mysql? And which tutorial can help to get it working (setting of my.cnf, php.ini, and library to install relative to fun_plug 0.5...)?

I'm sorry if I bored someone with my post, but I think that every new users of NAS aren't able to learn unix + php + mysql communication in short time to get a simple php+mysql web server working on the NAS...

But I'm sure that it could be a simple way to have a "model" of settings to have under our DNS-323 that could be enough for many (new) limited users, like me.

I hope someone could help me to make a very simple tutorial for this type of installation with the actual packages !
If I can get it working, believe me that I'll share it with the community!

See you.

Last edited by sil51 (2009-05-01 05:08:41)


-=[ Sil 51 ]=-
DNS-323 / Firmware 1.09 / 2 x SAMSUNG Spinpoint F1 1To HD103UJ / FFP 0.5

Offline

 

#2 2009-05-01 18:44:59

DeLaCroix
Member
Registered: 2007-08-18
Posts: 91
Website

Re: PHP + Mysql : How to do with actual versions (fp0.5) ?

If you follow the Tutorial on nas-tweaks.net, it should be working flawlessly. Btw: during my tutorial, you get 5.0.67 installed instead of 5.1.28.

Still all this doesn't explain your issue, but i believe, you didn't activate mysql in the php.ini as told in the php-tutorial on nas-tweaks.net.

Hope that helps!

Offline

 

#3 2009-05-01 18:59:14

sil51
Member
From: France
Registered: 2009-04-25
Posts: 19
Website

Re: PHP + Mysql : How to do with actual versions (fp0.5) ?

DeLaCroix wrote:

If you follow the Tutorial on nas-tweaks.net, it should be working flawlessly. Btw: during my tutorial, you get 5.0.67 installed instead of 5.1.28.

Well, version of mysql isn't really important ... the most important is that can work! I'll see the tutorial to try again a new install of mysql, like you suggest. I come back to tell if it's working or not!

DeLaCroix wrote:

Still all this doesn't explain your issue, but i believe, you didn't activate mysql in the php.ini as told in the php-tutorial on nas-tweaks.net.

Hé hé, I was waiting for this suggestion, but yes, I activated mysql in php.ini :

Code:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

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

...

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

...

; Linux extensions
extension=calendar.so
;extension=ctype.so
;extension=ftp.so
extension=gd.so
extension=mbstring.so
extension=mysql.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
extension=sqlite.so
;extension=tokenizer.so
extension=zlib.so

-=[ Sil 51 ]=-
DNS-323 / Firmware 1.09 / 2 x SAMSUNG Spinpoint F1 1To HD103UJ / FFP 0.5

Offline

 

#4 2009-05-01 19:11:48

DeLaCroix
Member
Registered: 2007-08-18
Posts: 91
Website

Re: PHP + Mysql : How to do with actual versions (fp0.5) ?

sil51 wrote:

So, Is there any Wiki that should tell which version of php compatible with which version of mysql?

The php-versions of me & fonz are working with 5.0.67. I have an operating system here, so it is really working! smile

sil51 wrote:

I'm sorry if I bored someone with my post, but I think that every new users of NAS aren't able to learn unix + php + mysql communication in short time to get a simple php+mysql web server working on the NAS...

Which is why i wrote this tutorial smile

sil51 wrote:

But I'm sure that it could be a simple way to have a "model" of settings to have under our DNS-323 that could be enough for many (new) limited users, like me.

Follow the tutorial and you will be fine smile

sil51 wrote:

I hope someone could help me to make a very simple tutorial for this type of installation with the actual packages !

The shortest way is the tutorial on nas-tweaks.net, believe me!

sil51 wrote:

Well, version of mysql isn't really important

Its important, as you need to have the correct bindings.

sil51 wrote:

Hé hé, I was waiting for this suggestion, but yes, I activated mysql in php.ini

OK

Last edited by DeLaCroix (2009-05-01 19:13:06)

Offline

 

#5 2009-05-04 20:56:06

sil51
Member
From: France
Registered: 2009-04-25
Posts: 19
Website

Re: PHP + Mysql : How to do with actual versions (fp0.5) ?

Hi,

Well, before starting, I reinitialized fun-plug in the NAS, and reinstalled fun-plug 0.5 and activated SSH like mentionned in the CH3SNAS:Tutorials/fun plug.

In order to have Mysql working, it seems that we need to install all packages!!
I have followed every tutorials from http://nas-tweaks.net/CH3SNAS:Tutorials and everything is working now !!
So, for newbies : Follow every tutorials to have your NAS fully working!

But, be carreful, when installing the additional package "ffp-scripts-0.5-18.tgz", paths links are broken, so look at this thread.

Thanks to this forum and to DeLaCroix for the great help !

DeLaCroix : Is there anyway to have more php extensions (exif, zip) working on the NAS ?

Bye

Last edited by sil51 (2009-05-04 20:59:26)


-=[ Sil 51 ]=-
DNS-323 / Firmware 1.09 / 2 x SAMSUNG Spinpoint F1 1To HD103UJ / FFP 0.5

Offline

 

#6 2009-05-05 19:31:25

DeLaCroix
Member
Registered: 2007-08-18
Posts: 91
Website

Re: PHP + Mysql : How to do with actual versions (fp0.5) ?

sil51 wrote:

DeLaCroix : Is there anyway to have more php extensions (exif, zip) working on the NAS ?

It is, simply recompile php smile

Offline

 

#7 2012-01-13 08:13:46

L1
Member
From: France
Registered: 2008-03-15
Posts: 48

Re: PHP + Mysql : How to do with actual versions (fp0.5) ?

Hello,

I have the same problem sil51 had: (message ... PHP Fatal error:  Call to undefined function mysql_connect()  )
trouble is: I've followed exactly the procedure given in the tutorial @ [url]http://nas-tweaks.net/91/installation-and-configuration-of-php-on-fonz-fun_plug-0-5/#Optional:_Using_shared_extensions

Now:
lighttp is working (index.html is OK)
php is working   (index.php is OK)
mysql is working (using the command line)

but php + mysql is not working (testmysql.php is returning the error mentionned above)

of course, I've checked again and again th ephp.inin was correctly configured.... but I suppose I'm missing some packages ?

Offline

 

#8 2012-01-13 15:15:10

L1
Member
From: France
Registered: 2008-03-15
Posts: 48

Re: PHP + Mysql : How to do with actual versions (fp0.5) ?

OK! after some ppeking around, I might have an idea of the problem:
my file mysql.sock ends up in the folder /mnt/HD_a4/ffp/var/
it might be normal, but when reading the different configuration file, I get the idea that it should be located in /mnt/HD_a4/ffp/var/run/mysql
and there is nothing there!

shall I be concerned about it ?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB