Reply to Re: why is which not working?

Your name:

Reply:


Posted by Kimmo Laine on 09/27/06 05:46

"yusuf" <yusufm@gmail.com> wrote in message
news:1159334679.095427.9430@i42g2000cwa.googlegroups.com...
> Hi,
>
> I uploaded the following file to my site:
>
> <?php
> header("Content-type: text/plain");
>
> echo "latex is at: ";
> system("which latex");
>
> echo "ls is at: ";
> system("which ls");
>
> echo "convert is at: ";
> system("which convert");
>
> echo "gs is at: ";
> system("which gs");
>
> ?>
>
> and none of the paths are being printed out, only the echo statements
> are... I would think atleast ls should show up? Execute permissions
> have been given to it too.


Are system/exec/passthru allowed on your php? Do you get any output from any
command, say ls or uptime or something else rather trivial?

Also try something like this for debugging:

$output = system('ls', $return_val)
var_dump($output); // This will be boolean false on failure
var_dump($return_val); // This will contain the return status of the command


--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация