View previous topic :: View next topic |
Author |
Message |
koenr
Joined: 07 Jun 2011 Posts: 26
|
Posted: Thu Aug 30, 2012 8:47 Post subject: work.php generates internal server error |
|
|
Hi all,
We noticed that extra packages are not installed on our clients. After some investigation we found in our apache logs
Code: | 127.0.0.1:443 172.16.0.94 - - [30/Aug/2012:08:34:46 +0200] "GET /work.php?m23clientID=298 HTTP/1.1" 200 3040 "-" "Wget/1.13.4 (linux-gnu)"
127.0.0.1:443 172.16.0.103 - - [30/Aug/2012:08:34:48 +0200] "GET /work.php?m23clientID=307 HTTP/1.1" 200 3056 "-" "Wget/1.13.4 (linux-gnu)"
127.0.0.1:443 172.16.0.90 - - [30/Aug/2012:08:34:52 +0200] "GET /work.php?m23clientID=294 HTTP/1.1" 200 3040 "-" "Wget/1.13.4 (linux-gnu)"
127.0.0.1:443 172.16.0.2 - - [30/Aug/2012:09:41:17 +0200] "GET /work.php?m23clientID=287 HTTP/1.1" 500 3040 "-" "Wget/1.13.4 (linux-gnu)"
127.0.0.1:443 172.16.0.92 - - [30/Aug/2012:09:41:18 +0200] "GET /work.php?m23clientID=296 HTTP/1.1" 500 3040 "-" "Wget/1.13.4 (linux-gnu)"
127.0.0.1:443 172.16.0.93 - - [30/Aug/2012:09:41:18 +0200] "GET /work.php?m23clientID=297 HTTP/1.1" 500 3040 "-" "Wget/1.13.4 (linux-gnu)"
|
If I do a 172.16.0.1/work.php?m23clientID=300 on a clietnt, I get an Internal server error 500.
If you look at the errormessage, you see yesterday afternoon the installation ending, all nicely with 200 in the logs, today after a reboot, I get the server 500 message.
I found the problem by searching how to get a username field on the login screen of an Ubuntu 12.04. There is apparently a variable wrong; It can be solved by adding sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'
So I created a script to change this and distribute that using m23
Code: |
/*
Description: Script to make the login screen of Ubuntu 12.04 show a username
Priority: 5
*/
include ("/m23/data+scripts/packages/m23CommonInstallRoutines.php");
include ("/m23/inc/distr/debian/clientConfigCommon.php");
function run($id)
{
echo ("greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf);
sendClientStatus($id,"done");
executeNextWork();
};
|
Any idea how to debug this internal server error?
Server versions
- m23 version and patch level: 12.3 rock (100592)
- Installation medium: Unknown source
- OS: Debian GNU/Linux 6.0 \n \l
- Virtual machine or native: native
- Kernel: Linux m23 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 GNU/Linux
Network settings
- Internet connection check: ok
- Domain name resolution check: ok
- Download without proxy: MD5 ok Size ok
- Download with proxy: MD5 ok Size ok
Daemons
- Apache: Apache/2.2.16 (Debian)
- MySQL: MySQL version: 5.1.63 MySQL protocol: 10 Uptime: 685983 Threads: 10 Questions: 242503 Slow queries: 191 Opens: 7879 Flush tables: 2 Open tables: 64 Queries per second avg: 0.353
Free disk space
Code: | Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md0 929817856 42086796 840498968 5% /
tmpfs 8222356 0 8222356 0% /lib/init/rw
udev 8217340 148 8217192 1% /dev
tmpfs 8222356 0 8222356 0% /dev/shm
/dev/sdb1 1903631288 42681244 1764251120 3% /var |
|
|
Back to top |
|
|
Hauke
Joined: 02 Mar 2003 Posts: 1072
|
Posted: Thu Aug 30, 2012 10:54 Post subject: |
|
|
Hi,
you need to add apostrophes (') to the PHP echo call and the BASH echo command and maybe a newline. Change
Quote: | echo ("greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf); |
into
Quote: | echo ('echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf
'); |
and it should work (I've not tested it ). _________________ Hauke Goos-Habermann
- project leader m23 (http://m23.sf.net) -
Jabber: dodgerm23@jabber.org
Schulung, Entwicklung und Support zu m23 und anderen OpenSource-Produkten: www.goos-habermann.de
Auch DU kannst etwas gegen Softwarepatente tun! www.patentfrei.de |
|
Back to top |
|
|
koenr
Joined: 07 Jun 2011 Posts: 26
|
Posted: Thu Aug 30, 2012 12:39 Post subject: |
|
|
Hi Hauke,
Thanks a lot for your quick reply! It brought me millimeters close to the solution.
The server 500 error was indeed caused by the error in my script - solved.
You're proposed code has a small error.
Rather then appending the line to the file /etc/lightdm/lightdm.conf the script creates a file /etc/lightdm/lightdm.conf? with the correct configuration line in it.
It should be
Code: | echo ('echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'); |
(without the new line).
So thanks to this extra configuration parameter, my users can fill in their username on the logon screen for authenticating against an LDAP server.[/code] |
|
Back to top |
|
|
koenr
Joined: 07 Jun 2011 Posts: 26
|
Posted: Fri Aug 31, 2012 9:11 Post subject: |
|
|
Improvement:
Code: |
echo ('echo "greeter-show-manual-login=true
greeter-hide-users=true" >> /etc/lightdm/lightdm.conf');
sendClientStatus($id,"done");
|
Shows just the logon screen, not the list of previously logged on users. The line break after the first "true" is important |
|
Back to top |
|
|
|