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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:14:15+00:00 2026-06-03T03:14:15+00:00

Ok, I have two Linux boxes running behind a proxy server. Both boxes are

  • 0

Ok, I have two Linux boxes running behind a proxy server. Both boxes are set to bypass the filtering by connecting on port 801.

Box A – Fedora Core 12 / PHP 5.3.1

Box B – RHEL 6 / PHP 5.3.3

On Box A I am able to use file_get_contents() to conenct to an external site.

<?php
$opts = array(
              'http' => array(
                              'proxy' => 'tcp://10.136.132.1:801',
                              'request_fulluri' => true
                             )
             );

$cxContext = stream_context_set_default($opts);
echo file_get_contents("http://www.google.com");

This results in Google’s homepage being displayed.

On Box B I run the same code, but get this error:

Warning: file_get_contents(http://www.google.com): failed to open stream: Permission denied

Both boxes are on the same network and behind the same proxy server. Is there a setting I am missing in Apache or PHP that will allow file_get_contents to work on Box B?

  • 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-03T03:14:16+00:00Added an answer on June 3, 2026 at 3:14 am

    It sounds like you have SELinux enabled, it blocks any outgoing connections by Apache by default. Try running this in your shell as root:

    setsebool -P httpd_can_network_connect on
    

    More info on SELinux booleans can be found here:
    http://wiki.centos.org/TipsAndTricks/SelinuxBooleans

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

Sidebar

Related Questions

I have two linux boxes. Both Fedora 11 x64. On one, I downloaded the
I have two ubuntu linux boxes: I'm in bash on one machine running some
I have two different versions of linux/unix each running cfengine3. Is it possible to
I have two systems: HQ on Linux and Active MQ on windows Both systems
I have two programs running simultaneously ( in linux ) , with one running
I currently have two separate instances of JBoss installed on a Linux server -
I have two Linux/MySQL servers located in the UK, current system timezone on both
I have two machines I work on: Windows Client (Development Machine) Linux Web Server
I have two Linux Machine,1st is machine X ,other is machine Y i want
I have two classes generated by LINQ2SQL both from the same table so they

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.