|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I'm working with a script which must launch vmware server 1.0.3 (Virtualization product) and I can launch it from a terminal: $php miscript.php but when I use firefox it just doesn't work. I've checked the permissions for vmware and the apache user but without any success. Can you me what i'm doing wrong? local.php ------------------------ <?php echo "Lanzando vmware\n"; system('whoami'); system('/var/www/procesa.pl'); ?> ------------------------ procesa.pl ------------------------ #!/usr/bin/perl system ('/usr/bin/vmware'); ------------------------ Sorry for my bad english. Thanks -- Julio César GarcÃa VizcaÃno. FI, UNAM. Por mi raza hablará el espÃritu -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iEYEABECAAYFAkfZSc4ACgkQ1fousfD2fZmagwCeOJc0bXMKm2 5VOw5nzU1E/K4N djUAniVLfo9wcqnrmvvzih05NGbLnD7u =SgnC -----END PGP SIGNATURE----- |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Thu, Mar 13, 2008 at 11:35 AM, Julio César García Vizcaíno
<fuego216@gmail.com> wrote: > Hi, > > I'm working with a script which must launch vmware server 1.0.3 > (Virtualization product) and I can launch it from a terminal: > $php miscript.php > but when I use firefox it just doesn't work. [snip!] > > local.php > ------------------------ > <?php > echo "Lanzando vmware\n"; > system('whoami'); > system('/var/www/procesa.pl'); > ?> > ------------------------ Try rewriting the above as follows: <?php error_reporting(E_ALL); echo "Lanzando vmware\n"; exec('whoami',$who_ret); exec('/var/www/procesa.pl',$procesa_ret,$err); echo !isset($argv[0]) ? "<pre />\n" : null; print_r($who_ret); print_r($procesa_ret); echo !isset($argv[0]) ? "</pre>\n" : null; if(isset($err) && $err != 0) { echo "Process launching returned error code ".$err."\n"; } else { echo "Successfully launched!\n"; } ?> However, I'm not really certain why you need to call the Perl script. What I would consider doing myself is the following: <?php exec('whoami',$who); echo "Attempting to launch VMWare process as ".$who.".\n"; exec('/usr/bin/vmware & 2>1',$ret,$err); echo isset($err) && $err != 0 ? "Error code: ".$err."\n" : null; echo > Sorry for my bad english. Your English is better than some of the native speakers we have here, so no need to apologize! ;-P -- </Daniel P. Brown> Forensic Services, Senior Unix Engineer 1+ (570-) 362-0283 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Thu, Mar 13, 2008 at 12:01 PM, Daniel Brown <parasane@gmail.com> wrote:
> Try rewriting the above as follows: [code snip] > > However, I'm not really certain why you need to call the Perl > script. What I would consider doing myself is the following: [code snip] Sorry, I got jumpy with the Send button and hadn't fixed the rest of the post before sending. I think that I'm doing too many things at once. <?php exec('whoami',$who); echo "Attempting to launch VMWare process as ".$who[0].".<br />\n"; exec('/usr/bin/vmware & 2>1',$ret,$err); echo isset($err) && $err != 0 ? "Error code: ".$err."<br />\n" : null; echo "Output is as follows:<br />\n"; echo "<pre />\n"; print_r($ret); echo "</pre>\n"; ?> The error redirect to STDOUT should print out whatever error messages are being received by the script. -- </Daniel P. Brown> Forensic Services, Senior Unix Engineer 1+ (570-) 362-0283 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Thu, Mar 13, 2008 at 1:11 PM, Julio César García Vizcaíno
<fuego216@gmail.com> wrote: > $tail error.log > /usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2) [snip!] This is the first result on Google. Try to STFW with that error message and it should hopefully you out. http://communities.vmware.com/message/484981 -- </Daniel P. Brown> Forensic Services, Senior Unix Engineer 1+ (570-) 362-0283 |
|
![]() |
| Outils de la discussion | |
|
|