When a PHP page fails, the cause may be a PHP configuration limit or a hosting-level process restriction. memory_limit controls memory use, max_execution_time controls how long a PHP script may run, and process limits control whether a request can get or keep the server capacity it needs.
The visible symptom helps separate these cases. A fatal error usually points to memory exhaustion. A request that stops after running for a period points to execution time. An admin page or import that remains stuck can point to PHP worker availability or another request-level restriction.
Table of Contents
What each limit controls
| Setting or restriction | What it controls | Typical failure pattern |
|---|---|---|
memory_limit | The amount of memory available to a PHP script. | A fatal error while PHP is processing a page, upload, image task, or other operation. |
max_execution_time | How long a PHP script may run before the server stops it. | A page, import, or background task stops because the script takes too long. |
max_input_vars | A PHP input limit associated with the variables sent with a request. | An admin form or configuration update does not retain all submitted fields. |
| PHP worker availability | Whether a PHP request can be handled by an available server process. | Requests remain pending or appear stuck, especially when several PHP tasks run at the same time. |
| Request limits | Restrictions applied to an individual web request or to the way that request is processed. | A request is rejected, interrupted, or cannot complete even when the PHP script itself is not using too much memory. |
How to identify a memory limit problem
memory_limit sets the memory ceiling for a PHP script. PHP uses memory while it loads the application, builds a page, processes an image, or handles an import. If the script reaches that ceiling, it can end with a fatal error instead of completing the request.
This limit is a likely focus when the error appears during a memory-heavy task and the message refers to memory exhaustion. It is less likely to be the main cause when the request simply runs for a long time and then stops without a memory-related error.
PHP parameters such as memory usage, file upload size, and script execution time can be adjusted in mybox through the .htaccess file in the website’s main directory. See how to change PHP parameters and limits before editing the file.
How to identify an execution time problem
max_execution_time is the time limit for one PHP script. In mybox, it works like a stopwatch: if a script such as an image processor or data importer takes too long, the server stops it to prevent the script from continuing indefinitely. The result is commonly a timeout or an operation that stops partway through.
Focus on max_execution_time when the task progresses for a while, then ends before it finishes. Increasing memory will not solve a script that has enough memory but needs more time. The setting should be changed only when the task is expected to run longer and the current limit is the reason it stops.
Execution time is separate from upload size and memory use. A large upload can require more memory or a larger upload limit, while a slow import can require more execution time. These are different limits and should be checked separately.
How max_input_vars affects admin forms
max_input_vars concerns the variables included in a PHP request. It becomes relevant when an admin form contains many fields or repeated settings. A form may appear to submit, while fields beyond the accepted input range are not processed or saved.
This pattern is different from a memory fatal error and different from a script timeout. If only part of a large form is retained, inspect max_input_vars before changing memory_limit or max_execution_time.
When the problem is a process or request restriction
PHP configuration limits apply to the work performed by a script. PHP worker availability is different: it concerns whether a request can be served by an available PHP process. When requests stay pending or several tasks become stuck, the issue may be process availability rather than the memory or execution limit of one script.
Request limits are also separate from the script’s memory and runtime settings. A request can fail because of a request-level restriction even when the PHP code has not reached memory_limit or max_execution_time. This distinction matters for imports and admin tasks that stop before producing a PHP error.
Do not treat a stuck request as proof that a PHP value should be increased. First separate a script failure from a process-availability problem. PHP settings can be adjusted through .htaccess as described by mybox, while process availability is a hosting-level concern rather than a PHP value shown by that file.
Check the active PHP values before changing them
The value in a configuration file may not be the value active for the website. A phpinfo() report shows the PHP settings currently used by the site, including memory limits, execution time, loaded modules, and other configuration values. Use phpinfo() to check the current PHP parameters.
- Check the active
memory_limitwhen the failure is a memory-related fatal error. - Check
max_execution_timewhen a script stops after running for too long. - Check
max_input_varswhen a large form saves only some of its fields. - Consider worker availability or request restrictions when requests remain stuck or fail without a matching PHP limit error.
- Change only the setting that matches the observed failure, then test the same page or task again.
Which changes are safe to make?
The safest change is a targeted change based on the failure symptom and the active value shown by phpinfo(). Avoid increasing several limits at once, because that removes the distinction between the possible causes.
Use .htaccess for PHP parameters that mybox allows you to adjust there. Memory usage, upload size, and script execution time are examples of parameters described in the mybox instructions. Make one change, repeat the failed task, and compare the result.
If the request remains stuck, changing a PHP value may not address the cause. That symptom should be separated from a clear memory fatal error or an execution timeout and treated as a possible process or request restriction.
Quick diagnosis
- Fatal memory error: check
memory_limit. - Script stops after taking too long: check
max_execution_time. - Only part of a large form is saved: check
max_input_vars. - Requests remain pending or several tasks are stuck: consider PHP worker availability or a request-level restriction.