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.





List Processes Running In A Computer


I want to list all processes running on a computer by PHP language. Could you help me?




View Complete Forum Thread with Replies

Related Forum Messages:
Send Parameters To Visual Basic Server Application Running On Another Computer Through Browser
what I want to do is to send parameters to visual basic server application running on another computer through browser.. So I can login to my website, then I will be able to control the parallel port of the server computer. I found some example code.. here it is..

<?php
$host = "localhost";
$port = 5002;
$timeout = "15";

$fp = fsockopen($host, $port, $errno,$errstr, $timeout);
if(!$fp)
{
echo $errstr . "Errno:" . $errno . "<br>";
}
else
{
echo "socket successfully opened";
$out = "command1";

fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
}
fclose($fp);
?>

my first question is : should I use fsockopen or do you suggest another method to send parameters? second question is: I coded the vb application for this project. It listens the port 5002 and if get anything it makes the command..but when i execute the php script,the browser is on loading state.. I want to send only one parameter, is this code continiuously sending the output?

View Replies !
List All Computer In Network
is there anyway to list all the computer name or ip or both in my local network?

View Replies !
Create A Computer Lab Sign Up That Will List All The Dates
I am trying to create a computer lab sign up that will list all the dates and periods available and will give them the option of selecting their userid from a drop down menu in order to reserve the lab for that period. We have alot of tech unsavy people so it has to be very simple. All I want in the drop down is the word 'Available' and their User ID (which will reserve the lab).

<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":.........

View Replies !
PHP Processes
I have a cronjob triggering a php script that takes several minutes to accomplish. I need to prevent multiple triggering by the cronjob mulfunctioning. So I would like a clean way to know how many instances of a certain php are currently working on the server.

is there a server variable for that? if not, how do I know (via php) how many concurrent accesses are there to a certain php page? for example in mysql (the "SHOW PROCESSLIST" command), but I need a similar function for the php page iself.

View Replies !
Warning: Invalid Argument Supplied For Foreach() Running On A OS X Machine Running Apache 1.x And PHP 4.x.
The following script was running on a OS X machine running Apache 1.x and PHP 4.x. I just moved the script over to a Linux machine running Apache 2.0.51 and PHP 4.3.8, and now the foreach line does not work. It says Warning: Invalid argument supplied for foreach()

in /var/www/localhost/htdocs/warehouse/whse_order_submit.php on line 39

Here is the script:

<?php
//get the variables from the other page
$id=$_POST['id_no'];
$sku=$_POST['sku'];
$description=$_POST['description'];
$order=($_POST['order_qty']);
$store=$_POST['store'];
$comment=$_POST['comment'];

$ip=$REMOTE_ADDR;

//check if store is empty
if(empty($store)) {
die("Store is required. Please press the back button and enter in your store.");
}

//connect to the database
require('../inc/database_conn.php');

//$month=getdate(mon);
//$day=getdate(mday);
//$year=getdate(year);
//$today=$year . "-" . $month . "-" . $day
$today=date('Y-m-d');

// create the unique order number

$headerqry = "INSERT INTO misc_order_header (order_date, store, comment, ip) VALUES ('$today', '$store', '$comment', '$ip')";

mysql_query($headerqry, $conn) or die(mysql_error());
$order_no=mysql_insert_id();
foreach($order_qty as $id_no => $val) {
if($order_qty[$id_no] > 0) {
$detailqry = "INSERT INTO misc_order_detail (order_no, id_no, sku, order_qty, order_date, store) VALUES ('$order_no', '$id_no', '$sku', '".$order_qty[$id_no]."', '$today', '$store')";
mysql_query($detailqry, $conn) or die(mysql_error() . "<BR>" . $detailqry);
}
}

View Replies !
Background Processes
I'd like to know how to send an external process to the background, so that I can run multiple instances of the same process at one time. Any tips, links.. etc?

View Replies !
Listing Processes In PHP
Using PHP, is it possible to return and display a list of currently running processes on the client's machine? In fact, is it possible to run a system command on a client's machine?

View Replies !
Automated Processes
Customers post 'projects' to my site. These 'projects' are closed after 10 days. I could run a script on the default.php page that detects this, but it seems a waste of resources to run it everytime someone visits the site. Is there a way around this, for example the first visitor to the site in any, say, 3 hour period, runs the script & switches the most recently outdated projects from open to closed?


View Replies !
Max Number Of Processes
how can i determine what the maximum number of processes i should open
with popen (or proc_open) is? i assume it'd depend on the hardware of
the computer in question, but if that were teh case, then is there a
way to get info. about it, and some general method to determine a good
number of processes to open from that info?

View Replies !
Stranded PHP Processes And ProcessExplorer
Does anyone know what it means if I see PHP processes in the process
tree at the base level, instead of under the IIS worker process?

I do nothing but web serving off of the box.

These processes that are not under the IIS worker process seem to be
stranded/hung. They are never cleaned up by any garbage collection and
I have to kill them manually. They also always have a fairly low memory
usage, potentially indicating that they fail before loading completely.

Could it be that the execution of the process fails early enough that
ProcessExplorer doesn't see them as being executed by IIS?

View Replies !
Handling Long Processes
I am building web app, that will run a long processs (image processing) that can porbably take 15-30 minutes to complete) in respond to a user request (the user clicks a "process" button on a php web form). The ideal situation that I see is once the user's request was recevied, a reply that says "you request is being processed.

we will send you email once finished", will be sent to the user, while the other process will take place. When it's finished, a callback function will be called that sends email to the user notifying him the process outcome. What are the options to implement that?
multithreading?

View Replies !
Shared Memory Between 2 Processes?
I have two running php processes (they have infinite loops) and I need them to pass some data to eachother. Writing and reading shared memory in one process works just fine but when I try to save var in process1 and read in process2 I get error: "Variable key 555 doesn't exist".

What I'm doing wrong?

//PROCESS 1 (saving var)
$key = 'My Key'
$value = 'My Value'
$app = 'lovelyapp'
$key = $key . 'a'
$segment_key = abs(crc32($app . $key));
$segment_size = 1024;
$segment_perms = 0600;
$shm_id = shm_attach($segment_key, $segment_size, $segment_perms);
shm_put_var($shm_id, 555, $value);
shm_detach($shm_id);

// PROCESS 2 (reading var)
$key = 'My Key'
$app = 'lovelyapp'
$key = $key . 'a'
$segment_key = abs(crc32($app . $key));
$segment_size = 1024;
$segment_perms = 0600;
$shm_id = shm_attach($segment_key, $segment_size, $segment_perms);
$value = shm_get_var($shm_id, 555);
shm_detach($shm_id);

View Replies !
External Processes Without Waiting For Return
In php how do I call an external script or program without having php
waiting for the return?

exec and system both seem to wait for the return, I don't want this.

View Replies !
Insert Processes Before Form Is Submitted
I am trying to stop using Macromedia as my crutch and you guys have been a big help.  I need some assistance with submitting a form.  I have a form on my page and need to do an insert.  I have the action posting it back to the same page I am on versus sending it to an insert page.  The problem I am having is it trys to do the insert as soon as I pull up the page instead of waiting till the form is submitted.  I believe I need to do something with isset, but can't really find a tutorial that goes over it really well. Code:

View Replies !
Forking Multiple Processes At A Time
i have a php script that needs to execute an external php script (call this
script 2) when the user clicks a link, however I don't want the user to have
to wait until script 2 finishes executing before he sees the output of
script one... i know I can use the exec() command to do this, and use the &
to run the command in the background....

but say i want to run 100 instances of script 2 when the user clicks the
link (with different arguments)... i dont want to have all 100 processes
running at the same time... what I would like to do is run 10 or so at once,
and once those 10 are completed, run another 10...

View Replies !
Large Data Transfer Between 2 Processes
fist the context: I have a web server which query a mySql database. but
as the number of parralel queries increase, the server slows down too
much.

I got 2 ideas, one of which is to run N deamons which effectively
execute requests. the PHP uses message queuing(1) to queue queries
request to the daemons. but the answer may be quite large, larger than
messages the message queueing service can handle.

I thought to open back a communication link between the current daemon
and the waiting PHP to tranfer/process the result, using the message
queueing service to send back info regarding the opened link.

I thought to open a pipe between the current daemon and the PHP. is
this possible? and if so, how? if not, is an IP link to localhost be as
fast as a pipe?

View Replies !
Keeping Users Informed In Lengthy PHP Processes
Often PHP processes take a long time, such as wildcard searching a PostgreSQL database, or generating thumbnails.

The PHP host page does not display until the script is complete, so you can not effectively use code such as

echo "Converting file ".$Infile;
exec(convert $Infile $O8utfile);

for realtime feedback to the user.

How have others implemented a "progress meter" in PHP processes , one thought I had was to use Javascript redirection to call a PHP page with differing parameters each time .

View Replies !
Sending Signals To Processes As A Different User Than Owner Using Php
i know, it seems more to be a problem according to unix but i got it while
developing software with php:
i have 2 different users on a hp-ux machine that execute php scripts. they
are both in the same group.
these php scripts start background processes, i can communicate with using
signals (sending with posix_kill, starting background processes via
pcntl_fork).
so i got severel background processes owned by my 2 users.
the problem is i want to send signals as one of my 2 users to all my php
background processes no matter who of my 2 users is the owner. is it
possible other than using external tools like sudo?
i'm using:
PHP 4.3.4 (cgi) (built: Aug 18 2004 15:37:46)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

compiled with:
../configure' '--prefix=/usr/local/php-cgi-saprfc' '--enable-calendar'
'--enable-filepro' '--with-gd' '--with-jpeg-dir=/usr/local'
'--with-zlib-dir=/usr/local' '--without-mysql' '--enable-sysvsem'
'--enable-sysvshm' '--with-pgsql=/usr/local/pgsql' '--enable-trans-sid'
'--with-cpdflib=/usr/local' '--enable-sockets' '--with-ncurses=/usr/local'
'--disable-shared' '--with-tsrm-pthreads' '--with-saprfc=/usr/local/rfcsdk'
'--enable-pcntl

View Replies !
Max_execution_time Ignored, Multiple Apache Processes Spawned
I have an app that is going berzerk on its own; without any code or environmental changes of any kind, for some bizarre reason it will randomly just hang, spawn multiple Apache processes and completely ignore max_execution_time, literally running infinitely.

Using PHP 5.2.0, Apache 1.3 and Win XP

Is this normal "bizarre" behavior that can occur within this setup; if so, what workarounds have you found to combat this, other than the obvious (try to debug and fix code)?

View Replies !
Limiting The Number Of Spawned MySQL Child Processes
Need to know if there is any way to limit the number of spawned MySQL child processes in linux ?

I have done my research at http://www.mysql.com and have not been able to find my answer. Have also looked at the source code (what i can understand of it).

Using MySQL v.4.0.25-max. Using an older system and the 14 childern are just bogging the system down. I am the only one with access to the server so 14 childern is overkill.

View Replies !
Checkboxes - Loop That Takes The Values And Processes And Writes The Changes To The Database.
I generate a form page from my MySQL database. let's say the table structure is:

Table A
> ID, title, active

the number of rows generated by the query is dynamic. If a field's value is 1, then the form output appears as

<input type=checkbox name=$ID checked> $title

and if not

<input type=checkbox name=$ID> $title

At the bottom of the form there is a submit button. The visitor can check/uncheck rows and then submit the form. I need to write a loop (possibly foreach) that takes the values and processes them and writes the changes to the database.

View Replies !
Build A Page That Takes Form Data, Processes It In A Second Page
I'm trying to build a page that takes form data, processes it in a second page, then sends the user to a third,depending on data processing.

On the second page, I am trying to get the page to have some sort of "Loading" message while the backend processes the data, but I can't seem to get anything to work. Does anyone know how I can get that Loading message to display?

View Replies !
Is There A Way To Get Computer Name In Php ?
I'm trying to get the " Computer Name " of a client accessing my web
site,
is there a way to do this ? not ip...

View Replies !
Ftp From Web To My Computer
I wonder if any one can point me to some information. I am fairly new to this so please excuse my ignorance I have setup an ftp server using Cerberus & DynDns which successfully allows me to upload files from a remote location to my PC. Thats all good.

I have also created a web page that allows me to upload a file to my web server.

I want to combine the 2 processes so I can use the web page to upload to my PC.

I hope this makes sense because I am not sure how else to explain it.

Please help if you can or direct me somewhere else.

View Replies !
Getting Computer Id.
Is it possible to get any computer computer unique information (like comp serial nuber) with php or javascript?

View Replies !
Cookies Set On Any Computer
i am facing probs with cookies,in the sense it gets set on many machines but misses out on few. The browser remaining the same,what i would like to know is, the problem behind it,can i add something to the code where in it gets set on and any computer.

View Replies !
Uploading From URL & Computer
I have this script for uploading images from a computer, but I need to be able to upload using URL's as well, here is the portion of the script I think needs to change, if you need more let me know... Code:

View Replies !
How To Get The User Computer Name
i want to know how i can get the user computer name and port;

View Replies !
Blocking A Computer
How can I make it so if a certain computer(s) come to my website they will re-directed to a certain page? The person that I want to do this with has a router, so he has a different IP adress every time he turns it off then back on. Is this still possible though?

View Replies !
Unique Computer Id?
Is there any way of accessing the computer's serial number through PHP? This would be useful for identifying a computer, rather than the IP address.

View Replies !
Computer Logon Etc
I'm developing an intranet for my department. I usually develop on my test server and, once everything is ok, move the files, functions, etc to the production server. A little while ago I developed an application for which I needed to have the computer logon captured. So, I removed the "anonymous access" in IIS and selected "Integrated Windows Authentication". Then, when I used the $_Server['logon user'], I was able to capture the user logon.

It all worked fine, until I decided to move the files to the production server, however, I keep getting a dialog box asking me to "login" the pages. What am I doing wrong? Did I forget some setting on my "twin" production server? Is there something more I need to check besides checking off the "anonymous authentication"?

View Replies !
Computer Identification
I am curious if anyone knows of any other methods other than by the IP & MAC to identify a individual computer. in particular does anyone have a piece of code that can gather the remote computer name & or drive identification?

View Replies !
Shutdown Computer
I run an online radio station, and am in need of a method to shutdown or restart the computer running the station in case of errors etc. I noticed the delphi program idea someone posted earlier, but I dont have possesion of any way to compile delphi code or any knowledge of delphi. I could use to solve this problem?

View Replies !
Server Within My Computer
How do I set up a server within my computer to test my PHP files?

View Replies !
Server On Computer
Is there some software which can imitate PHP server but when I'm offline and it's located on my computer? Because I use dial-up, and I can't connect to Net whenever I want and test my site, I'm just curious if this is maybe possible.

View Replies !
Shutting Down Computer
I have finally figured out a way to shutdown a computer with PHP.

View Replies !
Where Session ID Save On My Computer?
I use session with my page.
My configuration in php.ini like this.

session.save_path= C:PHPsessiondata
session.use_cookies=1
session.use_trans_sid=1 (I also change to 0)

I know that session ID save both client and server.
On client save only session ID
On server save both Session ID and Data and I see session file in c:phpsessiondata
but I don't know where it save session ID in client.

becasue not session ID in URL and not cookie on my computer. Where session ID save on my computer?

View Replies !
Way To View PHP Files On Your Computer?
Is there a way to view what certain PHP files will look like, without having to upload them to your server?

I'm testing out page layouts, and its kind of a pain to upload it every time to see what it looks like.

View Replies !
PhpMyAdmin (securing My Computer)
I am worried about other people accessing my computer. right now i am in config mode in the config.inc.php file. If i switch to HTTP mode, how do i setup .htaccess. I am a web/programmer newbie and im not sure where to start. i read through the howto about htaccess and got nowhere. from what i understand they said not to use htaccess if you don't have to.

View Replies !
How To Uniquely Identify A Computer
can anyone tell me is there any way to uniquely identify a computer connected to a site, i am already doing this with the ip but i need a second means as that does'nt work with internal networks that are all connected to the internet via one computer.??

View Replies !
Parse PHP On Local Computer
Running Windows XP (Home) and would like to be able to parse PHP locally without having to upload files to my host server and view them there. I know I can install PHP on my PC, but what is the simplest way to set it up as a local server, preferably without needing to install Apache as well?

View Replies !
Sending Emails From My Computer
I'm trying to make a newsletter and here is my code. PHP Code:

View Replies !
Use Another Computer To Send Mail.
My computer install Redhat and PHP and Apache I want to write script that send mail and use another computer as SMTP (specific by IP). I see in php.ini can specific SMTP but only win32.

View Replies !
Cookie Problem With A Computer
I have a problem with cookies on an intranet page created in PHP. All
the computers on the network except one works with cookies!! I though
it was a general cookie problem, but every other site works, this
includes hotmail and so on.. I even opened up the cookie directory and
new files are created for every site visited except the intranet page.
Why is this? Why is it happening to only one computer while all the
other computers work fine?

View Replies !
Can PHP Be Installed On WinME Computer?
Is it possible to install PHP on a stand alone WinME computer, and have
the .php files work exactly like they do on an Internet server?

View Replies !
Opening A File From Your Computer
How would you open and read a php file that is in your hard drive and use it inside a php script that is run on a server. Example: security.php - file located on the server would have something like this PHP Code:

View Replies !
Getting The Id Of A Computer As It Hits The Server
I need to get the id of a computer as it hits the server. I know there
is a function to do this, but I can't find it.

View Replies !
Write A File To The Computer
I need a way, in ANY internet language, to write a text file to the computer.

View Replies !
How Many Sites Can You Host On 1 Computer?
Does anyone know how many sites can 1 machine host with a static ip address? Assume the machine is a pretty nice ($2000 web server).

View Replies !
Orders Sent Via Computer To Fax Machine
I have a client that wants an online menu built for his web site! My client wants his customers to place orders via internet, and in return he'll have the orders ready at the desired time! Now for the kicker! he has no internet connection at his restaurant. Can a form be built to send the information via computer to his fax machine? If so, please tell me how or point me to the tutorial.

View Replies !
Palm Based Computer
I am looking for a way to write PHP apps on a Palm based computer.
Why? Because I like PHP, and the whole Palm OS paradigm is very
web-server like (from a user point of view).

If the you envionsion a plam screen as a web browser and the Palm DB as
either a database or file system, you could easily and quickly build
PHP apps for palms.

I have several apps I would like to crank out - however cranking out
C/C++ code is no longer my specialty and the nuances for Palm involve a
learning curve that I never have enough time to conquere (I have put
together several Palm apps in the past - and now it seems I struggle
with "hello World". Why would you create a system that is so difficult
to change strings of things like labels? Code:

View Replies !
SMTP To Many Crashes Computer
We're a software company and have just converted to using SMTP to mailout rather that the php mail() function. The way it works is send 40 emails out, sleep for 3 seconds, send another 40, sleep for 3 seconds etc etc.

This works fine for smaller amounts but some of our clients are mailing to 1000+ people and they claim its crashing they're computers.

View Replies !

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