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

  • SEARCH
  • Home
  • 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 8892231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:56:50+00:00 2026-06-14T22:56:50+00:00

I have a php file let’s say A.php that gets some variables by $_POST

  • 0

I have a php file let’s say A.php that gets some variables by $_POST method and updates a local database.

Another php file with the name dataGather.php gathers the data in the correct form and after that it tries to send the data to the local database by using the A.php file. Note that both files are in the same directory.

The code where I use the curl functions to do the POST request is the following:

    $url = "A.php";
    $ch = curl_init();
    $curlConfig = array(
        CURLOPT_URL            => $url,
        CURLOPT_POST           => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POSTFIELDS     => $datatopost
    );
    curl_setopt_array($ch, $curlConfig);
    $result = curl_exec($ch);
    curl_close($ch);
    echo $result;

$datatopost

is an array like the following:

$datatopost = array (
       "value1" => $val1,
       "value2" => $val2,
        etc
 }

The problem is that when I run my program I get the following result:

Fatal error: Maximum execution time of 30 seconds exceeded in 
        C:\xampp\htdocs\dataGather.php on line 97

does anyone know why this is happening? Thanks in advance

PS: The file A.php is 100% correct because I have tested it by gathering the information needed with javascript. It informs the database the way I want. Also the array $datatopost has all the information in the correct form.

  • 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-06-14T22:56:52+00:00Added an answer on June 14, 2026 at 10:56 pm

    I suspect you directly run your php script without using a web server but by simply starting the script as executable. This is suggested by the fact that you have an absolute path in your error message. Whilst it is absolutely fine to run a php script like that you have to ask yourself: what does that cURL call actually make? It does not open and run the php file A.php you tried to reference. Why not? Because cURL opens URLs, not files. And without using a server that can react to url requests (ike a http server), what do you expect to happen?

    The error you get is a timeout, since cURL tries to contact a http server. Since you did not specify a valid URL it most likely falls back to ‘localhost’. but there is not server listening there…

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

Sidebar

Related Questions

I have a php file which has some variables like $name1, $name2... How can
Let's say I have a php file, test.php with 2 functions: test1() and test2().
Let's say I have a PHP file disguised as an image. Anyways, I want
let's say I have index.php . It has a form that POSTS to signup.php
Let's say I have a php page that dynamically loads the return of a
Let's say I have a class file called smallBox.php: <?php class SmallBox { public
I have a PHP file that contains a large array (about 90KB). I'm considering
I have a php file which checks for login and password from users database,
Ok, so I have let's say this page http://mypage.com/index.php?id=something . I want to have
I have a php file and a bunch of HTML elements that include: header

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.