TurnKey Linux Virtual Appliance Library

LAMP: fsockopen and/or networking issue

Hi Everyone, happily just joined the forum. I'm using lamp stack v2009.10, on a virtualbox on windows xp. I'm having a problem where 2 of my php scripts (phpbb and an rss parser) are telling me that 'fsockopen' isn't enabled.

I checked in the php.ini (ets/php5/apache2/)...

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = on

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = on

; Define the anonymous ftp password (your email address)
;from="john@doe.com"

; Define the User-Agent string
; user_agent="PHP"

I also noticed that webmin is unable to update:

Failed to upgrade from www.webmin.com : Failed to lookup IP address for www.webmin.com

My first thought is that my problems may be network related in terms of 'outgoing' requests, but one of my websites has some java widgets that are able to connect with the outside world and gather thier information. 

My network settings are as follows:

Host PC (XP) 192.168.1.2
Virtualbox (LAMP) 192.168.1.15

Virtualbox configured as a bridged network adaptor. My Lamp is setup as static (eth0):
IP Adress: 192.168.1.15
Netmask: 255.255.255.0
Default Gateway: 192.168.1.254 (router)
Name Server: Blank

Nat pinholes I have open in relation to the LAMP server:
12322, 22, 443, 80, 12321, 12320
also ip passthrough setup for 192.168.1.15
 

I noticed in webmin, under 'networking>network configuration..there were some 'lo' settings for 127.0.0.1..not really sure of what loopback does or if has any relation...

If there's any information I can supply, please let me know, and appreciate if anyone has some idea. Thanks

Jeremy's picture

DNS resolution working?

From the info above ("Failed to lookup IP address for www.webmin.com"), my first thought is to check your DNS server. Inside your appliance (either SHH in using PuTTY or another SSH client, WebShell or in the VirtualBox window for your appliance - you'll need to exit the config console first though) try pinging something such as google.

ping www.google.com

also it may be useful to post the response to

ifconfig

ifconfig result

Hi JedMeister,

Thanks for reply..I cannot ping anything outside of my local network..ping to google comesback 'unknown host'...here is an image of the ifconfig (sorry, I couldn't figure a way to cut and paste it)

Jeremy's picture

I see now!

Not sure how I missed it before! The answer is in your initial post - you have left your nameserver blank! This means your appliance can't get any DNS resolution. A quick test to confirm this: (although I'm sure this is your problem)

ping 208.67.219.230

This IP is a Google server so if that works but www.google.com won't I'd put a substantial amount of money on your lack of nameserver being the problem. (and I'm not usually a gambling man!)

To solve it use the Config Console to add your router address as nameserver as well (most routers provide DNS passthrough to your ISP DNS). Alternatively use your ISP DNS address direct or any other public DNS (such as OpenDNS or Google DNS). This is assuming you don't have a DNS server onsite - obviously if you do try that first.

I see now!... I'm not !!

I facing the same issue. Could you be more specific regarding "To solve it use the Config Console to add your router address as nameserver as well (most routers provide DNS passthrough to your ISP DNS)."

Can you tell us were to look and act. Thanks,

ALL SYSTEMS GO!

Thanks JedMeister, all issues resolved. Funny, I think Windows got me into the habit of not entering the nameservers. Appreciate it, again thanks.

I see now!... I'm not !! Version 2

Are you saying that in Chris' example the good configuration should be : IP Adress: 192.168.1.15 Netmask: 255.255.255.0 Default Gateway: 192.168.1.254 (router) Name Server: 192.168.1.254 (router) Name Server: 8.8.8.8 (google) Thanks,

I see now!... I'm not !! Version 2.... solved

Don't no if this can help but it worked for me ....

In Chris' example the good configuration should be :

IP Adress: 192.168.1.15

Netmask: 255.255.255.0

Default Gateway: 192.168.1.254 (router)

Name Server: 192.168.1.254 (router)

 

Disable Firewal and re-enable firewall on host (main machine) (probably to clean: purge stuff)... and voila it worked.

Thanks,

Jeremy's picture

Glad you got it sorted

Sorry if I wasn't clear enough above. Looks like you've got it all sorted though!

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)