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.





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 Complete Forum Thread with Replies

Related Forum Messages:
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 !
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 !
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 !
List Processes Running In A Computer
I want to list all processes running on a computer by PHP language. Could you help me?

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 !
ISP Automated Signup Via PHP
I've been given the interesting task of developing a website for an emerging ISP who would like to handle customer signups via an online web-based signup page. Problem is I don't know where to start. Common sence tells me that I need PHP to interact with the radius server (Cistron) somehow, but that's about all I know at this point.

I'm in the process of educating myself about how the Cistron radius server works and hopefully I can figure something out.

Has anyone else worked on a similar project in the past that can provide some useful information to me?

View Replies !
Automated Upload With PHP
I work for an animal hospital trying to use PHP to store an animal's
dental x-rays to a file server.

I can browse for the xray on the local desktop computer then click
"Upload Image". This works fine. The doctors want fewer steps to
follow. So, it was asked if I can configure the browser to load/submit
the image 'xray.tif' each time they click "Upload Image" instead of
the doctor/animal technician having to look for for dental x-ray
image.

Does PHP support such a feature to pull/load a file of the client's
computer? My three PHP books aren't helping, but I am probably looking
in the wrong direction.

View Replies !
Automated Web Browing
Does anybody have some idea how to input some text into inputbox on
one page, than press some button on that page, that will load another
page, and finally read the responde? Suppose I want to write a price
comparision engine, where I would like to parse shops website for
price each time user wants....

View Replies !
Automated Xml Playlist
I have a script that uploads mp3s to a server and then writes uploaded mp3s to an xml playlist. The problem I have is that the xml playlist is in the wrong format for mp3 player I am using. I have tried to alter the formatting but everytime i change something everything stops working, i really need to get this working and i am starting to loose my sanity! Code:

View Replies !
Automated Filelist
I want to build a PHP-Site, wich lists some downloadable files in some directories from our internet server. Can anyone tell me some hints, to build such a page? It would also be fine, if i could generate a description to the download, which is generated from the filenames.

View Replies !
Automated Tasks
I have an auction site running. Now I want the auction to be able to automatically send a mail msg to the seller after it expires. How do I do it? Obviously there is some sort of way that I can employ so that this task does not require an operator (such as me) to run manually. This task will involve accessing the database and sending an email. Can somebody enlighten me on this?

View Replies !
Automated Emailer
I need to make a script for our website that emails me everyday on certain statistics regarding our website. I was curious if there is a way that I can create this script to automatically email me every morning with the previous days statistics.

I thought I remember seeing something similar to Linux's Crontab except it was a PHP version. Has anyone had any experience with created an automated PHP emailer?

View Replies !
Automated Script
I need to make a script that runs itself every Hour, how do I do this/is it possible?

EDIT: I read about Cron Jobs/Tabs on Google.com and I see them in my CPanel but I don't know how to work it... well it says Command to run:

What do I put there? An absolute url:

http://www.site.com/script.php

?

View Replies !
Automated HTML E-mail
Is it possible to send a HTML e-mail automatically using PHP.

View Replies !
Automated Downloading Of Webpages
I'm doing a web programming project in my computer science course.
The task is to first create a content customizable webportal according to the user's preferences.

When a user login to the portal, the portal should be able to fetch the relevant information (webpages) and push it to the users.

The catch is, instead of just displaying those pages in the user's browser, I need the webportal to automatically DOWNLOAD all the pages to the user (save to the client-side).
Therefore, the user can read the information offline, reading form his/her own local disk.

This idea is similar to Avantgo for palm users.

Can I do this using PHP4 ? supported by perhaps Javascript ?
If anyone here know how to do this, please do let me know coz my deadline is very very near. So I'm desperate.

My focus is on the download mechanism. How to go about that.

View Replies !
Automated Table Filling
Ive put a whole bunch of images into MySql, and am referencing them through PHP. The code is as follows... PHP Code:

View Replies !
Automated Form Validation?
after coding for days on stupid form validations -
Like:
strings (min / max length), numbers(min / max value), money(min / max
value), postcodes(min / max value), telefon numbers,
email adresses and so on.

I thought it might be a better way to programm an automated, dynamic
form validation that works for all kinds of fields, shows the
necessary error messages and highlights the coresponding form fields.

Before I start to reinvent the wheel I thought I should ask you guys
if someone has done this before, or if there are some good examples of
how to do this on the web?

View Replies !
PHP Automated Event Reminder - Is It Possible?
Is it possible to for PHP to be self automated (without page load from client side) to process actions for timed events? Example; like a Calendar with an Event Auto Reminder (to send an email to someone at a specific junction in time; without client side interaction; to reminder person about an event).

View Replies !
Automated Bars/Rectangles
I currently have the following code, that creates an image on-the-fly, containing two bars/rectangles.

Can rectangles automatically be created in a table-column like fashion (Like what the following code does, but automated), based on a $quantity variable value. For example, if the $quantity variable contains 3, then three bars/rectangles should be created etc. Code:

View Replies !
Automated Email Process
I have an environment where I will be receiving emails with attachments from members. I need a process hopefully using PHP that will be able to recognize new email, take the attachments, and depending on whether the subject line says for example "A" or "B". I need to run a specific code to put the attachments into my MYSQL. The problem is, I'm not sure how to even access the emails, attachments, or even check if they are present using PHP. Is this possible?

View Replies !
Automated Browser Title
Something that would be really useful for a new project im working on would be to have automated browser titles using some php code in the <title> tags. The only way I can think of doing this is by having the php code read the url im using for navigation, e.g. /windows/atari2600/ and use that data, edit it and have it display as 'Windows > Atari 2600' . Has this kind of thing been done before? are there any other common ways of doing this? Also are there any tutorials around?

View Replies !
Automated Email Script
on a generic subject line and some boilerplate message text - and then automatically email this message to all addresses found in the DB table. Code:

View Replies !
Automated Paypal Reward
I run an online game, and what i have now, is a donation system, where i say donate $10 and get an in-game reward. but i have to do that manually right now, i have to check paypal, verify their email, and give out the reward. I KNOW there is a way to do this automatically. but i dont know how. how do i get paypal to redirect to one of my pages, and how do i carry variables through paypal to that page(ie: how much they paid).

View Replies !
Php Automated Mail Probs.
Here is what I have. PHP Code:

$autoresponder_enabled = 1;
$autoresponder_from = 'Jen <xXx_Eternity_xXx@hotmail.com>'
$autoresponder_subject = "%subject% (autoresponse)";
$message = "Initial message";
if(isset($_POST['products']['general']))
   {
   $message .= "This is message one- general information.";
   }
if(isset($_POST['products']['wedrock']))
   {
   $message .= "This is message two- Wedding rock.";
   }
$autoresponder_message = $message;

What Im trying to do is persuade it to send automated mail that is relevant to the boxes checked on a form. So, if box 1 (general) is checked, i want it to send the initial message Plus message one. If box two is checked i want initial message plus message two. if both are checked i want initial message plus both.

View Replies !
Creating Automated Tables
I need help in creating automated tables... I've tried with 3 columns and one/more rows it doesn't work well.. it just adding the cells one after another. Code:

View Replies !
Automated Archive On Date
i'm creating a general events guide for a site i'm working on. The administrator adds events to the database and when the date of the event has passed then it is automatically removed from the events_page and stored in an archive.

I have fields in a single table for name / email / current_date / event_title / description / event_date / url

what other fields would i need to implement this or would i need to create a new table and run a query when the event_date = now ?

View Replies !
Automated Points Delegation
I have a web site that is used to track a yearly tournament trail. I have the entire back end built but I've hit a brick wall. I am trying to build a script that will issue points to teams automatically.

Ex. Suppose we have a Tournament with different divisions. Division A has 12 teams in it. Each month there is a tournament in Division A. When the teams results are entered, the script needs to look at all of the teams that participated on that date and then issue them points.

The points system is easy. I want to use a variable such as $points = 50. So 1st place would get 50 and then each team would get one point less down to last place. I have no clue how to even start to lay this out. Do I use a custom parser script?

View Replies !
Daily Automated Query Of Database
I would like to run a script on a daily basis that queries a DATE field
in one of my tables. I want to do this to establish the age of my table
entry by comparing with the current date.

Could someone please give me a few pointers on how to get started in
solving this. I just read somewhere about cron jobs but I've never used
them?

I'm running Apache (2.0.54) on Win XP Prof with MySQL (4.1.10) and PHP
(4.3.10). All on a local machine so I can set all appropiate
permissions.

View Replies !
PhpBB Automated Module Installation
I hope this is the right forum for this post. Does anybody know if a program already exists to automate the process of installing phpBB modules? I couldn't find one, so I was going to write one; but I don't want to if one exists. It kind of seems like there might be one already, looking at the way the installation files are formatted. It's really annoying to me that they don't pass out diff patches along with the module instructions.

View Replies !
Automated Server Scripts At Intervals
Our company has developed a web-app that needs the ability to run a
regular maintenance PHP script and use it also send out SMS/Email
alerts on a regular basis, say at exactly 9AM and 2PM without user
interaction. We're using shared hosting at the moment, so we have no
access anything more than our file directory on the server and our
database. To resolve this I've created a small vb.net app that accesses
the maintenance script on our server at the preset times, which sends
out the email and everything as it should. This is functional for now
but I see this as a short-term solution considering the possible
unreliability of running an app outside of the server on a home/office
computer, also the possible security risks involved. I was wondering if
anyone knew of a better solution. We're going to be upgrading to a
dedicated server within a few months and surely there is a way for the
server to automatically run a php script at regular intervals? Maybe
I'm just looking for the most difficult solution,

View Replies !
Automated Paypal Php Download Links
I have a website where people can pay through paypal checkout and the download links are sent to their email. But the problem is that it will not allow them to download big file. Lets say anything more than 50 MB.It sends them a zip file which is 1kb in size. I think my website is on php 4.0. Can anyone give me a solution for this?

View Replies !
Automated Gui Installation Of Created APPS
I write a few applications and when I submit them to my client by logging in to their server, creating the directories, uploading the files, running the mysql scripts.  When i installed a few programs such as moodle and phpbb I loved the way how seamless it was.

Is there an application or something out there that can create an installation file for me such as the ones used in phpbb.  I ask this before i go about creating my own most likely by looking at phpbb setup etc.

View Replies !
Daily Automated Table Management
I don't think this is really a php or mysql question because I have a feeling the answer will be in a batch file or something of that nature, but I have a website that will be collecting "user destinations" and some other information every day, which then need to be saved so the users can view previous destinations... hope that makes sense. Code:

View Replies !
Kron Job / Automated Job - Mass Mailing
I need to know what strategies are available for the following situation, I have an automated emailer sending out approximately 1700 emails out and growing in numbers.

Problem is that the ISP only allows me to send out 500 per hour, so I need to create some sort of automated software or get it somewhere that would send out 500 emails everyhour.

Another problem is that I dont want this to be browser based. Because this would take approximately 4 hours and also the client's always on the move so cant expect to have a browser open for 4 hours.

View Replies !
Automated Store Txt File In MySQL
Is there an effeceint way to store a txt or html file into a table and update once every hour or half hour, the file is only a small document and is accessed by a URL.

View Replies !
Automated Image Gallery Problem.
I have this automated image gallery script that a friend of mine wrote for me; however, it's unable to be called. My website is all bought together using php, and calling so, to have these image galleries could be a problem. Does anyone have an alternative to what I have, or does anyone have a soloution to enable me to call it. Code:

View Replies !
Automated Way To Track Bounce Backs?
I am in the process of building a newsletter distribution system.  What I want to be able to do is track the emails that are faulty and have been bounced back to the server.

I know that by using "-f webmaster@evolution.tv" in the additional_parameters successfully sends back an email saying that the email could not be recieved.

The issue here is that then each failure email must be opened manually.  Is there any way to track automatically that emails have bounced back?

View Replies !
Create An Automated Continued Link
PHP Code:

<?php

//here mysql grabs the story.. and assign them properly!

//the function
function Limit_Words($string, $length, $ellipsis = "...")
   {
       $words = explode(' ', $string);
       $curindex = 0;
       $wcount = 0;
       foreach($words as $value){
               $wcount += strlen($value)+1;
if($wcount>$length-strlen($ellipsis)){
               break;
          }

View Replies !
Automated File Upload To Mysql Database
I am looking to develop an application that provides decision support
through various graphs and charts using a mysql backend. My problem is
between the data collection and data represenation. I would have a
handheld device with a database application on it to collect data, this
data (in a csv file most probably) would be transferred wirelessly to a
pc, which then would need to be uploaded online and loaded into the
correct mysql table so that any graphs would update their
representation of the data.

I am pretty new to this stuff so please bear with me but I guess the
first step would be to have a script to detect the creation or
modification of a file by the name xxx. However what would happen next?

How would the file be uploaded online and how would it be automatically
loaded into a particular mysql table?

View Replies !
Alter PHP Script To Provide Automated Response
I have a website that has feedback form, customers enter details and a php script sends the information to my email address. I would like this changing so that an automated response is sent to the customer to let them know we have received the information and will contact them shortly.

I would like this email to contain the information we are sent so they can see if it contained any errors. The current PHP script that I am using is shown below: Code:

View Replies !

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