DOS Commands

the command which would allow me to run DOS commands from PHP. I am not quite sure, but I remember `or ' allowing me to run commands. Also could you tell me what this process is called so I can learn more about it on the PHP website.



ADVERTISEMENT

How To Run Commands In Php

I am trying to run a matlab script.(This script you can run from the command line by command 'matlab -r scriptname').

But when I use this command inside a system or exec I don't get any output, nor does the matlab opens and executes as it does in case of command line..I am doing like:

<?php
echo exec(' matlab -r scriptname');
?>

View 5 Replies View Related

Set Of Commands

I'm writing my own blog software, and I just want to be able to stick some commands into the body of a post and have PHP do some actions based on them.

so like if my post is:

Today I took a walk and I didn't see anything interesting at all. Here's a picture of me taking a walk:
[][]pic¶21[][]

then php would automatically replace the last line with an image #21 from my database

View 1 Replies View Related

Use The ZIP Commands In PHP?

I'm not sure if I understand ZIP. Must my webhost have some kind of ZIP support installed or can I just use the ZIP commands in PHP?

View 1 Replies View Related

AT Commands

Anyone any suggestions on sending AT modem commands to a mobile phone connected via Bluetooth, primarly to send SMS. How would you get php to send these commands

AT
OK
AT+CMGF=1
OK
AT+CMGW="+85291234567"


Quote:

View 1 Replies View Related

Commands

I have PHP 5 and users upload images while they put some info and all of these data are deleted after some period of time, but i am just afraid in case of any error some images stay there in the server. So I want to know how to check its last accessed date and creation date and any info related to date, so i regularly check and delete when expired.

View 1 Replies View Related

Commands To Php

//# Usage: lame -b 112 original.mp3 output.mp3

lame -b 112 ("/home/rmbsite/public_html/temp/" . session_id() . ".mp3" "/home/site/public_html/temp/112_" . session_id() . ".mp3");

View 9 Replies View Related

Commands Shell From PHP?

How can I execute a command shell from PHP? For example a ls -l from PHP, What is the command?

View 3 Replies View Related

Multiple Commands

In my PHP code, I want to execute the following two commands:

use mydb;
select * from mytbl;

Now, I can get it work with the following statements:

$SQL = "use mydb";
$result = mysql_query($SQL );

$SQL = "select * from mytbl";
$result = mysql_query($SQL );

What I really wan to do is "something" like:

$SQL = "use mydb ";
$SQL .= "select * from mytbl;";

$result = mysql_query($SQL );

i. e. I want to concatenate the two statement and execute the query only
once.

Is there a way to do this with mysql_query (or with someother function)?

View 10 Replies View Related

Shell Commands

Is it possible to write a script that will run commands at a command prompt? say copying some files and changing ownership on some files, like an install script?

View 4 Replies View Related

How Can I Run Root Commands In Php

I need to run a command as root to create users on the system for webmail
server.

What is the best way to do this?

View 6 Replies View Related

PHP Shell Commands

Some php applications store database passwords into files which can be
read by the user www-data.

So, a malicious user which can write php scripts could read those passwords.
What should I do to prevent users from viewing those passwords?

View 17 Replies View Related

Which Session Commands Do I Need?

I have a problem and I was told to check out the sessions part in PHP. What I want to deal with is the following :

I have a PHP page with a form, where the user writes some data. These data are then written into a file which is then used in a system command as input for an external program (NOTE: The data MUST be written into a file, it cannot be done elsewhise, because the external program takes a file as input).

The thing is that I must somehow create a file everytime a user enters data into the form, so I must learn something on sessions I think. since I don't have a login system or something like that, but just want to create a different file each time (with the session_id being part of it, so that the file is unique), which session commands do I need?

View 1 Replies View Related

Using Multiple Commands

How do you use all of these commands on a single insert entry?

addslashes(), stripslashes(), htmlspecialchars(), htmlentities()

how would you use it on something such as this: $result = mysql_query("UPDATE products SET mainContent = '$mainContent'");

Anyone have a clue?

View 7 Replies View Related

Mysql Commands

I installed mysql server on my winxp platform. To make sure i'm connected to the mysql server i wrote the following command in the dos window:

Quote:

program filesmysqlmysql server 4.1inmysqladmin -pmypass -uroot ping

and recieved the following notification:

Quote:

mysql is alive

which means: i'm connected to mysql.

View 7 Replies View Related

Run System() Commands

at the moment, i use a couple of cronjobs and wget to update some bits of the site, i would like to be able to specify a manual update by calling wget from an admin page. the system() call works correctly, but i get permission denied. because, i presume, apache doesn't own the directory i am wget-ting to. i can't chown the whole directory to apache.apache, because i need access to the directory for other users, (ftp). doesn anyone know a way around this?

View 1 Replies View Related

System Commands!

I want to execute system commands through the functions provided by PHP (like exec, system etc)

In the LINUX machine in my work, everything seems to be OK, when, for example, I write system `ls`; and I print it on the screen. In my home PC on the other hand, where I have winXP and the Cygwin platform installed, none of these works.

1) Is the Cygwin platform sufficient to run system commands or must I have LINUX machine?

2) Do I need to change anything in my php.ini file in order to 'activate' the system commands?

View 1 Replies View Related

Where Do Commands In Mysqladmin Go??

Ok i have to use a wordpress plugin.. but to make it all work i have to go into cpanel and then into phpmysqladmin and select my database and then give it a command..

View 2 Replies View Related

HTML Commands

I'm seeking a way to rasterize (that is convert to a raster of bits) HTML commands. My belief is that I'd do this by directing the HTML to an off-screen window or port, and then asking to get back a JPEG or other image format of the bits of that window.

View 3 Replies View Related

System Commands

i'm running the following php script, and where i would expect it to create a file, test.txt, it doesn't. it isn't in the directory i am exectuting the script in, nor can i do cat on it not that i would expect to, since it doesn't exist:

<?php

print system("ls > test.txt");

print system("cat ls.txt");

?>

View 2 Replies View Related

System Commands Via Web

I am attempting to build a web form that will be used to launch the below command. However, the backslashes for the command line options are giving me a headache. The web form will have inputs for each option such as Adminuser, Adminpass, Adminhost, Adminport, CMD etc. COMMAND LINE COMMAND:

ftpconfig.exe /ADMINUSER=Administrator /ADMINPASS=password
/ADMINHOST=localhost /ADMINPORT=31000 /CMD= adduser /server="Server1" /user=user1 /password=user1password

EXISTING PHP CODE

<? PHP

if (($_POST[username] == "") || ($_POST[userpasswd]== "")) {

header("Location: createuser.html");
exit;
else {
$result = $_POST[username];
......

View 4 Replies View Related

Run Shell Commands With PHP

I want to run few shell commands with PHP. I need to run lsof i :<port_no> and kill all the process running on that port number. I tried"

<?php
$output = shell_exec('lsof -i :8080');
print "<pre>".$output."</pre>";
?>

View 1 Replies View Related

Executing DOS Commands From It

I just wanted to know whether I m able to run Windows based commands like netstat using PHP code.

View 1 Replies View Related

Execute SSH Commands Via ?

I am looking to SSH out via PHP. What is the best/most secure way to go about this? I know I can do: shell_exec[url].....

View 5 Replies View Related

Unix And Commands

I'm currently working on the intranet site for our company and i've been asked to create a site where the status of our unix server is been displayed. at the moment all admins have their own logon using AIX (v4) and using the command topas to display the idle and other info.

what i want to do is create we php script that connects to the server using a logon and executing the topas command. i then want to display the idle process (but tahts not that importaint. i'll get to that when i'm able to connect to the server.

View 12 Replies View Related

Bug In System And Exec Commands

If PHP is running via a web server, and mutiple system
calls are made within the script to another script,
hundreds of processes are created. Here is an example:

Script 1:
<?php
for ($i=1; $i<=5; $i++) {
system("php script2.php");
}
?>

Script 2:
<?php
exit;
?>

The effect is the same (and more difficult to stop) when
the system calls are made in the background. e.g.

system("php script2.php >>/dev/null 2>>/dev/null &");
system("php script2.php >/dev/null 2>&1");

I have even tried calling a shell script, which in turn
calls the second PHP script (both in the background), but
it still causes lots of processes.

The "exec" command is also affected.

At first, I thought this was a problem with either Zeus web
server of Fast CGI, but I have since tried it with Apache
and normal CGI with the same effect.

Does anyone have any idea why this happens and whether there is any way to prevent it? I have posted a bug report to bugs.php.net (ID 14997), but so far to no avail.

View 1 Replies View Related

Telnet & Run Commands Thru Http

I need do open a telnet session from a web page then pass a set 3 sets of command to it with a 5 second delay between each command the last command is to exit and close the telnet window
I really need help will this I have heard it can be done by sockets but iI have not used it before.

View 2 Replies View Related

MySQL Commands With Require()

Just wondering if it is possible to run MySQL commands through a require() include file. I have a header for a page that includes some MySQL queries and such. I want to do a if/then, based on some variables, to display different headers with different MySQL commands for the same page...instead of making 10 different pages. But when I include, with require(), anything with MySQL commands, the page won't work at all. Any advice? Thanks.

View 1 Replies View Related

Displaying Shell Commands

How would I display a information on my website identical to how it would look if i typed it on a shell? For example, if I type df at the shell it puts each different partion on its own line. If i do: system("df"); It all gets jammed in to one line.

View 1 Replies View Related

File Upload Using Ftp Commands

Because of limitations of my provider, I am forced to use the ftp
functions to upload files to my server (the permissions on the server
will not allow me to load files via php).

I have successfully ported the sample code from php.net to do everything
BUT upload the file. I can connect. I can log in. I can change
directories. But the file never uploads. As I note in the code, I have
tried using ftp_put with the local filename, and I have tried using
ftp_fput with the file in /tmp/php with no luck. Suggestions are welcome.

Code: ( text )

View 3 Replies View Related

How To Execute Two Commands Within 'system'

On PHP4, I want to execute these two system commands:
# cd /home/foo1/foo2
# /usr/local/php/bin/php /home/foo1/foo2/script.php

If I do it via shell, it works ok.

But If I do:
-------
system("cd /home/foo1/foo2/", $retval);
system("/usr/local/php/bin/php /home/foo1/foo2/script.php", $retval);
--------

I get this error message:
-----
Fatal error: main(): Failed opening required '../config/config.php'
(include_path='.:/usr/local/php/lib/php') in /home/foo1/foo2/script.php
on line 2
-----

This error is caused by the fact that the script is not executed in the
right directory.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved