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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:15:56+00:00 2026-06-06T01:15:56+00:00

In addition to my previous question , another problem appeared and I decided to

  • 0

In addition to my previous question, another problem appeared and I decided to make a new question for it:

I am currently calling a php script that than runs a bash script. The php script looks like:

chdir('/home/');
$output = shell_exec('./do.sh');
echo "<pre>$output</pre>";

The do.sh contains:

#! /bin/bash

echo 12;
dd if=/dev/urandom of=test.test bs=1048576 count=2

The problem is following:

When I call ./do.sh from the terminal everything works fine: test.test is created and the ouput is 12

However, when I call it from my php file, the output is 12 aswell, but no file is being created. Since I know almost nothing about bash scripting, I have no idea why this is happening…

  • 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-06T01:15:57+00:00Added an answer on June 6, 2026 at 1:15 am

    Check if PHP safe_mode is enabled. You have to turn it off in your /etc/php.ini file, and obviously check filesystem permissions.

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

Sidebar

Related Questions

In my previous question , Andrew Jaffe writes : In addition to all of
Objective Initialize a new addition problem for users to solve when they visit /task
It's an addition for previous my question about adding columns into jqGrid-based table. Here
Previous question which links onto this and has any addition code ref should I
this is a small addition to the previous script, and this time I would
Is addition(+) operation more complex than comparison operation (>), both in integer as well
In addition to this question: iPhone network performance , I would like to know
Previous question linky: MySQL Left Joins Very kindly we got the following code working:
I have a SQL query that I'm currently solving by doing two queries. I
This question is almost the same as a previous question , but differs enough

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.