WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: php, mysql, ligthtpd, fastcgi and the like  (Read 5030 times)

Offline kaltsoplyn

  • Newbie
  • *
  • Posts: 4
php, mysql, ligthtpd, fastcgi and the like
« on: November 06, 2011, 03:57:54 PM »
Hi all.

Ok, so I tried to set up my TC box to serve php through fastCGI and lighttpd.
It wouldn't work as I was getting all kinds of errors in the lighttpd errorlog, all coming from fastCGI which refused to start.
After resolving a number of issues, I started getting (persistently) this:

Quote
2011-11-06 22:44:03: (mod_fastcgi.c.1104) the fastcgi-backend /usr/local/bin/php-cgi failed to start:
2011-11-06 22:44:03: (mod_fastcgi.c.1108) child exited with status 127 /usr/local/bin/php-cgi
2011-11-06 22:44:03: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2011-11-06 22:44:03: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2011-11-06 22:44:03: (server.c.938) Configuration of plugins failed. Going down.
(sorry for the 'quote'. For some reason I'm not allowed to post code)

So I said that first thing's first, I should check to to see if I could get anything from php.
Being a - almost complete - newb in this area, I opened a terminal and gave a

Quote
/usr/local/bin/php -v

which returned (same error for php-cgi, of course):

Quote
/usr/local/bin/php: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: no such file or directory

Indeed, there is no such file, since mysql libraries are at .18 rather than .16

Now to me this doesn't look good. Is this my problem?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: php, mysql, ligthtpd, fastcgi and the like
« Reply #1 on: November 06, 2011, 04:01:10 PM »
Looks like php must be rebuild against current MySQL. As a temporary solution try symlink libmysqlclient.so.16 to libmysqlclient.so.18 It may work.
« Last Edit: November 06, 2011, 04:03:25 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline kaltsoplyn

  • Newbie
  • *
  • Posts: 4
Re: php, mysql, ligthtpd, fastcgi and the like
« Reply #2 on: November 06, 2011, 07:04:11 PM »
hmm thanks, but no, it doesn't seem to work. Actually, after I create the symlinks, php still complains about libmysqlclient.so.16 no such file or directory.

This confuses me, though, because it could qualify as a kinda top level issue. I mean it's php, which is kind of a big deal, and if I get this right, if one installs TC today, with the existing TCZ for php and mysql, he just won't be able to get php running? Is this possible? Nobody else in the Tiny Core community is having problems with php + mysql.18 ?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: php, mysql, ligthtpd, fastcgi and the like
« Reply #3 on: November 06, 2011, 10:29:51 PM »
Hi kaltsoplyn
The 4.x repository is still in the process of being built up. As extensions are moved from 3.x to 4.x
some of them are being updated so an occasional glitch will crop up.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: php, mysql, ligthtpd, fastcgi and the like
« Reply #4 on: November 07, 2011, 01:12:32 AM »
php still complains about libmysqlclient.so.16 no such file or directory.
if the symlink was made then it will not complain about it not being there. Did you run `sudo ldconfig` after creating the symlink?

php is on my to do list...along with many others
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline kaltsoplyn

  • Newbie
  • *
  • Posts: 4
Re: php, mysql, ligthtpd, fastcgi and the like
« Reply #5 on: November 07, 2011, 02:56:09 AM »
Hi and thanks for the answers. I really appreciate the time you people put in this project and so does everybody else here (I guess). The situation struck me as kinda weird, that's all, so I thought I'd ask. Keep up guys.

As for the symlinks, well, I was toying with 2 linux boxes yesterday and, well, I got a little confused.
Guessed it? I made the symlinks in one box (the one I was browsing when I read bmarkus' post), forgot all about it and a couple hours later tried running php on my TC box, remembering that I had created symlinks...somewhere... :)
Not my proudest moment (not my dumbest, either)...

Offline kaltsoplyn

  • Newbie
  • *
  • Posts: 4
Re: php, mysql, ligthtpd, fastcgi and the like
« Reply #6 on: November 08, 2011, 05:41:16 AM »
symlinking

/usr/local/lib/libmysqlclient.so.16 to /usr/local/mysql/lib/libmysqlclient.so.18

and

/usr/local/lib/libgmp.so.3 to /usr/local/lib/libgmp.so.10

at least gets the server started. Simple php is served well; haven't tried anything elaborate, though.

So, this is what? Partially solved, workarounded or what? :)

P.S.: just a question, though, because I ain't got a clue about those things: Is it necessary for the binaries of something to be compiled against a certain version of a shared library? Is this standard practice? Doesn't it guarantee that this something will fail when the shared libraries are updated?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: php, mysql, ligthtpd, fastcgi and the like
« Reply #7 on: November 08, 2011, 08:29:55 AM »
Worked around. There is a risk of incompatibility doing that.

Which version of a shared lib is linked against is decided by the upstream of that lib; if they keep a stable minor interface or whether each version will link differently, etc.
The only barriers that can stop you are the ones you create yourself.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: php, mysql, ligthtpd, fastcgi and the like
« Reply #8 on: November 08, 2011, 11:24:06 AM »
symlinking

/usr/local/lib/libmysqlclient.so.16 to /usr/local/mysql/lib/libmysqlclient.so.18

and

/usr/local/lib/libgmp.so.3 to /usr/local/lib/libgmp.so.10

at least gets the server started. Simple php is served well; haven't tried anything elaborate, though.
gmp should already have the symlink: http://forum.tinycorelinux.net/index.php/topic,11813.0.html
updating your extensions should get rid of at least that one
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard