The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
Author: rev 
Date:   21-08-01 21:02

the PHP function passthru() outputs the raw result from ps aux and returns no value. so in the above code segment, printing that variable would serve no purpose.

Reply To This Message
 Re: passthru
Author: Dan Langille 
Date:   21-08-01 21:27

Right you are. Thanks.

For the record, here's the original script:

<title>FreeBSD Diary uptime via php3 passthru</title>

$uptime = passthru ("/usr/bin/uptime");
echo "<font face=\"Tahoma\" size=\"1\">$uptime</font></p>";


The new script is:

html><title>FreeBSD Diary uptime via php3 passthru</title>

<font face="Tahoma" size="1"><?php
passthru ("/usr/bin/uptime");


But I'm going to remove the font declaration anyways.

I'll amend the article accordingly.

Reply To This Message
 Re: passthru
Author: matthew 
Date:   04-05-02 17:31

i did notice, that this doesnt work if you have safe mode on, any ideas as to how to get it working if safe mode IS on?

Reply To This Message
 Re: passthru
Author: e11even 
Date:   12-04-17 17:16

Hey bro,

None of the scripts are executing anymore except for the PHP one. Is CGI dead on the interwebs?

I am testing at

Post Edited (12-04-17 17:17)

Reply To This Message
 Re: passthru
Author: Dan 
Date:   12-04-17 18:25

Sorry, I will have to fix that, but I may not get a chance until after BSDCan/PGCon.

Feel free to nag me then. I would appreciate that.


Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum