macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 10:42:45 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: PHP doesn't work .... (lighttpd)  (Read 2986 times)
0 Members and 1 Guest are viewing this topic.
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« on: November 07, 2006, 15:40:29 PM »

Hello,

i've a problem with PHP in combination with lighttpd.
The eror i get is:

2006-11-07 13:29:34: (log.c.135) server stopped
2006-11-07 13:30:18: (log.c.75) server started
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/gd.so' - File not found in Unknown on line 0


I try to run the phpinfo.php...
Library is installed at both /opt/usr/lib/php/gd.so
and /usr/lib/php/gd.so

Who can help me out ?
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #1 on: November 07, 2006, 16:38:18 PM »


Is php installed to / or to /opt ?

If it is installed to /opt, try to do this :

ln -s /opt/usr/lib/php /usr/lib/php
Logged
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #2 on: November 07, 2006, 17:51:56 PM »

Already had it...


root@OpenWrt:~#  ln -s /opt/usr/lib/php /usr/lib/php
ln: /usr/lib/php/php: File exists

Do you have other solutions ?

(ps i also instaled libjpeg)
Logged
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #3 on: November 07, 2006, 17:56:27 PM »

Since i've installed the libjpg i don't see the error in the logfile anymore when i try to open the infophp.php.  But still i get page not found (404).

2006-11-07 13:30:18: (log.c.75) server started
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/gd.so' - File not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/gd.so' - File not found in Unknown on line 0
2006-11-07 14:52:42: (log.c.135) server stopped
2006-11-07 14:53:29: (log.c.75) server started
2006-11-07 14:56:26: (log.c.135) server stopped
2006-11-07 14:56:43: (log.c.75) server started
Logged
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #4 on: November 07, 2006, 23:39:55 PM »

The php problem is partly solved now. I reinstalled the packages to /opt and used ln commands like macsat proposed. Thank you !

At this moment i try to get the session_start() command getting to work. I have installed:

php5-cgi - 5.0.5-1 - PHP5 compiled as for CGI
php5-mod-gd - 5.0.5-1 - GD module for PHP5
php5-mod-mysql - 5.0.5-1 - MySQL module for PHP5
php5-mod-session - 5.0.5-1 - Sessions module for PHP5

The last one should now the session command ??!
I'm getting :

Fatal error: Call to undefined function session_start() in /opt/www/files.php on line 22

Who can help ?
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #5 on: November 08, 2006, 09:22:51 AM »


Did you remember to load the session module in lighttpd.conf ?
Logged
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #6 on: November 08, 2006, 09:56:58 AM »

I have it in the php.ini file:

;extension=ftp.so
extension=gd.so
extension=mysql.so
;extension=pcre.so
extension=session.so
;extension=sockets.so
;extension=xml.so

Should there also be something adapted in the lighttpd.conf ?

Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #7 on: November 08, 2006, 11:45:40 AM »


I think the above should be enough.

Does a php page with :

<?PHP  phpinfo();  ?>

Give you any info on session ?
Logged
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #8 on: November 08, 2006, 12:43:22 PM »

Please could you check: http://81.69.0.55:81/phpinfo.php

I only see session=shared
Logged
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #9 on: November 08, 2006, 13:10:48 PM »

When i put in the php file

dl("session.so"); 
session_start();

I got:

Warning: dl() [function.dl]: Unable to load dynamic library '/usr/lib/extensions/no-debug-non-zts-20041030/session.so' - File not found in /opt/www/XXX.php on line 23

Fatal error: Call to undefined function session_start() in /opt/www/XXX.php on line 26


Does did help to find the answer ?
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #10 on: November 08, 2006, 13:17:16 PM »


Sure is looking odd.

From where did you get the lighttpd binaries ?

Logged
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #11 on: November 08, 2006, 13:39:05 PM »

lighttpd - 1.4.11-1 - a flexible and lightweight web server,
lighttpd-mod-cgi - 1.4.11-1 - a CGI module for lighttpd
lighttpd-mod-fastcgi - 1.4.11-1 - FASTCGI module for lighttpd
lighttpd-mod-simple-vhost - 1.4.11-1 - a simple virtual hosting module for lighttpd
lighttpd-mod-status - 1.4.11-1 - a server status display module for lighttpd

I think from the links in the tutorial from you
Logged
nsn
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #12 on: November 08, 2006, 14:37:23 PM »

I found the problem !!!... The problem was not having the php.ini in the /etc directory but in the /opt/etc directory.....

thanks for your help !!
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #13 on: November 08, 2006, 16:35:50 PM »


Yeah...now you mention it, that was a problem for me as well.

I made a symlink to the /opt/etc/php.ini file from /etc/

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.504 seconds with 24 queries.