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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:24:05+00:00 2026-06-06T17:24:05+00:00

I followed the PHP Minify instructions listed on this page to use a sub-directory,

  • 0

I followed the PHP Minify instructions listed on this page to use a sub-directory, but it just returns a 400 bad request error at my test URL. Any ideas or leads on how to fix this?

Steps I followed

  1. Put min folder relative to my “demo-site’s” root
  2. Added code snippet below as directed on the instructions page.
  3. Ran the URL test, returns a 400 bad request error.

More Info

Server: Wamp PHP v5.3

Location on server: var/www/demo-site

URL giving a 400 error: http://localhost/demo-site/min/f=min/quick-test.js

Code placed in config.php

// Set the document root to be the path of the "site root"
$min_documentRoot = substr(__FILE__, 0, -15);

// Set $sitePrefix to the path of the site from the webserver's real docroot
list($sitePrefix) = explode('/min/index.php', $_SERVER['SCRIPT_NAME'], 2);

// Prepend $sitePrefix to the rewritten URIs in CSS files
$min_symlinks['//' . ltrim($sitePrefix, '/')] = $min_documentRoot;
  • 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-06T17:24:07+00:00Added an answer on June 6, 2026 at 5:24 pm

    In the version of Minify I’m using you have to find the following lines (shown in code sample below) with a search and replace them in config.php. Simply copying and pasting this code into config.php blows everything up. Which is unexpected since the documentation at the time of writing this pretty much says copy and paste the code snippet…

    // Search for...
    $min_documentRoot = '';
    // Replace with...
    $min_documentRoot = pathinfo(pathinfo(__FILE__, PATHINFO_DIRNAME), PATHINFO_DIRNAME);
    
    // Search for...
    $min_symlinks = array();
    // Replace with...
    list($sitePrefix) = explode('/min/index.php', $_SERVER['SCRIPT_NAME'], 2); 
    $min_symlinks['//' . ltrim($sitePrefix, '/')] = $min_documentRoot;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just followed the instructions from this page ( http://www.alexkorn.com/blog/2011/03/getting-php-mysql-running-amazon-ec2/ ) to setup apache
I followed this link to gzip my php driven website It's working fine but
I followed the instructions in this site but there's no such code inside the
I followed this instruction but not worked for me. I just wanna install and
I am trying to use PHP's built-in function get_browser() . I followed the instructions
So I followed the instructions per this link http://www.opencart.com/index.php?route=documentation/documentation&path=32_35_60 but my paypal account is
I followed this tutorial here: http://www.dannyherran.com/2011/02/facebook-php-sdk-and-codeigniter-for-basic-user-authentication/ It works great but when I enable CSRF
I followed this tutorial http://stevejenkins.com/blog/2011/08/how-to-install-apc-alternative-php-cache-on-centos-5-6/ to install apc on my centos vps hosting but
Im using a linux machine, and I followed the instructions seen on https://www.php.net/manual/en/install.php to
Followed this question about delayed_job and monit Its working on my development machine. But

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.