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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:40:09+00:00 2026-05-25T13:40:09+00:00

I have an upload script that uploads images to a server. I need a

  • 0

I have an upload script that uploads images to a server. I need a script to run in the background after the image is uploaded and moved by move_uploaded_file(), but I need to send a filename and path to that file to the script (pretty much send some data).

How can I run a PHP script in the background after some data has been sent to it?

Notes: The files are uploaded via XMLHttpRequest.

  • 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-25T13:40:10+00:00Added an answer on May 25, 2026 at 1:40 pm

    First read this

    php exec command (or similar) to not wait for result

    It is basically pointing out that you need to create a script that takes two params (
    filename, path)

    Then you need to use the exec function

    Edit:

    As pointed out by Brent Baisle in the comments below, "nohup" must be added infront of the script to execute independently (with a different parent pid)

    exec('noup php scriptyoucreated.php '.$filename.' '.$path.' > /dev/null 2>&1 &');
    

    This writes the output to dev/null, php should not block at this point, i have not tried, but in theory.

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

Sidebar

Related Questions

I have a PHP script that processes file uploads. The script tries to organise
I have a form that excepts a file upload in ASP.NET. I need to
I have a bash script to upload some files to my webserver. The problem
I have a file upload form that is being posted back to a servlet
I have a scenario where I need to upload a file from one web
I have a .NET program to upload an image to a webserver. I am
We have a webapp where people can upload various image file types and on
I have implemented a simple file upload-download mechanism. When a user clicks a file
I have a website where people can upload documents, and view them later at
I have an application where users can upload video files of any size, and

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.