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.





Process Management In Windows


All I need to do is run a windows batch file from a small php program, and
return the windows process id of the batch file. I have played around with
proc_open() but that returns a resource id. Does anyone have a suggestion
on what call I could use to get the windows process id returned within my
program. I am using windows xp pro, and php 5/apache




View Complete Forum Thread with Replies

Related Forum Messages:
Want To Spawn Process From Windows PHP
I wanted to write some code purely on Linux, but unfortunately the
document scanner drivers are non-existent for the high-end commercial
document scanners. So, I had to port my Linux PHP project to Windows
PHP (WAMP). There, I found a scanning tool (Kodak Image Scan -
imgscan.ocx) that I can put on a VB form, tell it to scan some
documents into a TIF file, and then shut down.

I can run this VB app at command line just fine, but when I run it from
either a popen(), system(), or exec() call, it won't detach from the
PHP page. Instead, it just sits there. I can see the VB exe I made is
being loaded properly in RAM, but unfortunately it sticks and won't
unload on its own, nor will it tell the scanner to engage. I have to
kill the VB exe and then the PHP page continues.

What's the way to spawn a detached process from PHP on Windows?

View Replies !
Calling PHP From A Windows Process
I'm calling PHP from a windowsprocess in a simple Webserver application. I'm using the createprocess Windows API command....

C:PhpPHP Filename.php

In this file I will open a TCP/IP connection to my SQL-server. When I do so, I always get the following error
mysql_connect(): Can't create TCP/IP socket (10106)

No I start a command shell and I call the same...
C:PhpPHP Filename.php

This will work without any error!!

Same effect I get from all TCP/IP Actions (FTP etc....)

Can somebody help me. Is it a PHP Setting, a server variable or a WindowsXP Access right problem?

View Replies !
Possible To Check To See If Windows Process Is Running From PHP?
I need to check the state of a processes from within a PHP script on a
Windows machine. All I need to know is whether or not the process
exists (i.e., is running). Anyone have any ideas?

I searched the archives and found proc_open(), but if it can do what
I'm trying to do, I can't figure out how.

View Replies !
Shell_exec Background Process *Windows*
I am trying to get a shell_exec command to run in the background. So far I have tried:

$ret = shell_exec($ffmpegcmd1." >NUL 2>&1");$ret = shell_exec($ffmpegcmd1." >NUL 2>&1 &");$ret = shell_exec($ffmpegcmd1." >NUL");

without any luck.

View Replies !
Creating Or Simulating A A Process Fork On Windows
IS there anyway of running two or more scripts seemingly simualtaneously?? PHP is installed on a Win 2K machine.

View Replies !
Is It Possible To Authenticate Users Running Apache On MacOS X (with PHP 4) And An Active Directory On Windows 2000 Or Windows XP?
From a PHP webpage, is it possible to authenticate users running Apache on MacOS X (with PHP 4) and an active directory on Windows 2000 or Windows XP?

View Replies !
DB Management
i've got a mysql table (or set of tables) which are used for logging, when it get's full the request starts to lag while it's searched. Therefore periodically I want to back it up. However, say I set a routine which back's it all up to file and then truncates (as so to reset the id) the table, ok.

But say whilst this is being done more entries are added and are not backed up. One point is, a certain period of time worth of log's need to be retained for frequency checking.

Considerations:
- If an entry is added whilst the table is being truncated, what happens.
- If only use delete entry, then at what point does the id run into trouble.
- Is it crazy to think about using two tables and just rotate them.

View Replies !
Ad Management
I am looking for something that I can place banner ads, rotate them and keep statistics with. Anyone have any ideas of a good system.

I would pefer something free because our site does not generate any money yet. I was looking into phpadsnew 2.0.4, but I cannot seem to find install instructions.

View Replies !
Process ID
I am starting a process with the system command via a php page. I want
to put a button on the same page which will let the user kill the
process by clicking that button. To do this, I need to know the process
ID. I could grep for it, but that also returns the grep command. How can
I make PHP tell me the process ID of a process I started? It seems as if
this would not be a problem but I guess I am missing something.

View Replies !
Getting Your Own Process ID
I am doing some work where I want to do locking, and prevent scripts from
running in parallel. I see that I could use the semaphore mechanism, but
I'd like for my code to be portable, and that extension is not enabled in
many places.

I need some way for a process to uniquely identify itself. It can then look
at the storage container (flat file, DB, whatever is appropriate in
context), check to see if the requested semaphore is available, and if it
is, acquire it and then mark itself as the owner. It can then check that it
did in fact get ownership (as opposed to another process which attempted to
acquire it at the exact same moment) before proceeding. Code:

View Replies !
Process Name
How do you send a variable with a php process name? I have one script that different websites are running in the background. I want to be able to identify which website is running which process of the script.

/usr/bin/php /home/thescript.php - domain1.com
/usr/bin/php /home/thescript.php - domain2.com

View Replies !
Memory Management
I've ran into a problem with my MySQL Class. Otherwise a very useful and easy tool, but when you get to handle large amounts of data with it, it will slow your site down significantly. It contains three functions, from which the SelectAll() is the troublesome 'cause it returns all results of a query. What it basicly does is it piles all data inside array. Each result is an array, inside the main array. This makes it easy to go through with loops.

But imagine what happens if I get 10000 results. I've tried to optimize it and basicly the SelectAll() is only a few lines long. Still it slows down. I've tried to search for articles about the issue but nothing, for this kind of thing, has come up.

View Replies !
Content Management
I've been looking a bit at PHP-based Content Management Solutions (CMS), including Midgard, PHPNuke, etc.

Has anyone dealt with these, and what do you find better in re. functionality, implementation, ect.?

We have a situation where we would have only about 4-5 content editors, with tasks like updating job postings, occasionally editing product info, adding new press releases, etc. Nothing terribly advanced.

View Replies !
AD Management Scripts
I've been looking for a while for an open source banner rotation script. I want the rotation ads to be included on different areas of my side via php includes. I also want the users to be able to manage their ads and place ads for a fee (through paypal), and an admin panel would also be handy.

Does anyone know of a script like this or maybe something similar?

View Replies !
Document Management In PHP?
Does anybody know about a good open source form manager (document
management) in PHP/MySQL? I have to build online admin pages for couple
of custom form types which are currently on the paper.

Basicaly, it's about seminar event management with teachers, students
and sponsors. I have lots of (paper) documents with details about each
of them and I'm looking for a quick way to build online admin pages that
would have these features:

1) administer forms (documents)
2) building relationships between documents
3) advanced search engine for reports

View Replies !
Management Scripts
I'm writting some scripts to management users on server
throuh www. I need to call some functions like "adduser",
"rmuser" etc. in my scripts. I'd like to know the best way
I could do this. I want secure sripts. Could anyone help me
to find solution to do this?

View Replies !
PHP Memory Management
I'm new to PHP programming (coming from C++); and all is well, except when
it comes to memory management. Particularly, with passing objects/arrays in
and out of functions. I've had so many unexpected results because of this
feature, that I'm almost pissed off, almost.

Things like, I have a class, with some callbacks (which default to functions
inside the class). But when the default functions were called, $this
couldn't see the values of the member variables. I found that my calling
array($this, "fun") (for use in a call to call_user_func) was creating a
copy of $this and thus it was a copy of the variables. Fixed with a $cb =
array(); $cb[0] = &$this; etc...

Later, with more problems, I found that $x = new y; made two copies (I've
assumed from the testing I'd done). One where it calls the constructor, and
then one when it copies it into $x. Fixed with a $x = &new y; (I consider
myself lucky to have discovered this as it could very easily have gone
unnoticed, had I not been setting up a reference to this in the constructor)
Which makes me worry that there are other places I don't know about!

....and lots more of course...

I guess with a little more care, it will be obvious where a problem exists,
but as I am a newbie, I know it will continue to destroy me.

Are there any tools or memory management functions that will allow me to see
exactly how many copies of various objects/classes/strings I have. Or a way
to dump a memory allocation when it happens or anything. I'm fearful that
there may be millions of copies of my classes and such that I won't know
about until it gets released - and two users go to the web site at the same
time and cause the server to run out of memory.

C++ is so much easier, I know exactly what memory is allocated, when and
where, and when it will be destroyed. Whoever invented garbage collection
and all that; a can of comeuppance upon them (not the good kind).

View Replies !
PHP Website Management
I have just bought a small website written with php & html. The
vendors advised me that once I uploaded it to my website I could
customise all the templates to give it whatever look I wanted.

As a novice, I had no idea how difficult this would be - due to the
fact that a php website is very disjointed.

Can anyone tell me of any software I can download that will enable me
to manage my website so that I can see the structure in it easily and
make changes simply.

(I thought I was buying 60 sets of templates but what I bought was a
site with 60 pages).

View Replies !
DNS Management Software
I'm looking for a web based software to manage my BIND 9.2 DNS server.
The software should have an interface to add/remove/edit records and
also a user login so that different users can manage different
domains. I have found some various systems related to DNS on the web,
such as phpdomain, but it seems mainly targeted to registering
domainnames and then pointing them to a dns server, not actually
setting the dns server up once that is done.

View Replies !
Using PHP For Session Management
I've just started using PHP for session management (done alot of it in
ISAPI/Delphi for many years).

My question is this:

I want to have a number of variables, for example $customer_id which
are session variables.

The PHP book I have been reading talks about
session_register('customer_id'), but I have seen people comment that
this is bad practice.

How should I approach this ?

I've tried putting $customer_id = $_SESSION['customer_id'], but have
found it difficult to rewrite the changed value back into the _SESSION
array at the end of the request.

Is there any way to get around this ?

I'm running PHP in a CGI mode under IIS ....

View Replies !
Date Management
I'm trying to create 2 pages for a website where you can input dates in 4 seperate boxes on one page which then gets written to a xml file and then those dates get retrieved from the xml file and placed in the appropriate place on the second page.
The section of the page where the dates are to be placed looks a little like this: Code:

View Replies !
Content Management With PHP
I have almost 1000 entries on a table in a MySQL DB. What I want to do is to display items from a row, depending on the URL.

For Example, I want this url:
http://localhost/players.php?lookup=23

to display certain attributes set into the table (ID,Firstname,Lastname), etc.

I'm using the following code for http://localhost/players.php?lookup=23 and it's not working: Code:

View Replies !
$_content Management
i am I'm trying to create a simple content management system for a online store I am building w/ Y! store tags.

I want to use the $_GET array and setup a script such as http://store.com/script.php?item=A , where A = item number. The script would get the value and then display the simple HTML layout but change all instances of "itemnumber" in the store tag HTML to the value of ITEM in the script (A).

store tags are inserted into the html layout such as <|-- ytag_picture=itemnumer --|> ..This would allow me to not have to make one seperate HTML page for each item.

View Replies !
Page Management
i want to use the same page for login and messege that user is loged in for my site. how can i access the sumbitted data on on the same page.

View Replies !
Picture Management
What I need to do is when I upload a new record to mysql database i need it to upload 7 pictures to a folder in /images/"ref no"/ .and then rename from a to g. I also need thumbnails to be created called as to gs (a small to g small). It would be great if i could get a program to upload them, resise them, rename them and create the thumbnails automatically, but the essential parts are uploading them to the folder and creating the thumbnails. What is the best way of doing this?

View Replies !
Best Document Management
I'm looking for a document management system that is open source created with PHP & MySQL. The system minimally will support unlimited user accounts and user groups with the ability to securely associate groups of files together. The system should allow for easy sorting, organizing and categorizing of files. HIPPA compliancy is required.

A simple list of known packages would help. If you have first-hand experience with one of them, even better. I know of OWL, but haven't actually used it.

View Replies !
User Management
I am trying to create a website with phpauction and several other php scripts like a calendar and a business directory. Is there a script out there that I could use to auto register and login users in all these services with only one step? What i mean by that is that a user would sign up once and have accounts created automatically in all the
services.

View Replies !
Management Of Session
I am working on an application which is developed in ASP. This application internally uses some modules of php. This php is alltogether different application but running in same IIS server on advanced windows 2003 OS,with MSSql2k as a backaned support.

I need to create a session bridge between both of this applications. I mean when i switch to ASP application from php there should be some funcitonality which can pass the asp session id to ASP application. By this i want to achieve one session between two applications.

How to create this session bridge through which i can pass the session of php to asp application and as session id to php application?


View Replies !
Member Management
I would like to have login and registration for new members on my site. Where do I start? What program should I use?

View Replies !
File Management
I run a small website which is for a small group of poeple aorund 100, and they take minutes of meetings, results from competitions things like that, mostly PDF documents and word files. I need to be able to display these for download easily, Ive brocken all the documents into a round 10 different sections, is there any way (script) out there that will automatically update a webpage based on the contents of a directory?

View Replies !
User Management Help
I've been hosting a forum game that has been extremely successful, so I'm converting it into an online PHP based game. To give some background, the game is an industry type game with elements from Monopoly from it, where people build buildings, get products, sell and buy from a market that fluxes with the amount of product bought and sold, and just keep expanding.

Unforunately, I'm a little new to PHP and MySQL, but am learning quickly. But I'm not sure how to do my users. I just installed some registration/login scripts that allow my users to make a username and password, and store their email and whatnot, but I'm not sure if I should make a new table for their buildings they have or anything. And for whether I should make a table for hte prices of the buildings, etc..,etc.

View Replies !
Serious Memory Management
I have a PHP page that reads emails from an email account, parses them, processes the resulting information, and then sends out a response. I am in the process of testing it right now, and I am using a small sample (11 emails). I expect, when the site is fully functional, that I could be processing hundreds of emails at a time. I am running the site on a managed server that is dedicated, so I have a fair amount of memory. Unfortunately, I get a fatal error:

Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 6 bytes) in funcs_parse_emails.php on line 48

after only six emails. Clearly, if I am using up 42 megabytes, I have a serious problem. Is there someone out there who can point me to a book or website that discusses PHP memory management issues or provides tools I can use?

View Replies !
Asset Management
I'm planning on building an asset management tool for our local network. I have a question I would like to ask: Is it possible to use PHP/MYSQL/JS etc. as a "metadata" structure and when trying to retreive a file (mostly files over a 100MB) not sending
it over http, but use some other (faster) way for that, like calling a batch script or something (I understand there are security issues to be dealt with), but using the local network infrastructure. Or would FTP be an option... trying to explore all possibilities, but haven't got very far at this stage.

View Replies !
Banner Ad Management
I was set to Openads (phpAdsNew), but I seen in the bugs tracking system that a couple people complained of having code inclusion. I'm not sure as to how but I'd imagine it was done via SQL-injection. I'm going to d/l the script and go over it and try and hunt down those types of holes. in the meantime, what do you suggest thats out there.

View Replies !
Session Management
I've written a session-based back-end requiring user login. It works as expected when I use Firefox (windows) or Safari (mac) but not in IE 6. There should be no need to explain my code because php is browser independent. What's happening is that when I enter the user/pw on the login page, (assuming correct usr/pw pair) I get re-directed to the main admin page (index.php). that part works. However, clicking on a nav link sends me back to the login (as if the $_SESSION['user'] variable was never set).

View Replies !
Image Management
I use the following form to upload and change the filename of 1 picture on my website: Code:

<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Pic 1</p>
<input name="file1" type="file" id="file" size="50" />
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input type="submit" value="Upload" />
</form>

and upload.php: Code:

<?
$file_name = $HTTP_POST_FILES['file1']['name'];

$random=rand();
...

View Replies !
Run Process In Background
I want to run process from my php script in background.
I try different functions from functions list but all of them whaiting for
process ending. How can I run `wget -b ...` and finish my script, but wget must still working? I use PHP5, Linux, Apache2.

View Replies !
Multithread A Process
can i use php to multithread mail() or something similar? in my company
i need to send multiple copies of email to a few hundred ppl affilated
and on my list.

instead of calling mail over and over again i would like to thread this
process.

could someone point me to some documentation or perhaps an example of
where to start with this?

View Replies !
Fetch & Process
I doing a straight forward webpage fetch and saving it to a file: CODE:

$open = @fopen($url, "r");
$urlfile = @fread($open, 50000);
@fclose($open);
$page = split("",$urlfile);
$datafile = fopen($tempfile, 'w');
foreach ($page as $line) {
echo($line);
fwrite($datafile,$line); }
fclose($datafile);

So I basically just write the fetched HTML line by line to a local file. The weird thing is I'm getting a bunch of ^M characters in the final file after every $line is written to the file.

View Replies !
PHP Process Problems
I'm having problems with php process in win2k. I have apache+php intalled on a win2k machine and after some use I can find 1,2 or 3 non-terminated process in the system. I try to kill them but I receive access denied (even logged as administrator :confused, and I have to reboot the machine.

While I have 1 non-terminated process, I have no problems. But when it reaches 3 process php scripts doens't work anymore. If I try to load a page, it doesn't execute the scripts and the browser keeps waiting forever. What maybe the problem? Why can't I kill the process?

View Replies !
How To Process .htm Files As If They Are .php
I will like to process all HTML files as PHP files. I am using Linux and PHP 4.

View Replies !
Process Form Twice
I have a basic form on one website. But the way it is setup is once the submit button is hit it takes them to a different site where the form is processed. Is what I need to do is have a way that once the submit button is hit I need to save the persons name only in a text file or something then have it go to the other page to be processed. Does that make sense.

i know how to save the info from the form to a text file but don't know how to have it do both, save the name and then take the user to the other page where the registration form is processed.

View Replies !
Trouble With A Php Process
I have set up a form and when I click on submit I get the following error message:

Warning: fopen(admin/data.dat): failed to open stream: No such file or directory in /home/mlkphoto/public_html/process.php on line 33

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mlkphoto/public_html/process.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home/mlkphoto/public_html/process.php:33) in /home/mlkphoto/public_html/process.php on line 39

What does this mean and how do I fix it? I do get the form information sent to my email so I know it's going through. I just can't get a "Thank you" page to come up and I get the error messages.

View Replies !
Process This Form
I want to have a form which has several rows for example:

username1 firstname1 surname1
username2 firstname2 surname2
username3 firstname3 surname3
username4 firstname4 surname4

What I want to do is when this data is typed into the form to save it in a MYSQL db. The problem isn't with the saving, it's with the form itself. What is the best way to process this?

I can't really name the various fields "username1" and "username2" because I would then need to replicate these as variables and this form generated could have an number of rows so hard coding the form field names with numbers makes it hard. Is there any way I can do this?? How have other people tackled this sort of thing in the past?

View Replies !
PHP Load Process
I've tried searching around for information on how PHP parses and renders itself.

Basically, I'm writing a bunch of scripts that rely on a core file. The core itself is quite large (around 20k), but the scripts that reference it don't often utilise the entire contents of the core.

Inside the core are functions that are never called *inside* the core, and a bunch of constants and globals that I call from the referencing scripts.

So I guess in a nutshell, I want to know if when I call require, does PHP read the *entire* file? Or does it only read the bits it needs? I realise that last sentence makes me sound like I have trouble putting legos together, but I would just like to know how PHP goes about it duty.

View Replies !
Hanging Php Process
I am running a php site on a shared host environment. They have 20 max concurrent process limitation. Recently, I am having issue of some phpcgi process just hanging there and my site run out of process quota.

the time limitation in php.ini is 180 seconds. However,those php just doesn't quit after 180 seconds, I check ps result. seems all those process just consume 0 seconds of CPU which explains why it didn't get termiated? It just didn't finish properly. what kind of things will cause process stay there? if I didn't close mysql connection,not free up result, will that cause it?

View Replies !
Image Process
I start learining php this week , and I am wondering if anybody knows if we can access to a picture's pixel using php.

View Replies !
Process A BIG String
i need to process every character in a file, so i open the file read
in buffers of about 8192bytes and process each buffer, then i write
the output to another file.

the problem is that with large files(>8Mb) i get a script error(Fatal
error: Maximum execution time of 30 seconds exceeded ).

i acess every character in the buffer with
$chr=ord($bufferIn{$i}); (where $i=0...8192)
seems like all he time the script consumes is in the for loop and the
chr/ord functions.

can i do something to speed things up?
is there any other way of acessing a single characher except
$bufferIn{$i} ?

View Replies !
Mysql Process Cpu 106%?
Im in real trouble here I have a new social networking site similar to myspace, I just opened it to the public today and it has only around 80 users so far and with like 20 online i get this mysql process cpu 106%.

View Replies !
Background Process
I would like to create a script that acts like a background process. Basically once every hour, it will access a website, gather data from it, and write that data to a file on a remote server. The PHP code would be running on this same server. Is this type of non user activated, constantly running code possible?

View Replies !
Forking A Process
What i should i use to create a script that does two things at the same time ie while sorting/execeuting a process, how can i show another screen with valid data on it?

View Replies !
In-process Display
Is there an easy way to do either of the following in php? display basic content while the php script is running through a extended loop, then when the loop completes, replace the basic content with final content; or have two pages, one with the basic content that checks with the longer running script and redirects to it when the latter is complete.

View Replies !

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