php-windows Digest 21 Dec 2005 12:03:52 -0000 Issue 2853
Topics (messages 26582 through 26585):
Re: PHP windows installer - additional arguments despite silent install?
26582 by: Phil Driscoll
exec() problem
26583 by: Fábio Ottolini
26584 by: Fábio Ottolini
26585 by: El Bekko
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
On Tuesday 20 December 2005 11:09, Sascha Meyer wrote:
> Is there any source of information about available arguments for the
> windows installer?
The installer is made using Wise InstallBuilder. The PHP specific installation
script does not explicitly look for any command-line arguments, however Wise
InstallBuilder may provide a way of passing in arguments to pre-populate
fields in the dialog boxes.
This article may be of use (the Wise Installations section):
http://www.wise.com/KBArticle.aspx?articleno=564
--
Phil Driscoll
--- End Message ---
--- Begin Message ---
Dear Comrades,
Can someone please explain why this is script is not working on my win2k
box with PHP 4.3.4?
<?php
$email="[EMAIL PROTECTED]";
list($alias, $domain) = split("@", $email);
$command = "nslookup -type=mx $domain";
exec ( $command, $result );
$i = 0;
while ( list ( $key, $value ) = each ( $result ) ) {
if ( strstr ( $value, "mail exchanger" ) ) { $nslookup[$i] = $value;
$i++; }
}
while ( list ( $key, $value ) = each ( $nslookup ) ) {
$temp = explode ( " ", $value );
$mx[$key][0] = $temp[3];
$mx[$key][1] = $temp[7];
$mx[$key][2] = gethostbyname ( $temp[7] );
}
array_multisort ( $mx );
print_r($mx);
print "<br><br>";
print $mx[0][1];
?>
The same script works fine in another win2k box running PHP version 5. Strange
is that if I add print $result; right after exec ( $command, $result );
nothing is printed. When the script runs on the machine that works it prints
Array obviously. So, my guess is that $command is never being executed.
BTW, PHP is not running on safe_mode and the nslookup command works fine
on both machines.
Any help would be very much appreciated.
Kind Regards,
Fabio Ottolini
--- End Message ---
--- Begin Message ---
To clarify it a little bit more, I have changed the code a bit:
$command = "nslookup -type=mx $domain 2>&1";
exec ( $command, $result );
print_r($result);
And the result on the browser is:
Array ( [0] => Access is denied. )
Any clues?
'>'-- Mensagem Original --
'>'Date: Tue, 20 Dec 2005 10:43:48 -0200
'>'From: Fábio Ottolini <[EMAIL PROTECTED]>
'>'Reply-To: [EMAIL PROTECTED]
'>'To: [email protected]
'>'Subject: [PHP-WIN] exec() problem
'>'
'>'
'>'Dear Comrades,
'>'
'>'Can someone please explain why this script is not working on my win2k
'>'box with PHP 4.3.4?
'>'
'>'<?php
'>'
'>'$email="[EMAIL PROTECTED]";
'>'
'>'list($alias, $domain) = split("@", $email);
'>'
'>'$command = "nslookup -type=mx $domain";
'>'
'>'exec ( $command, $result );
'>'
'>'$i = 0;
'>'while ( list ( $key, $value ) = each ( $result ) ) {
'>' if ( strstr ( $value, "mail exchanger" ) ) { $nslookup[$i] = $value;
'>'$i++; }
'>'}
'>'
'>'while ( list ( $key, $value ) = each ( $nslookup ) ) {
'>' $temp = explode ( " ", $value );
'>' $mx[$key][0] = $temp[3];
'>' $mx[$key][1] = $temp[7];
'>' $mx[$key][2] = gethostbyname ( $temp[7] );
'>'}
'>'
'>' array_multisort ( $mx );
'>'
'>' print_r($mx);
'>' print "<br><br>";
'>' print $mx[0][1];
'>'
'>'?>
'>'
'>'The same script works fine in another win2k box running PHP version
5. Strange
'>'is that if I add print $result; right after exec ( $command, $result
);
'>'nothing is printed. When the script runs on the machine that works it
prints
'>'Array obviously. So, my guess is that $command is never being executed.
'>'BTW, PHP is not running on safe_mode and the nslookup command works
fine
'>'on both machines.
'>'
'>'Any help would be very much appreciated.
'>'
'>'Kind Regards,
'>'
'>'Fabio Ottolini
'>'
'>'--
'>'PHP Windows Mailing List (http://www.php.net/)
'>'To unsubscribe, visit: http://www.php.net/unsub.php
'>'
--- End Message ---
--- Begin Message ---
Fábio Ottolini wrote:
To clarify it a little bit more, I have changed the code a bit:
$command = "nslookup -type=mx $domain 2>&1";
exec ( $command, $result );
print_r($result);
And the result on the browser is:
Array ( [0] => Access is denied. )
Any clues?
'>'-- Mensagem Original --
'>'Date: Tue, 20 Dec 2005 10:43:48 -0200
'>'From: Fábio Ottolini <[EMAIL PROTECTED]>
'>'Reply-To: [EMAIL PROTECTED]
'>'To: [email protected]
'>'Subject: [PHP-WIN] exec() problem
'>'
'>'
'>'Dear Comrades,
'>'
'>'Can someone please explain why this script is not working on my win2k
'>'box with PHP 4.3.4?
'>'
'>'<?php
'>'
'>'$email="[EMAIL PROTECTED]";
'>'
'>'list($alias, $domain) = split("@", $email);
'>'
'>'$command = "nslookup -type=mx $domain";
'>'
'>'exec ( $command, $result );
'>'
'>'$i = 0;
'>'while ( list ( $key, $value ) = each ( $result ) ) {
'>' if ( strstr ( $value, "mail exchanger" ) ) { $nslookup[$i] = $value;
'>'$i++; }
'>'}
'>'
'>'while ( list ( $key, $value ) = each ( $nslookup ) ) {
'>' $temp = explode ( " ", $value );
'>' $mx[$key][0] = $temp[3];
'>' $mx[$key][1] = $temp[7];
'>' $mx[$key][2] = gethostbyname ( $temp[7] );
'>'}
'>'
'>' array_multisort ( $mx );
'>'
'>' print_r($mx);
'>' print "<br><br>";
'>' print $mx[0][1];
'>'
'>'?>
'>'
'>'The same script works fine in another win2k box running PHP version
5. Strange
'>'is that if I add print $result; right after exec ( $command, $result
);
'>'nothing is printed. When the script runs on the machine that works it
prints
'>'Array obviously. So, my guess is that $command is never being executed.
'>'BTW, PHP is not running on safe_mode and the nslookup command works
fine
'>'on both machines.
'>'
'>'Any help would be very much appreciated.
'>'
'>'Kind Regards,
'>'
'>'Fabio Ottolini
'>'
'>'--
'>'PHP Windows Mailing List (http://www.php.net/)
'>'To unsubscribe, visit: http://www.php.net/unsub.php
'>'
Try using system()
--- End Message ---