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 3305328
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:09:21+00:00 2026-05-17T21:09:21+00:00

I have a php app that calls a class called Client. Every so often

  • 0

I have a php app that calls a class called Client. Every so often I get a sort of time out error. I thought it was SQL at first but it turns its pointing to the class itself.

Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ClientPortal\classes\Connections.php on line 3

<?php
    session_start();
    class Connections { //line 3

Does anyone know what’s going on here?

thanks,

Billy

  • 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-17T21:09:22+00:00Added an answer on May 17, 2026 at 9:09 pm

    PHP scripts have a maximum time they’re allowed to execute for, as declared in the php.ini.

    You can circumvent this if you really want by adding the following line:

    ini_set('max_execution_time', 123456);
    

    where 123456 is the number of seconds you want the limit to be.

    You can also use the set_time_limit function, which I only just found out about and assume does the same thing. I’ve always just done the former though.

    You can change it in the php.ini file, but you might be using your script to do a batch operation or something. You wouldn’t want a PHP script that is being accessed by an end user to sit there hanging for 30 seconds or more though, so you’re better off leaving it at the default or even turning it down in the php.ini file, and setting the max_execution_time on an as-needed basis.

    As seengee points out in the comment below, you can set the max_execution_time to 0 to stop the error from ever happening, but seengee is right to say that at least for a web request, you really shouldn’t do this. For the php command line interpreter, this behaviour is the default though.

    If you’re seeing this problem for things that are supposed to be used by end-users through a web request, you might have to do some profiling to work out the real cause. If you’re doing MySQL queries, start by turning on the slow query log. It’s particularly good at letting you know when you’ve forgotten an index, or if you’re doing something else inefficient.

    You can also shove a few $s = microtime(true); yourstuff(); var_dump(microtime(true)-$s); things around to get a vague overview of which bits are slowing things down, just make sure you don’t leave any of them in afterwards!

    If you’re still struggling to find the root cause, set xdebug up on your local machine and run the profiler. The extension is available as a precompiled windows binary (although there seems to be a confusing array of versions). You can inspect the results of running the profiler using wincachegrind.

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

Sidebar

Related Questions

In my (PHP) web app, I have a part of my site that keeps
I have an app that display's the current time when a page opens. I
I have a LAMP (PHP) web app which need to interface with programs on
I'm using the data mapper pattern in a PHP app I'm developing and have
I have a .ini file with sensitive information in my php wab app. I
I have an app using PHP and the PayPal API. The basic way it
I have written a web app in PHP which makes use of Ajax requests
I have a winForms NET3.5SP1 app, and want to POST data to a PHP
I'm writing server-side programs in PHP for an iPhone app. And I have no
I have PHP configured so that magic quotes are on and register globals are

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.