I am also having this problem. I have spent a number of days now trying to figure out a solution for updating the FreePBX modules from behind a proxy. Setting the proxy in /etc/profile allows yum and wget to work fine but nothing I have been able to find in the forums or elsewhere online seems to address the FreePBX module update. I understand that this is using PHP fopen and I have gone through and attempted every proposed solution from http://www.freepbx.org/v2/ticket/2727. These solutions were posted 3 years ago for version 2.5 so I haven’t had much luck with the patch (which causes the updates to use wget rather than fopen).
This has been a little discouraging. We are in a corporate network environment and must pass through a proxy to reach outside.
Any help with this would be most welcome. Thank you!
Still no luck. I have gone so far as to track down the specific code that the proposed patch from #2727 modifies for release 2.5 and made the changes. The update still fails with “Warning: Cannot connect to online repository (mirror.freepbx.org). Online modules are not available.”
The http_proxy and ftp_proxy environment variables have been set. yum and wget work fine.
After a week of banging my head on this thing i’ve finally found my problem. I had set my environment variables but I was starting Apache using the httpd service which was ignoring the environment variables for the proxy. Now that I am starting it using apachectl it works.
Set your environment variables in /etc/profile:
In my case I just added my environment variables straight into the httpd startup script in /etc/init.d/httpd. Now I can just use the httpd service.
Also, FreePBX will change this automatically and give you a message about it under Notices on the System Status page but under Tools/Advanced Settings it may want the option ‘Use wget For Module Admin’ to be changed to True.