Timeline for Linux program running on Ubuntu machine but not on Unix webserver
Current License: CC BY-SA 3.0
32 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 13, 2012 at 0:14 | history | notice removed | caw | ||
| Apr 13, 2012 at 0:14 | history | bounty ended | caw | ||
| Apr 13, 2012 at 0:09 | vote | accept | caw | ||
| Apr 13, 2012 at 0:09 | vote | accept | caw | ||
| Apr 13, 2012 at 0:09 | |||||
| Apr 12, 2012 at 17:59 | comment | added | caw |
If I compile this program without the -static and -bargs tags, this error message disappears. But it still cannot execute because it depends on libgnat.so then which cannot be found on the webserver. Any possibility to integrate this library into the program? The other dependencies are okay.
|
|
| Apr 12, 2012 at 17:41 | comment | added | Karlson |
@MarcoW. Seems like the words is unable to initialize Thread Local Storage when starting.
|
|
| Apr 11, 2012 at 23:49 | history | edited | caw | CC BY-SA 3.0 |
added 1004 characters in body
|
| Apr 11, 2012 at 23:49 | answer | added | H_7 | timeline score: 1 | |
| Apr 11, 2012 at 23:21 | history | edited | caw | CC BY-SA 3.0 |
added 322 characters in body
|
| Apr 10, 2012 at 23:40 | history | edited | caw | CC BY-SA 3.0 |
added 154 characters in body
|
| Apr 9, 2012 at 17:56 | comment | added | caw |
execve([...] = 0 brk(0) = 0x8145000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file...) mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb772c000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file...) mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb772b000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb772b680, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++
|
|
| Apr 9, 2012 at 17:41 | comment | added | ephemient |
EGLIBC is a branch of GLIBC and should not be incompatible. Hmm, perhaps strace would be useful?
|
|
| Apr 9, 2012 at 17:10 | comment | added | caw |
@ephemient: Yes, even with CHMOD 777, the program doesn't produce any output. What's the matter with glibc? GNU libc 2.7 seems to be something different than EGLIBC 2.13, doesn't it?
|
|
| Apr 9, 2012 at 14:36 | comment | added | ephemient |
@MarcoW. Did you check that ./words is marked executable on the server?
|
|
| Apr 9, 2012 at 12:13 | comment | added | caw | @MischaArefiev: Did that already: No output. So the problem really seems to be that the program is just not executable due to a different glibc version or processor architecture, right? | |
| Apr 9, 2012 at 11:15 | comment | added | Mischa Arefiev |
Try running it as shell_exec('/path/to/your_binary 2>&1').
|
|
| Apr 8, 2012 at 23:56 | comment | added | caw | I've posted some details regarding the glibc version on my two systems. As you can see in the question above, the glibc versions seem to differ from each other. Are they compatible, nevertheless, or is this what prevents the program from running on my webserver? | |
| Apr 8, 2012 at 23:54 | history | edited | caw | CC BY-SA 3.0 |
added 69 characters in body
|
| Apr 8, 2012 at 23:25 | history | edited | caw | CC BY-SA 3.0 |
added 48 characters in body
|
| Apr 8, 2012 at 11:41 | comment | added | caw |
Thanks for your comments! @solo: I do output the result of shell_exec() via echo in PHP, thanks! @ephemient: I've added some details as to the systems in the question above.
|
|
| Apr 8, 2012 at 11:40 | history | edited | caw | CC BY-SA 3.0 |
added 270 characters in body
|
| Apr 8, 2012 at 7:20 | comment | added | ephemient | You don't specify — what flavour of UNIX is your webserver running and on what architecture? If it's not Linux (there are many other UNIXen out there) or isn't of a compatible processor architecture, static linking doesn't help. Also, if the webserver is running an older Linux kernel, you may need to link with an older Glibc, as the newer code might not run on it. | |
| Apr 8, 2012 at 6:15 | comment | added | kwarrick | Are you unable to login to the box to execute this program on the command line? Perhaps you are forgetting to echo the output of the command (e.g. <? shell_exec('...'); ?> instead of <? echo shell_exec('...'); ?>.) | |
| Apr 8, 2012 at 4:45 | answer | added | poige | timeline score: 2 | |
| Apr 5, 2012 at 23:39 | history | tweeted | twitter.com/#!/StackUnix/status/188048319656894464 | ||
| Apr 5, 2012 at 22:32 | history | notice added | caw | Draw attention | |
| Apr 5, 2012 at 22:32 | history | bounty started | caw | ||
| Apr 4, 2012 at 23:35 | comment | added | caw | The weird fact is that the pre-compiled version runs on both systems but my self-compiled program does only on the Ubuntu machine, not on the webserver. | |
| Apr 4, 2012 at 14:09 | answer | added | Karlson | timeline score: 3 | |
| Apr 4, 2012 at 13:53 | comment | added | caw | It seems that the program does not execute on my webserver as I can't see any output in PHP. But on my Ubuntu machine, it does execute. How can I check if these environment settings are the same? | |
| Apr 4, 2012 at 13:34 | comment | added | Karlson | Does program execute? Are the environment settings between your shell and shell escape from PHP the same? | |
| Apr 3, 2012 at 21:32 | history | asked | caw | CC BY-SA 3.0 |