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.





Timing Events


I would like to be deleteing certain records from my database automatically after every 72hrs. I have never tried this before  but is it possible to perform actions after a certain duration of time in php ?
 




View Complete Forum Thread with Replies

Related Forum Messages:
Timing Out
I have php parsing a text file and then taking that data and inserting it into a MS Access DB and it appears that the PHP stops before finishing all the inserts. Well, i know it stops before finishing the inserts. The more load i put on this computer the less inserts it does. So i am guessing that there is spot where I increase a number to something so that the PHP has more time to finish.

View Replies !
While Loop Timing Out
Ok I just ran into this problem. I have a while statment going and the server will time it out because it going to long does anyone know a way around this?

I found somewhere online that says that PHP times out a while loop after a certan amount of time even if you have set_time_limit() or set it in the php.ini file.

For somethings I can just make it break after a number of loops and start back where it was but can't do it on some things.

View Replies !
Timing Or Profiling
is there any easy way of analyzing the time it takes to execute certain functions? i think it's called profiling, but i'm not sure.

View Replies !
PHP Sessions Timing Out.
I am having problems with my PHP sessions timing out. I have a system
which requires the user to login. Once they login, it then stores their
username as a session variable and is checked in each page. If the
username is missing, then it makes the user log back in.

However, after 5 or 10 mins of not using the system, the user then
clicks on an option and it is prompting them to login.

At the moment this is only happening on certain computers. I generally
find that the Windows XP machines dont lose the variables easily, where
the Windows 2000 machines do.

Could this be a setting in the client or the server?

View Replies !
Timing Out With @fopen
I use the following script to validate my links (1,000 at a time). It opens a file using @fopen. How can I make it time out after four seconds for each file so that if it fails to open a file in less than 4 seconds, that link fails? That should cut the time it takes this script to exicute to less than one hour. PHP Code:

View Replies !
Sessions Not Timing Out
I have set up my php application to store session data in a datbase by redefining, session_set_save_handler functions. The system seems to work fine, and I can see the sessions being stored in the database and being destroyed, however they do not seem to want to expire in the same way they used to when I wasn't storing them in the database.

After 25 mins or so, the deafault expiration would kick in and when going to a page on the site the session would have expired. This is not happening now.I am using a shared host. Below is the code that I am calling on every page. Code:

View Replies !
Upload Timing Out
I am using the move_uploaded_file command to upload some files but it seems as though my page times out while uploading.  this is not a file type problem because I am able to upload files on the same type but smaller.  I'm having problems with 7MB files even though my phpinfo says it can handle 50MB.  Is there some kind of timing out setting I can change somewhere or do I need to set up a progress bar?

View Replies !
PHP CLI Script Timing Out
I'm having some trouble with a script of mine and was hoping someone would be able to point me in the right direction...

Heres the jist of it: My company recently switched over to an asterisk phone system and i've been taksed with writing our helpdesk app that tracks the realtime progress of our queues and helpdesk techs. To accomplish this I've got a cronjob that starts the program and keeps it running all day long. It opens a socket to our asterisk server and has all phone events passed to the program via the socket. It then parses the applicable events into useful informaiton in a mysql server.

It works beautfully, execpt that the program will randomly time out. Very randomly. I haven't been able to establish any traits of the timeout. I have tried to set the max execution time to 0 in the php.ini file (which I know is not the ideal way to do this), and I have also tried setting it on the fily with set_time_limit(0). The probelm I then encounter is that instead of receiving a max execution time exceeded error and it killing my program, then program will run, but seemingly freeze and stop updating the database.

I'm running php 4.3.9, and I've included what I think are the valid parts of the script below. Code:

View Replies !
Timing A Script
I'm using a few different types of select statments in my scripts and I was wondering if there was a way that I could get a print of how long it took for each script until it was executed. That way I can compare scripts and see which one is the most efficient.

View Replies !
Session Not Timing Out
my server just doesn't seem to be timing a session out. If i leave my window on the session just stays alive. I have tried placing these two lines in my .htaccess.

php_value session.gc_maxlifetime 300
php_value session.cookie_lifetime 300

with these lines in .htaccess session should timeout after 5 minutes but after placing these lines session doesn't even start... Am i doing something wrong here..?

View Replies !
Timing Visits
I am trying to time the length of time each person views my website. I found a javascript script that will do this but I can't enter that into mysql database. Is there a way to do this with php?

View Replies !
Fsockopen Timing Out
$who_is = fsockopen($server, 43, $errn,$errstr) or die ("$errn - $errstr");

It simply keeps timing out,  I don't know what the issue is, I can connect with telnet just fine. Anyone?   

View Replies !
Query Timing Out
Does anyone know if HTACCESS can adjust the length of time a server will allow a command to run? I have a query that stops after 50k rows, and I need it to pull 300k. (I don't care how long it takes...)

View Replies !
Script Timing Out
I have a script that grabs a URL from a database, runs the URL through an RSS parser then e-mails the data. It does this around 500 times. The script is run using an hourly cronjob.

My problem is, the script does not like sending out e-mails of URLs further down the list. I have ensured there is no time limit set, so the script should not be timing out.

However, when I run the script manually via my browser, it will send the first couple of e-mails out then ask me if I would like to open/download the PHP script?

View Replies !
Timing A Cleanup
how to reset a field in a database to 0 once every 24 hours. i have an affiliates script that counts clicks in/out and i wanna reset it once a day to make sure it is accumulated over a long time and i dont really wanna hand set it to 0 all the time.

View Replies !
Script Crashing/Timing Out
I have a script that uses a couple of while loops to pull and input data into the mySQL database. There is a lot of data so the script crashes after a few minutes, saying "page cannot be found".

The max execution time in php.ini is 3600 seconds but the script is crashing before that.

I tried adding ignore_user_abort(true) at the beginning but that didnt help.

I also put set_time_limit(1000) in all the while loops but obviously since the script wasn't running for the 3600 seconds in the first place adding this didn't make any difference either.

Any other things you can think of? Any settings in Apache or mySQL I could try changing? I'm using XAMPP and am on an intranet.

View Replies !
PHP + MySql Timing Out In My Browser
I'm trying to run a php script written by someone else, not me, and it's
getting stuck in a particular step. Actually it isn't getting stuck per se,
but the browser is, because it's taking forever to return the results back
to the browser.

Here's the line that's responsible for this:

$users = $db->query_return_array("SELECT * FROM user");

It's getting stuck because in my database I have over 60,000 records. Now,
I'm just wanting to get over this step (it's an upgrade script), not looking
for fancy proper methods of php coding.

What alternative ways are there for me to prevent the browser from timing
out? I'm guessing some way of looping through the records, and updating the
client with simple update characters to prevent it from timing out.

View Replies !
Timing Check With Microtime
i tried to check the time php needs for executen of sertan scripts.
my problem is that the microseconds and seconds are not in sync. It happens several times that the microseconds is already gone over 0.9, but the second part is not +1. how can that be? what can i do against it?

View Replies !
Want Php Coding/script For Timing
Any one know about coding/script which can show the different between two time for example the orignal time is 2:00PM and the current time is 2:30PM so the result will be 30 mintues...

View Replies !
Large Sql Exports Timing Out
I am getting the classic 30-second limit when running various queries... I am pulling about 35 thousand name/email records from our database, but the script times out. I am running a simple select query from my MySQL database, looping through all the records and add to a $dump variable, then I send headers (ie, an octetstream) with the $dump in it. For example: Code:

View Replies !
Replicating A Timing System
I am trying to replicate a countdown system such as the on on the kingsofchaos.com site, every 1/2 hour a point is given to every player, how would I go about doin this?

View Replies !
Mail() Function Timing Out
I am using extremely simple code to test out the mail() function on my computer. I have use IIS 5.1 and PHP 4.3.11 in order play around with PHP and get to know it a little.
For some reason, the operation is timing out (after about 2 minutes) giving this error:

CGI Timeout The specified CGI application exceeded the allowed time for processing. The server has deleted the process.

The basic code I'm using is:

mail("address@domain.com", "Subject here", "Main message");

No headers, just the address to mail it to (obviously, a valid email address of my own), a subject and the message. I have tried searching, but even the almighty Google is failing me on this one. Any ideas on what on earth is going on here?

View Replies !
Session Cookies Timing Out (possibly)
I've built a login/access control system for an web app I'm developing, but I'm having a problem with timeouts on sessions.

I'm using a cookie to store a session id (generated when the user authenticates themselves during login) and then validating this against a record held in a database.

If the user is logged in to the system but inactive for a long period of time, when they try to continue there session the system is unable to validate them. This would happen if the session id in the db is different to that in the cookie, or if one or both are blank.

Before I start digging back through my code, I wondered if any one else had experienced this behaviour and if so did you find the cause and is there a solution?

The system uses session (non-dated) cookies, PHP 4.3.1, MySQL 3.23.55. The clients are accessing with IE 6.

View Replies !
Sessions Timing Out Even Though Session.cookie_lifetime Is 0
I'm running two version of php, 4.3.1 on my development box and 4.2.2 within production. What's strange is that for some reason, my session is being cleared after a specified time period. It looks like half an hour or so. So looking at php.net, I see the following:

session.gc_maxlifetime integer
session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up.

session.cookie_lifetime integer
session.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser. The value 0 means "until the browser is closed." Defaults to 0.See also session_get_cookie_params() and session_set_cookie_params().

To me, session.gc_maxlifetime simply indicates when files will be cleaned up after a session is finished. My understanding is that session.cookie_lifetime determines when a session times out.

As I'm writing this, I was performing a test. I simply logged in, identified which session file was mine (in the /tmp directory) and watched it. In this case, it looks like it took about 35 minutes, but sure enough, the session file was erased. Again, this doesn't happen on my dev machine, the code base is the same and to confirm that somehow my code wasn't the culprit, I just logged in and did nothing!

View Replies !
Uploading Big Files Timing Out Any Tips?
I'm trying to upload big images (>2mb) and everytime it times out any idea why?

View Replies !
Upload File Problem With Timing Out..
I've set many options to try & get around this.. such as max_execution_time, max_input_time, upload_max_filesize & post_max_size in my php.ini & also messed with "LimitRequestBody" & apache's "timeout" setting in the httpd.conf file (set it to 20 minutes) but I still get this error:

The connection to the server was reset while the page was loading. in firefox & a "page cannot be displayed" error in IE when I try & upload files that are too large.

View Replies !
Php Events Box
Is there a way to get the PHP code to read a line from the table and write it in a box? What I have is an events table with two columns, Date of Event & Name of Event. This is saved on a page called events.html (can be changed to .php) What I wan is on index.php I want a next event box.

So what I want for it is to read from the events page, and find when the next event is, using information on dates. I have no idea on how to start this at all.

View Replies !
Add Events
how to add events from my website to google calendar?

View Replies !
Scheduled Events
possible to get php to execute a script at certain times a day ? or is the only way to have a list of set times in a db, and when each user comes to my site see if it has been done or not ? and do, or dont do accordingly?

View Replies !
Reacting To Events
Does anyone have any experience of writing bots in PHP for something like IRC or XMPP? The reason I ask is because I'd like to write something that "listens" on a port and reacts to someone typing something in. Does anyone have any links to tutorials etc etc?

View Replies !
PHP And HTML Events
I was wondering if PHP can handle HTML Events or if I have to use something like Javascript. I really want to avoid using anything client-side so I know all users will be able to load my page but if I have to use Javescript to handle HTML Events, I will.

View Replies !
Events Dates
I have next code: PHP Code:

<? $id = "month(now())";
if($arrl["periodo"] == 0) //se for só um dia
echo $arrl["day"]." de ".trata_month($arrl["month"]);
elseif($arrl["periodo"] != 0)// periodo de tempo no mesmo mês
echo $arrl["day"]." a ".($arrl["day"] + $arrl["periodo"])." de ".trata_month($arrl["month"]);
...

and to 3 more echos. 1º an expression with separated several days of two months. Example: 25, 26 of April and 2 of May 2º an expression with periodic time of two months. Example: 25 a 30 of April and 4 a 7 of May 3º an expression if a event had the 26 of April a 7 of May and if the current month is May it must show " Even 7 of May" .

View Replies !
Events List
I have never used PHP before. My computers teacher wants us to make something that will use a list of events for the whole year and display the next four events only. He told us to find a place that told us how to do it using PHP but I havent been able to.

View Replies !
Events Match
I have events recorder in db with the following type date format: 2005-05-31. How do I select the ones that are of this month?

View Replies !
Using Events In Calendar
In an array I have the events stored wich come from a database, now I want to display them in the calendar (with a different color). The Array contains ca_title, ca_startdate & ca_enddate. Code:

View Replies !
Month Events
I have registers in a mysql DB and I want to show them for months. I think I have a var like this:

$id = "month(now())";
$sql = "select * from agenda_geral where agenda='desporto' and month = ".$id." and area_ID = 1 order by day" ;

View Replies !
Wordpress Calendar Of Events
I want to make a "calendar of events" in a side bar of a blog.
When the mouse hover on it, it will show the users the events of that
days in a pop up window.

"The pop up window" may contains links to other sites, so it should be
wait certain time to let the user click the link....

View Replies !
How To Catch System Events
I have a site from which people can download files. If they cancel the downloading in-between then my page hangs. Does anyone know how to catch system events like "Cancel" in PHP ?

View Replies !
Events Application In PHP Or Perl
I am looking for an events registration/calendar application (open source or otherwise) written in PHP or Perl.

It would need some (or all) of the following capabilities:
1-Allow admins to create/edit/delete events including:

a) Max number of attendess
b) Event registration fees

2-Allow admins to run reports per event on the number of attendees, who has paid ,etc

3-Allow event attendees to register and pay for the event(s) via the web (Paypal).

I would prefer there be different levels of administration privileges, like full admin, reporting only, and per-event administrators.

The most important features are the ability to pay via the website via PayPal and the admin capabilities.

View Replies !
Export Events To Outlook
Do anybody know how to export events to Outlook from a php script? I'm
making a list of events, and my idea is that when the user clicks on
the event it will be exported to his or hers Outlook-calendar. I don't
want to force the users to install any software (like a RSS-reader).

View Replies !
Displaying Events In A Calendar
I have a calendar that I would like to display some events on. The events are stored in a database but I do not think I am getting the information in the right place and displaying like it should be. I cannot seem to get an event to display on the exact date that it should be displayed on. I can get one event for a whole week but that, of course, is not right. Code:

View Replies !
Calendar Highlight Events
I have the attached code but I would like to modify it slightly so if any events occur on each day, they are hightlighted. Could I create the query as a function? Code:

View Replies !
Users Submitting Events
'm looking for a way for site visitors to be able to submit details of events and have them show up on an events page. is there any sort of php application or something that i could use or is it not going to be that simple?

View Replies !
Displaying Events In The Next 7 Days
In my current project I have made a simple calendar (actually a list of events that are stored in a db) and now I'd like to add a smaller list to my sidebar which displays only the events that occur in the next 7 days. So basicly, I want to write a query which returns only the events in the next 7 days (not including this day).

View Replies !
Showing Events By Date
I'm using "select * from calendar where datum >= current_date ORDER BY datum ASC"
in my code to show every event listed in my database where the date = or is greater than today's date. I have a field (datum) in my table, with the type date (2006-02-23).
The browser is showing this great in Europe, but in the US he is not showing the event of today. Does anybody know why he is not showing events from the current date in the US, and how I can solve this ?

View Replies !
Events Calendar Script
Does anybody know of a simple easily customisable events calendar script. Preferably something without lots of complicated calendar view stuff.


View Replies !
To Display The Events In Calender
I have designed a event calender in which i have to display an anchor for the dates on which events are added. the calender is getting displayed but the event dates are not getting displayed within the calender.

View Replies !
Delete Past Events
There was a post similar to this one but I can't find it right now. All this is to do is get rid of past concerts if it is before today. I do have DELETE privelege for the user

$today = date("Y-m-d");

// Delete past events
$sql = "DELETE FROM tbl_events WHERE eventDate < '$today')";
$query = mysql_query($sql);

no clue why it doesnt work

View Replies !
Events Calendar Software
I want to use an events calendar module for my project please suggest me , i want to display calendar on the front screen and when i click on the date i should able to add/edit and delete events for my application. Please suggest me open source



View Replies !
Trigger Events Without Crontab
I am trying to create a turn-based Web-based MMO. The hosting I currently have does not allow for the use of a Crontab, and so my question is: Is there any way to trigger events hourly, daily, monthly etc. without a Crontab.

View Replies !
My Script Pulls All Events
The goal is to have the $id, which is set already, get saved into the $dep_id field in a different table.. I think it's a problem in matching variables, but I am not positive. As it is right this moment, the script displays all events with all IDs, not just where $id=$dep_id... Code:

View Replies !
Events For The Rest Of Year
If I have a site where a person can add an event. I want them to be able to add an event and click a button which would add the event for the rest of the year on that day of the week or that date monthly.

So if they enter a date that an event starts for like 02/14/2006 I would like to automatically add entries in the database for 02/21/2006 02/28/2006 etc for weekly and 03/14/2006 and 04/14/2006 for monthly etc.

Any idea how to go about doing this, I would just add the take the 14 and add 7 but when the month was over and I had to go into March how would I go about doing that?

View Replies !

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