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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:45:46+00:00 2026-05-23T14:45:46+00:00

Iam thinking changing the log file into database table. I execute multiple shell_exec and

  • 0

Iam thinking changing the log file into database table.

I execute multiple shell_exec and it run in the background, example:

<?php
 shell_exec("php process.php > /dev/null 2>&1 &");
 shell_exec("php process.php > /dev/null 2>&1 &");
 shell_exec("php process.php > /dev/null 2>&1 &");
 shell_exec("php process.php > /dev/null 2>&1 &");
?>

While process.php is running/looping – it will generate a log, assume process ID is 123

log_123.txt File:

-----------------------------------------
Process ID: 123
- Loggin In
- Logged OK
- Checking xxxx (xxxxx)
- Sending Info
- Received xxxx 25252525
- Completed
------------------------------------------
Process ID: 123
- Loggin In
- Logged OK
- Checking xxxx (xxxxx)
- Sending Info
- Received xxxx 23424
- Completed
------------------------------------------
Process ID: 123
- Loggin In
- Logged OK
- Checking xxxx (xxxxx)
- FAIL
------------------------------------------

(Each process have a log file)

Now I wanted to change text files logging into database table log, what is the best way to do this?

I came up with this solution:

CREATE TABLE IF NOT EXISTS `log` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT,
  `process_id` int(11) NOT NULL,
  `process_date` datetime NOT NULL,
  `log_output` varchar(200) NOT NULL,
  `log_time` datetime NOT NULL,
  PRIMARY KEY (`log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  • 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-23T14:45:46+00:00Added an answer on May 23, 2026 at 2:45 pm

    You have the table, you have the file. It sounds like you just need to modify the process.php file to update your database instead of the test file.

    If you are using mysql http://php.net/manual/en/book.mysqli.php is a good place to start.

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

Sidebar

Related Questions

I am thinking of changing my web site's homegrown search engine. Before I break
I am thinking about providing a version of say, the database schema and the
I am thinking of using a PHP framework called CodeIgniter . One of the
I am thinking along the lines of replicating a web hosts PHP setup environment
I am thinking on deploying multiple (and different) web applications on the same server
I want to generate tooltip based on a dynamically changing background image in css.
I am thinking about a DB Design Problem. For example, I am designing this
Preface: I was thinking the other day about a new database structure for a
I am thinking about the design of an iPhone app I'd like to create.
I am thinking about making a website with some fairly intense JavaScript/canvas usage 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.