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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:05:36+00:00 2026-06-03T07:05:36+00:00

I am working with a colleague to set up their local environment on a

  • 0

I am working with a colleague to set up their local environment on a MAC in XAMPP, on windows my vhost looks like the one below.

When I access a URL like http://domain.local/cgi-bin/handler.php the web server processes the PHP correctly but on his we get a 500 server error and this message…

The server encountered an internal error and was unable to complete your request.

Error message: 
Premature end of script headers:

We tried changing the name of the cgi-bin folder to something else as I noticed there was another alias in httpd.conf but this had no effect…so it seems to me like the issue is permissions related.

We believe the alias is setup ok as accessing http://domain.local/cgi-bin/filenothere.php which doesn’t exist throws a 404 as expected, any .html/.pl files fail to execute.

The permissions that exist on the cgi-bin folder are…

rwxrwxrwx dave staff

and is owned by the user and group….

dave staff

Vhost

<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    ServerName  www.domain.local
    ServerAlias domain.local
ServerAlias api.domain.local

    # Indexes + Directory Root.
    DirectoryIndex index.php
    DocumentRoot E:/home/www/www.domain.co.uk/htdocs/

    # CGI Directory
    ScriptAlias /cgi-bin/ E:/home/www/www.domain.co.uk/cgi-bin/
    <Location /cgi-bin>
            Options +ExecCGI
    </Location>

    # Logfiles
    ErrorLog  E:/home/www/www.domain.co.uk/logs/error.log
    CustomLog E:/home/www/www.domain.co.uk/logs/access.log combined
</VirtualHost>

Any idea what is causing this PHP file to not be executed?

UPDATE
Tried adding a header to say that the content is PHP to the start of the PHP file and this now simply outputs the PHP code.

It’s as if any path specified in as an Alias is accessible but the server doesn’t know how to execute the content, this is for HTML as well as PHP

  • 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-03T07:05:38+00:00Added an answer on June 3, 2026 at 7:05 am

    I think you need a section for your cgi-bin.

    The fact that your server can show you the script sources means the server has at least read permissions on /file/system/path/to/cgi-bin and IIRC that clashes with ScriptAlias b/c ScriptAlias expects /file/system/path/to/cgi-bin to be unaccessible for security reasons. I think your solution should look something along the lines of:

    <Directory /file/system/path/to/cgi-bin>
        Options ExecCGI
        SetHandler cgi-script
    </Directory
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are working in multisite UCM environment. In while my colleague was trying to
I'm working on a project after my ex-colleague. The code was great except for
I'm working with a colleague and we're trying to reproduce the following SQL Query
I’m working on some expression tree code written by a colleague and am looking
I am working on a Java application for my college class, and at one
I'm working with a colleague new to programming and I'm trying to explain some
I recently took over a project that a colleague was working on and I
a colleague has a small problem with a value Assignment in Access 2007. The
I'm quite a beginner when it comes to working with networks and the like,
I'm working on an image collage on a website and would like each image

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.