I'm trying to get information on the "updateable" packages on Linux (as given in "apt-get upgrade") via PHP.
Basically the information I'm interested in is the output of "apt-get upgrade" - especially the line: "29 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." that appears even if you don't proceed with the updates.
Therefore I tried to run
print_r(exec('apt-get upgrade'));
but this has no output in PHP. Is there any way to force exec to "wait" for the output? Or is "apt-get" locked for exec() in general?
Thanks for your help