You are not logged in.
Pages: 1
Every time I click on a link (PHP script), it is asking me what to do (SAVE).
I ran the command: lighttpd -t -f /path/lighttpd.conf and it gave me "syntax ok" response.
html files are being displayed properly and I've chmod 777 to all the files.
Any help will be appreciated. Thanks in advance.
Yes I installed PHP
From terminal, if I type "PHP /path/script file", it prints/scroll on the screen.
If not 777, what is considered readable by webserver?
Also, somewhere in my lighttpd.conf file is this setting:
# Fast CGI modules for PHP.
#
fastcgi.server = ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket",
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "16",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"min-procs" => 1,
"max-procs" => 1,
"idle-timeout" => 20
))
)
Another thing. If I execute in terminal: lighttpd -D /path/lighttpd.conf and leave the terminal open, when I click on the php script link on the browser and look back at the terminal screen, I see "SEGMENTATION FAULT" error.
I had a similar problem with this and I found that it was caused by the php package, so I removed it and installed the php-cli and php-common packages. That fixed it for me.
Offline
It didn't work for me. I uninstalled everyting. Reboot. installed php-cli and it needed the php and php-common as it installed them automatically.Reboot. Still did not work.
Ok, now that I reinstalled it I remember all the steps. Why does php-cli depend on lighttpd and php I don't know? Looks like like somebody packaged it wrong. All it really needs is php-common to work, but let's move on.
The missing dependency here is fastcgi which Lighttpd depends on to do php conversion with php-cli. So the package you need to get it is called fcgi - just install it and everything should work like you expect. I've just tested it with a Flatpress install, so it runs. I just had to get rid of the index.html file in /var/www/ before it would work... seems index.html files take priority over index.php.
Just remember to add Lighttpd to your start up daemons or each time you restart it, Lighttpd won't start. Just go to Menu ---> System Tools ---> Control Box ---> Initialization Tab - just add it to the Run daemons box as lighttpd making sure slim is last in the list and click Change.
Offline
Okay...I installed fastcgi and it seem to work when I type: "file://.../php_script", but NOT when using "http"
Thanks for all the help, BTW.
Have you tried modifying /etc/lighttpd/lighttpd.conf to reflect where you want stuff? It defaults to http://localhost/ being at /var/www/ on your system. It also allows the directory ~/Public for users located @ http://localhost/~username/
EDIT: Hmmm, seems my lighttpd isn't starting at boot. I just had to run lighttpd -f /etc/lighttpd/lighttpd.conf to make it work again - maybe I should add it to local.sh again 
Offline
Hi,
@Trixar_za: Do you have lihgttpd in /etc/rcS.conf RUN_DAEMONS ?
Also fastcgi is not needed as far as I know.I dont realy understand the problems you got, Ok we have bugs with Xorg and graphical stuff but on the server side SliTaz is stable, actually the main server (Tank) runs 3.0 with lighttpd/php, this site runs 3.0 apache/php (on Pandoline), the mirror is also a VM with lighttpd/php and here on my system I just do: 'tazpkg get-install lighttpd && tazpkg get-install php' and all my PHP scripts works out-of-the-box in my ~/Public or in /var/www.
Offline
Hi again,
This is what I did right now to check lighttpd/php default install:
* Boot latest cooking (20110531 or xorg-light)
* By default we have a web server running, so stop it: # /etc/init.d/httpd stop
* Install lighthy: # tazpkg get-install lighttpd
* Check it runs: http://localhost/
* Install PHP: # tazpkg get-install php
* Check PHP settings: http://localhost/phpinfo/
You also have any entry in Developement menu for the php info page.
Offline
Yes, it needs fastcgi for the php conversion. It's also mentioned in the conf's comments (# Fast CGI modules for PHP.). Without it you get jp734's problem.
I noticed this last time when I tried using lighttpd and went through it's documentation to figure out why. Somehow I figured out that fastcgi was missing and found out that the badly named fcgi package contained it.
And yes, it's in my /etc/rcS.conf RUN_DAEMONS - so I'm not sure why it's not running. Maybe something is misconfiguration in my install somewhere.
The prior issue with php was on Ubuntu not and not SliTaz, so it's unrelated. Still, it's a bad idea to have php-cli depend on lighttpd and php when all that's really needed is php-common.
Offline
Hi,
I installed lighttpd and php and have both running without issues to date. Only thing i remember was that lighttpd didn't started after installation. It conflicted with httpd, so as Pankso said, there was the need to stop it and then start lighty by hand. I'm also added it to RUN_DAEMONS.
Maybe it is good to add this to the POST_INSTALL from lighty receipt, stopping the httpd server before starting lighty.
And lighty does not need the package fcgi, it just use its builtin fastcgi by default.
Offline
This seems related to SliTaz 3 rather than cooking though. Maybe Cooking's version has better cgi support that doesn't require fastcgi at all.
I was also wondering about how cooking (and SliTaz 4) would handle busybox's built in httpd - the next question that arises is how does it effect tazpanel?
Offline
@Trixar_za: You said "Still, it's a bad idea to have php-cli depend on lighttpd and php when all that's really needed is php-common" --> Thanks for pointing that out, fixed: http://hg.slitaz.org/wok/rev/62786d242bc4
For Busybox httpd and TazPanel, we start httpd with is own config file for TazPanel (/etc/slitaz/httpd.conf) and on port 82 so it dont conflick with an other webserver. Also TazPanel/httpd is run by root (is we want to perform system task) and is protected by default.
Offline
Finally got it working. I must have changed something on my lighttpd.conf file and not aware of it. So I uninstalled lighttpd and reinstalled so I will have a new configuration file, made some changes and everything is working as it should.
Thanks for all the help, Trixar_za and pankso
Hi @pankso,
I've just booted the last cooking iso and httpd is running both on 80 and 82 (netstat output), so it IS conflicting with lighttpd.
Offline
Hi,
cooking-xorg-lite.iso
/etc/rcS.conf RUN_DAEMONS="dbus hald slim firewall httpd"
Offline
Pages: 1
[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.57 MiB (Peak: 1.77 MiB) ]