WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Lighttpd PHP and libmysqlclient.so  (Read 8044 times)

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Lighttpd PHP and libmysqlclient.so
« on: November 23, 2011, 11:03:31 AM »
Hello all!

I'am running TC 4 (updated) with Lighttpd and PHP - BUT every time I that I try to get the server UP, it says that php.cgi does not find the 'libmysqlclient.so'

Both php, lighttpd and mysql are in the onBoot file...

Where is the libmysqlclient.so anyway?

If someone has any point about that... it will be very appreciated!

Thanks!

« Last Edit: November 23, 2011, 11:22:13 AM by Zendrael »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Lighttpd PHP and libmysqlclient.so
« Reply #1 on: November 23, 2011, 02:13:24 PM »
Hi Zendrael
libmysqlclient.so should be located in:
usr/local/lib/mysql/libmysqlclient.so

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Lighttpd PHP and libmysqlclient.so
« Reply #2 on: November 23, 2011, 03:20:59 PM »
Probably lighttpd requires a rebuild against current MySQL package.
Béla
Ham Radio callsign: HA5DI

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

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Lighttpd PHP and libmysqlclient.so
« Reply #3 on: November 23, 2011, 03:46:41 PM »
Hello @Rich!

There is no mysql inside /usr/local/lib !!!

And the mysql.tcz package is loaded at boot... what might be happening?

@bmarkus, do you think that the problem can be lighttpd?


Thanks all!

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: Lighttpd PHP and libmysqlclient.so
« Reply #4 on: November 23, 2011, 03:53:41 PM »
The php5 extension in the 4.x repo still needs to be updated and built against the updated mysql.  That is what is causing the libmysqlclient.so error.  I still have a few other extensions that need to be made that php depends on before updating it.  If you feel that you need it earlier than I can get to it (maybe next week) you are welcome to take over the maintenance of the php5 extension.  There is a build script that should do (most) everything automatically in the extension sources.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Lighttpd PHP and libmysqlclient.so
« Reply #5 on: November 23, 2011, 04:03:10 PM »
Hi @robc!

I don't know if I am experienced enough with TC extensions to maintain the PHP extension - but sure i wish to learn how to do that!

Also, I can wait for it until you get to it!

PHP is needed on my project to run, but I can develop it on other machine until the extension is not up to date.

When you update it, it will be ok to use on TC 4.0 and 4.1? (I am using 4.0)

Thanks for your attention!

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Lighttpd PHP and libmysqlclient.so
« Reply #6 on: November 24, 2011, 08:05:40 PM »
Probably lighttpd requires a rebuild against current MySQL package.

Noted. That's probably a good idea.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Lighttpd PHP and libmysqlclient.so
« Reply #7 on: November 25, 2011, 02:10:54 AM »
Hello @Rich!

There is no mysql inside /usr/local/lib !!!

And the mysql.tcz package is loaded at boot... what might be happening?

@bmarkus, do you think that the problem can be lighttpd?


Thanks all!

You can symlink it to /usr/local/lib
Béla
Ham Radio callsign: HA5DI

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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Lighttpd PHP and libmysqlclient.so
« Reply #8 on: November 25, 2011, 08:07:14 AM »
Hi Zendrael
You can try from a terminal
find /usr -iname mysql
If it returns a  mysql  directory located somewhere else, you can link that to  /usr/local/lib
If it returns nothing, mysql is probably not loaded. If  mysql  was loaded, you should see it listed
under  /usr/local/tce.installed

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Lighttpd PHP and libmysqlclient.so
« Reply #9 on: November 28, 2011, 11:41:07 AM »
Hello all!

The php5.tcz was updated (Thanks Robc!) and solved the libmysqlclient.so problem BUT it now asks for libdb-5.0.so !!!

Whant can I do now?

Thanks!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Lighttpd PHP and libmysqlclient.so
« Reply #10 on: November 28, 2011, 11:51:45 AM »
Hi Zendrael
That would be  bsddb.tcz  it's complaining about which provides:
usr/local/lib/libdb-5.1.so
You can try linking to it:
sudo ln -s usr/local/lib/libdb-5.1.so usr/local/lib/libdb-5.0.so
and see if that gets you any further.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: Lighttpd PHP and libmysqlclient.so
« Reply #11 on: November 28, 2011, 01:27:20 PM »
Hello all!

The php5.tcz was updated (Thanks Robc!) and solved the libmysqlclient.so problem BUT it now asks for libdb-5.0.so !!!

Whant can I do now?

Thanks!
It should not be asking for libdb-5.0.so, that library was never present during the build.  It should be asking for libdb-5.1.so.  Did you update the dep file when updating the extension?  I didn't see any runtime problems when the binary was tested.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Lighttpd PHP and libmysqlclient.so
« Reply #12 on: November 28, 2011, 07:20:00 PM »
Hi @robc!

My bad, it was saying libdb-5.1.so! And that is fixed now after I installed bsddb.tcz (thanks @Rich)!

Only one problem left (I hope) when I try to start the server:

Code: [Select]
(mod_fastcgi.c.1104) the fastcgi-backend /usr/local/bin/php-cgi failed to start:
(mod_fastcgi.c.1108) child exited with status 2 /usr/local/bin/php-cgi
(mod_fastcgi.c.1111) If you are trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
...

and the server falls down!

This is a Lighttpd problem, right?

Thanks again for your attention!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Lighttpd PHP and libmysqlclient.so
« Reply #13 on: November 28, 2011, 08:40:55 PM »
Hi Zendrael
Did you read the info tab for php5.tcz?
Quote
      For lighttpd (from lighttpd wiki):
         make sure mod_fastcgi is loaded in your
         lighttpd.conf:
            server.modules = (
               "mod_fastcgi",
               )
            
         Then add this basic section to the same file:
            fastcgi.server = ( ".php" => ((
               "bin-path" => "/usr/local/bin/php-cgi",
               "socket" => "/tmp/php.socket"
               )))

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Lighttpd PHP and libmysqlclient.so
« Reply #14 on: December 01, 2011, 09:04:40 AM »
Hello @Rich!

I did it right after I installed Lighttpd and php5!

Here is my lighttpd.conf file:

Code: [Select]
server.modules = (
"mod_alias",
"mod_compress",
  "mod_redirect",
"mod_access",
# "mod_auth",
"mod_setenv",
"mod_cgi",
"mod_fastcgi",
#       "mod_rewrite",
)

server.document-root        = "/home/tc/www"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
#server.errorlog             = "/var/log/lighttpd/error.log"
#server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "tc"
server.groupname            = "staff"

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm",
                               " index.lighttpd.html" )

#url.access-deny             = ( "~", ".inc" )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl"

dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"

#compress.cache-dir          = "/var/cache/lighttpd/compress/"
#compress.filetype           = ( "application/x-javascript", "text/css", "text/html", "text/plain" )

#include_shell "/usr/share/lighttpd/create-mime.assign.pl"
#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

#### mimetype mapping
mimetype.assign             = (
  ".pdf"          =>      "application/pdf",
  ".sig"          =>      "application/pgp-signature",
  ".spl"          =>      "application/futuresplash",
  ".class"        =>      "application/octet-stream",
  ".ps"           =>      "application/postscript",
  ".torrent"      =>      "application/x-bittorrent",
  ".dvi"          =>      "application/x-dvi",
  ".gz"           =>      "application/x-gzip",
  ".pac"          =>      "application/x-ns-proxy-autoconfig",
  ".swf"          =>      "application/x-shockwave-flash",
  ".tar.gz"       =>      "application/x-tgz",
  ".tgz"          =>      "application/x-tgz",
  ".tar"          =>      "application/x-tar",
  ".zip"          =>      "application/zip",
  ".mp3"          =>      "audio/mpeg",
  ".m3u"          =>      "audio/x-mpegurl",
  ".wma"          =>      "audio/x-ms-wma",
  ".wax"          =>      "audio/x-ms-wax",
  ".ogg"          =>      "application/ogg",
  ".wav"          =>      "audio/x-wav",
  ".gif"          =>      "image/gif",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".xbm"          =>      "image/x-xbitmap",
  ".xpm"          =>      "image/x-xpixmap",
  ".xwd"          =>      "image/x-xwindowdump",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  ".asc"          =>      "text/plain",
  ".c"            =>      "text/plain",
  ".cpp"          =>      "text/plain",
  ".log"          =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".qt"           =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".asf"          =>      "video/x-ms-asf",
  ".asx"          =>      "video/x-ms-asf",
  ".wmv"          =>      "video/x-ms-wmv",
  ".bz2"          =>      "application/x-bzip",
  ".tbz"          =>      "application/x-bzip-compressed-tar",
  ".tar.bz2"      =>      "application/x-bzip-compressed-tar"
 )

fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/local/bin/php-cgi",
"socket" => "/tmp/php.socket"
))
)


But the problem about it failing continues... And I tryed to change it from positions in the file and nothing different happens...