DOS Commands

Sep 12, 2005

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.

View 1 Replies


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:

echo exec(' matlab -r scriptname');

View 5 Replies

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:

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

View 1 Replies

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

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



View 1 Replies


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

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

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

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

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

View 10 Replies

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

How Can I Run Root Commands In Php

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

What is the best way to do this?

View 6 Replies

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

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

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

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:


program filesmysqlmysql server 4.1inmysqladmin -pmypass -uroot ping

and recieved the following notification:


mysql is alive

which means: i'm connected to mysql.

View 7 Replies

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

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

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

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

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:


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

print system("cat ls.txt");


View 2 Replies

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


<? PHP

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

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

View 4 Replies

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"

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

View 1 Replies

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

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

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

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:
for ($i=1; $i<=5; $i++) {
system("php script2.php");

Script 2:

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 (ID 14997), but so far to no avail.

View 1 Replies

Copyrights 2005-15, All rights reserved