Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 967491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:19:32+00:00 2026-05-16T02:19:32+00:00

I have php scripts that call perl scripts to do various things and sometimes

  • 0

I have php scripts that call perl scripts to do various things and sometimes I get it where it just goes on and on without getting a response back, this is based on the variable that is being passed to the perl script and I am doing a lot of different ones in succession so I can’t get really debug it directly since I don’t have a response from perl…

I would really like to just be able to set a php function or block of code to timeout after a certain number of seconds.. I have been searching on this but haven’t found anything yet on how to do this,

I was thinking something like this could work but I don’t think it would dynamically update the $time variable, but maybe there is a way to get this to work? Any advice is appreciated

$time = time();
$timeout = $time + 5; //just as an example

do {

// do stuff
} while ($time < $timeout)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:19:33+00:00Added an answer on May 16, 2026 at 2:19 am

    Your best bet would be to use proc_open, sleep for your timeout amount and then call proc_terminate if the process still hasn’t completed.

    See https://www.php.net/manual/en/book.exec.php for details on the proc_* family.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 513k
  • Answers 513k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer For something like this, you should probably just use Regular… May 16, 2026 at 5:50 pm
  • Editorial Team
    Editorial Team added an answer An object-oriented database, like db4o, would be considered one of… May 16, 2026 at 5:50 pm
  • Editorial Team
    Editorial Team added an answer Never blame a function that belongs to the C library.… May 16, 2026 at 5:50 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I got in every php project (around 25!), some sh scripts that help me
I have a number of jQuery scripts that select elements within the area that
I have a website built across a series of pages and scripts, and I'm
I am just trying to test a simple ajax call on my server using
How does Flash communicate with services / scripts on servers via AMF ? Regarding
Is that possible? I'm writing a web-admin interface for a network-system. I need to
The Disclaimer First of all, I know this question (or close variations) have been
I use NearlyFreeSpeech.Net as my host, and my php app (coded in CodeIgniter) needs
I'm searching on how to do this but my searches aren't turning up things
I'm working on an intranet with several subdomains. I have control over each subdomain,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.