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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:15:05+00:00 2026-06-10T08:15:05+00:00

I have a webpage on a linux NAS, with webserver and php running. I

  • 0

I have a webpage on a linux NAS, with webserver and php running.
I want to start a script from de server, to write data to a database.

When i am on the new69.php (the website in question)
I have the
for example :

$uptime = exec('uptime');echo $uptime;
(and this works)

So i have a connection.

Then i do with a if statement:

if (isset($_POST['verzenden'])) {
 $output1 = exec('whoami');
 exec('/share/MD0_DATA/Qweb/sqlite/AllesNaardDB.sh');
 } else {

    echo "Nog lekker niets gedaan.";

Whoami in the is statememt gives the username “httpdusr”,
So the if statement gets reached and works.

Now the exec statement when i do:

It has to execute the AllesNaardDB.sh
which contains:

cd /share/MD0_DATA/Qweb/sqlite
echo "Wasmachine"
python2.6 wasm_util_sql.py [param]
echo "alles gegeven"
exit 0

Nothing is shown or done.

But when i do:

$output = exec('/share/MD0_DATA/Qweb/AllesNaardDB.sh');
echo "<pre> $output </pre>";

I get the als line of the script in the variable $output,
“alles gegeven”.

At first i tought that it could be something to do with the rights.
So i (switched user with) su to “httpdusr” and script in putty gets executed fine.

I also made another script ff.sh with “ls -l” to execute and everything works.
Also i treid
passthru(),
system(),
shell_exec.
The only improvements are that with system() and passthru(), the “echo “Wasmachine””
appeared on te website.

I don’t get why the python jobs don’t get started ?

I worked a little further, but could it be that there are some sqlite3 command which are user dependent ?

Like that i could execute some write action to the database as admin, but not as the httpdusr ?

  • 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-10T08:15:08+00:00Added an answer on June 10, 2026 at 8:15 am

    It is a prblem with a path in the python script, which is writing to the database.
    It uses a different path when it is started from the webpage (MD0_DATA/Qweb/) then wen it is started from the shell script (MD0_DATA/Qweb/sqlite)

    *i dit not solvend the problem yet, but understand it.
    Everybody thanks for the effort.

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

Sidebar

Related Questions

I have a webpage that retrieves data (via ajax/php) and shows it in an
I have to migrate a web server from Windows + IIS to Linux +
I have a webpage that redirects to another webpage like this: http://www.myOtherServer.com/Sponsor.php?RedirectPage=http://mylink.com/whereIwasgoingtogo.html Then the
I have a webpage that displays a very large list of data. Since this
I have a server in linux using the Berkeley_sockets and I create a TCP
I have webpage with a large height attribute which displays products. I want the
I have a C++ server in linux using Mongoose listening on port 8080 for
I have a CentOS 5.7 linux server and use php5.3.x. On a pfSense system,
I have been creating a CakePHP application on my Linux computer and running it
I need to contact a server (perhaps Apache) running on a Linux box 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.