Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





System(); Command Not Working On Remote System. Windows.


My server is a windows machine, on the same domain as python(also a windows machine). Apache is running as a service as an administrator. This is a test only environment to whom it may concern(I hate people telling me how insecure my system is) I'm just trying to run:

$last_line = exec('dir pythonc$', $retval, $g);
print_r($retval);
echo '<br>'.$g.'<br>';
echo '$last_line= '.$last_line.'<br>';
Which outputs:

Array ( )
1
$last_line=

The command from the command line works fine. And apache can access directories that only administrators can access on the local machine.




View Complete Forum Thread with Replies

Related Forum Messages:
System() Function Is Not Working In Windows
I want to encrypt a text file's content using public key of other user. I'm working in windows NT and running my php in apache server. I've installed my gnupg in c:gnupg.
To encrypt the content I used the following code: PHP Code:

View Replies !
System() Command
if im using this it dont work PHP Code:

View Replies !
Execute System Command
I need to execute a system command using admin rights, but even if i have the apache service started under an admin account, php scripts don't get executed with the proper rights. Is this a php configuration, or do i need to look elsewhere?

View Replies !
Gzip And System Command
Is it possible to create a button that will gzip a file from a web page?

The have the page display another button, when the gzip is complete?

The button should allow us to issues a system command.. ie: power off!

View Replies !
Running System Command
I'm using shell_exec to run a system command which should generate a file that i want to read, however the file isnt generated. I have safemode disabled and if i echo out the command and paste it into SSH the command executes fine. I have checked out the error log and there are no errors. This is an example of the command i'm running: Code:

echo 'passphrase' | /home/website/gnupg-1.4.2/g10/gpg -u JON --passphrase-fd 0 --clearsign --force-v3-sigs -o /home/website/temp_dir/8edef434308edfa0fd804cfd6d139512.asc /home/website/temp_dir/8edef434308edfa0fd804cfd6d139512.txt

I've tried executing this with system(), shell_exec() and popen() to no avail.

View Replies !
Run Script On Remote System
I ve got a server A and a server B. On server A there is a Apache. I've got a Perl or Bash script used to add an user account (username and other information about new account are the parameters of the script). How to write a php page (running on Apache on server A) that could execute my Bash/Perl script on server B.

View Replies !
Command Window - Exec/system
I'm in the process of developing a script in Windows where I need to use exec/system. Whenever I execute either, Windows spawns a command window which automatically sappears. Is there a clean way to force Windows to NOT display the command window?

I've seen this discussed a few times previously, but, none of the
solutions seem to be working (tried both exec and system; tried using
cmd /c, tried using start /B, etc.)



View Replies !
Why Is System() So Slow For Remote Commands?
system() passthrough() and shell_exec() all execute the given command,
with their own slight differences in output, etc

what i want to do is essentially
shell_exec("ssh ip 'df -h -l' ");
for that and other commands

for some reason this takes exactly 20 seconds before it returns, so does
'system' and 'passthrough'

ssh works fine, if i do it from the commandline it takes less than a second

I also realize that I could just write a simple shell script and just
execute the script which does take about a second.

I was just wondering if anyone knows what could be the problem? and why
20 seconds?

View Replies !
Using The SYSTEM() Command W/ MySQL - Animated Radar .GIFs
I have a bunch of radar images (*.gif) stored on my server, it gets a new one every 6 min. A user goes onto my site and using a form selects a start time and an end time using drop down boxes. That info (YYYY, MM, DD, HH) gets passed into my PHP script for computing. Code:

View Replies !
System Command :: Creating A Password Using The Htpasswd Program
I'm having trouble creating a password using the htpasswd program with the PHP systems command. Here is my code:

//CREATE THE HTPASSWD FILE
echo "running command...";
$command = "c:program filesapache groupapache2 inhtpasswd -c .htpasswd david";
$test = system($command, $returnvalue);
echo "executed command: ".$command;
echo "<br>";
echo "here are the results: ";
echo $test;
echo $returnvalue;

View Replies !
System() Function On Windows
Trying to use the system() function in my php code on a windows server 2003 system. Simple commands like:

system('dir');
work fine, but
Code:
system('net stop spooler');
doesn't work.

I guess this is a problem with windows user rights, but is there anything I can change in my script to make it work without having to start changing the windows user rights as I don't want to affect the security of windows?

View Replies !
Use Exec() In PHP 5.2 On A Windows XP Pro System
I'm trying to use exec() in PHP 5.2 on a Windows XP Pro system. What I'm trying to do is use it to tell an already running program what to.

For example:
X:pathprogram.exe /something
or
X:pathprogram.exe /something_else

If I do the command through the command line, it works, but so far I have been unsuccessful in PHP. Usually it PHP just hangs, and give no error message, and does nothing to the program.

View Replies !
Windows System Details
Im working on a network audit tool but wanted to be able to run an update script that would scan an IP range and get details about the client machine. I want this to happen at 2am and to compile a list of machines that have been added to the network during that day and to capture as much information as possible such as Operating System and Hardware details. I have seen windows programs that can do this but nothing built using PHP.

View Replies !
UPDATE Command Is Not Working On MySQL, Windows 2000 Server
Hi all,

I encountered mysterious problem with MySQL and PHP.

UPDATE command is not working on MySQL configured on Apache 2 with Windows 2000 Server.

It pulled my hairs for atleast 5 hours.

MySQL says Affected rows: 0 (Query took ~ sec) always?

Now, I've decided to move all PHP files and db to remote server.

Can anyone suggest possible reasons for above errors?

View Replies !
Version Control System For Windows?
I was wondering if anyone here developing under windows knows of a good & easy to use version control system to use with php.

View Replies !
Mkdir() Will Not Work On Windows System
I am writing a very simple upload script that works beautifully on my *nix server.  However, when I gave it to the person I wrote it for, I discovered that he uses a windows machine and it no longer works.  I think the issue comes down to "mkdir()", as I have done extensive testing with it and even simple calls of the code will not work.  Folder permissions are all "777". Code:

View Replies !
Apache Conf To Make The PHP's System Command Works On Linux.
I've got a big problem to make my code works.
My system() command don't seems to work.

for that code :

$res = system($command);
echo"res = $res<br>";

the result is "res = " and the command is not executed.

I feel that it come from my Apache configuration.
However my safe_mode_exec_dir is pointing on the dir of my exec code. My OS is Unix.

View Replies !
Use ZZiplib If I Have A Linux Webserver But A Windows System?
Should I use ZZiplib if I have a Linux webserver but a Windows system?

View Replies !
Windows Network File System Access
I'm trying to get an intranet application to create folders on another machine, on the same network.

I can get to it via '192.168.7.201FolderName', and have also mapped the network location '192.168.7.201' the the drive 'S'. Code:

View Replies !
Find The PHP Error Log File On A Windows System
I can't seem to find the PHP error log file on a Windows system. Does anybody know where it is?

View Replies !
PHP Functions Not Working In My System
Even the normal parameter posting for a php page through submit page is not running in my system.it says "variable not found".A normal php page runs. Should i include any php dll files for this?

View Replies !
Can't Get Phpinfo Working On My Linux System
I can't et phpinfo working for some reason on my linux system. every other php file works and every other command file works, but if i add the phpinfo() comand to the file then i get a forbidden 403 error??

View Replies !
System(); Not Working Within A Made Function
for some reason system(); isnt working when i use it within a function i made, is there a reason? it works perfectly fine out of the function.

View Replies !
Working On A Username Validating System
i am a working on a username validating system...and it needs to do the following things...

Only allow lowercase letters
Allow numbers
Allow "_" and "$"

and not allow anything else...and if it does not go by this print an error out.

View Replies !
System/exec Not Working In Browser
In two files, and I serve foo.php then I notice If I use commandline execution i.e. php foo.php then foo.txt is touched/created all right. i.e. system command is executed as expectedBut If I use browser then I notice that the shell command in config.php is *not* executedAny ideas as to why this might be happening? Code:

View Replies !
Exec, Shell_exec, System, And Passthru Not Working At All
Can't get these commands to work! The following page simply doesn't
finish loading ( Waiting... Opening... :-( )

<?php echo system("dir"); ?>

The same for <?php echo exec("dir"); ?> or <?php echo
shell_exec("dir"); ?>, etc...

I'm running Apache 2.0.55 & PHP 5.0.5 with Zend Optimizer v2.5.10 on
windows XP SP2.

View Replies !
Make A News System With A Template System
i'm a total,and mean total newbie in PHP. I want to make a news system with a template system(like footer.php and header.php) but dont know how to?

View Replies !
Login System - News System
i have to do a news system wich use php/mysql.

i need 3 accounts:

* a 'reader' who doesn't need to log in to read the news
* a 'writer' who can write news in a pending news table
* a 'moderator' which validate a pending news, and make it a regular news,
viewable from the site (by the 'reader')

This is a small web site, so i can't use SSL; and i use php sessions.

Right now, i deal with account from a mysql users point of view, which
means, that a 'reader' can access all the admin part of the site, but will
ger errors when trying to read/write by sql query.

I was wondering if somedody could give me a trick to deny access to the
admin pages. Rigth now, i though about these:

* by decoding mydql rights? (how)
* by doing only-to-test query? (bad i think, especially for write right)

View Replies !
After Executing System(), How Can I Pass "Y" To System By Php?
I want to use the system command to set user's priority

$cmd = "cacls d:appservwwwaccountMng$userName /G $userName:F";
system($cmd);

Then it appears
Are you sure (Y/N)?

How can I pass the "Y" to system by php?

View Replies !
$system = New Java('java.lang.System');
I am trying to get Java to work from within PHP. I have been looking at:
http://us2.php.net/java

The error and line of PHP code:
$system = new Java('java.lang.System');

Fatal error: Class 'Java' not found in C:Documents and SettingsEd
TaylorMy DocumentsProjects Eclipseworkspacesworkspace
PHPScrapboardJavaExample.php on line 3

I have looked at the 'User Contributed Notes'. It seems there is a
proliferative of different way people have defined the Java
configuration options. Some have links in quotes some do not. Not sure
if I am suppose to use the eight byte Windows dir name?

I am a Java programmer. Sun's JAVA_HOME points to the base directory
name for the JDK installed. In PHP it looks like it points to the bin
subdirectory.

This is what is documented:

java.class.path The path and name of the PHP jar file (usually called
php_java.jar) as well as any other jar files or
directories where PHP will search for compiled
Java classes.
java.home The root directory of the installed JDK
java.library The location of the Java virtual machine library
java.library.path The location of the PHP java library (usually in the
modules/ directory)

This is what I have defined in my PHP.ini:

extension=php_java.dll

java.class.path = "C:php5.2extphp_java.jar"
java.home = "C:Program FilesJavajdk1.5.0_07"
java.library = "C:Program
FilesJavajdk1.5.0_07jreinserverjvm.lib"
java.library.path = "C:php5.2ext"

I am running:
- Windoze XP SP 2
- PHP 5.2
- Java JDK and JRE 1.5.0_07
- Eclipse 3.2
- PHPEclipse 0.2.0

View Replies !
Copy Command Available In Windows?
Is the copy command available for use on a windows system. I have tried to run a script using it (taken directly out of a PHP manual) and am receiving a "parse error".

View Replies !
[windows] PHP.GTK And Popuped Command Line
i compile php.gtk file with roadsend php compiler. Is here possiblity to
have windows program without starting command line window?

View Replies !
Windows Program Command Exists
I can do this so easily in Unix: PHP Code:

$msg = exec('whatis convert 2>&1');
echo $msg;

However, in Windows using MS-DOS, I'm utterly lost. I am having to find out if ImageMagick is installed on a system for a function to operate (ImageMagick is required), and since this is a portable web application, you simply can't install ImageMagick everywhere you go.

Therefore I need to know if the system home has ImageMagick or not, and in Unix, I simply do a "whatis convert" and I can tell, but since MS-DOS has no equivalent to "whatis" I can't figure it out, and just running the "convert" command within a recursive function onto thousands of images is just not a good idea.

View Replies !
Running PHP Scripts From The Command Line Under Windows
I was wondering if anyone has ever tried running PHP scripts from the DOS command prompt. Any insight would be appreciated.

View Replies !
Running A Windows Command Line From A Web Page
I have a web page on an intranet, i need to run a command in the local windows run from the webpage. for example when you press a button button on a webpage it has the same effect as running cmd from the run prompt on the local machine. Anyone know how to do this?

View Replies !
Remote Linux Commands From A Windows PHP Server
I'm running a Windows webserver and I would like to use PHP to connect to my linux box (non-webserver), send it commands (change directory, run commands, create files, etc) and files, and be able to get files back that it created on the linux box.

The linux machine has ssh/sftp (with password) access, so is there a way for me to connect through ssh without installing extension libraries and run commands etc?

I've searched through the forums and haven't found anything that is my particular situation.

View Replies !
If/else Not Working With MySQL Command?
I'm trying to set up a basic email list, starting with the following:

if($_POST['gf_email_signup']=='Yes') {
$sql = "SELECT email from e_mailing_list where e_mailing_list.email = '$_POST[gf_email_signup]'";
$result = mysql_query($sql, $conn) or die(mysql_error());
if(mysql_num_rows($result) != 0) {
$email_signup_notice = '(Your email address was already on our mailing list)'
} else {
$sql = "INSERT INTO e_mailing_list values ('','$date','$_POST[gf_name_first]','$_POST[gf_name_last]','$_POST[gf_email]')";
$result = mysql_query($sql, $conn) or die(mysql_error());
$email_signup_notice = '(Your email address was successfully added to our mailing list)'
}}

The problem is, after an email address is added, if that address is attempted to be added again (i.e. test@email.com is already in the list but someone tries to add it again), the if/else clause does not work.

It skips to the else section and then returns as mySQL error because the email field is set as unique. Am I missing something as to why the if/else is not working to detect a duplicate address? Am I going about this the wrong way?

My apologies if this belongs in the mySQL forum; I am new to mySQL but this seemed to me to be a php problem... but again, I'm new to mySQL so I could be wrong, and maybe the solution is quite obvious to a more seasoned coder.

View Replies !
Virtual Command Not Working
I'm really an ASP coder but have been asked to fix someones php site. I've had a look at their pages and none of the php pages that are using the "virtual()" command are working.

When I replace the command with the include() command they seem to work again.

Can anyone tell me why the virtual may have stopped working (it was working before) and another fix apart from replacing all instances of virtual with include? I'm not really sure what the difference is between them..

View Replies !
Include Command Stopped Working
It's just making the time in a hectic schedule for one more unexpected project that I'm hoping to delay. Anyway, it involves php so I'm hoping someone here might be able to give me a work around. Code:

View Replies !
Capturing A Display On Remote (linux) Server From (windows) Web Browser
I've a utility that runs on a linux machine. Basically, it opens a window, draws a figure and captures the image (screen) and stores it as a jpeg file. The utility requires a window to be open (or displayed) inorder to save the image. Also, this utility is
in the form of an executable, so I can't possibly alter it.

I want to run this utility from a windows web browser and display the saved jpeg file. I pass some command line parameters to change the figure it draws. The php code I use is as below: Code:

View Replies !
MLM System
Is there anyone who has developed some online MLM System, i need to
develope a system where i need to calculate the total numbers of
members in the downline both, seperately for left and right leg.

This system works on 2 x 2 matrix.

View Replies !
Pat System..
How would you use patsystem for your templates in php? How would it make it easier? Where can i learn more about this? Also, Is their a script for making a today's featured sites? Thanks a lot.. I am learning more php with my books, i also want some good tutorials online.

View Replies !
Doc System...
Any one have any idea where I ca get a documentation system like the
one php.net uses?

Have a list (and sub lists) of topics, display details about a topic,
and allow users to BLOG that item at the bottom.

View Replies !
An API System?
I am creating widgets on my website. but right now I am limited. because the ones I have are hard coded into the page. Like (if i have the notepad widget, then show it here), etc. How would I make an API type system to allow people to make their own, similar to Facebok, Google, and now Meebo. Well not like Google. more like Facebook.

View Replies !
System?`
I need i Affiliate tracking system so i can see what person there have registered on my sponsers products like mattcashback and other rewards site. Is there somewhere i can but i system like that?

View Replies !
POS System
it is possible to use PHP to built a POS system which connect to cashier and bar code scanner ?? Any information related to this?

View Replies !
CRM System
May be somebody have any wish to make a CRM system with me? It would be great if you have experience in a pear or some other high level scripts for php.

View Replies !
A Help System
I am developing a CMS/web-building website, and I need to include a good help system to help my customers learn how to use the features of what my project offers. Does anyone have suggestions about what help products I could incorporate into my site? I want the standard outline system, with a column showing chapters, an index, and search box.

View Replies !
System() Help
Having a bit of an issue here. I am wanting to do a database backup using the system command. This is the command I am runing:

$systemcmd="mysqldump -hlocalhost -uuser -ppass db_name > backups/`date +\%d-\%Y--\%H:\%M`-Backup.sql";
system($systemcmd,$retval);
echo $systemcmd."<br>";
echo $retval."<br>";

The command works fine from SSH, but when running the system function, all that gets returned is the number 1 from $retval (outputs $systemcmd fine as well). No backup is made using system(). Can anyone think of a reason as to why this is happening?

View Replies !
System()
I try to do a mysql backup using mysqldump. I've written a php script that uses system() to execute mysqldump. I have two unix servers and the script runs fine on the frist one but fails without any error on the second server. I have following script to test it:

----------------------------------

<?php
print system ('/usr/bin/mysqldump --opt -u user -ppassword database 2>
/home/user/public_html/backup/error.txt | gzip >
/home/user/public_html/backup/bck120404.sql.gz');
?>
----------------------------------

This script doesn't return anything. No error.txt and no bck120404.sql.gz are written. It's a unix server and register_globals is off. All directories should be fine and "print system ('ls');" runs ok. I also tried exec(), passthru() and shell_exec().

View Replies !
On An IIS System
I have to run PHP on an IIS system as I have to also code in (cough, cough) ASP. Trouble I'm having is with sessions, I can write them, I can see them, I can see them being written. BUt I can't get them back when I go to another page. My session.save_path = c:sessions (backslash for windows) my sessions folder has write permissions set, but I'm must be doing something wrong. If someone could please shed some light on this.

View Replies !
System
i am not able to run rsh command from php. my code is:

system("rsh -n -l username machine_name perl perl_script.pl input_file > output_file");

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved