php script can't connect

Discussion in 'Server Operation' started by tera7, Apr 29, 2007.

  1. tera7

    tera7 New Member

    Hello this is my first post.i realy find your site very good and i am glad that i share my problem with you.
    i have a php script that connects to 2 sites and takes information from these.
    i had my site to shared hosting and worked fine and at my pc works fine.
    but now i had to rent my own server and i am having problems.
    php and apache works fine but the php scripts behave like their is no internet connection.
    i think that php.ini and http.conf is ok.i disabled selinux iptables just incase.
    but nothing the same error.another thing is that yum never connects alway error name resolution for a month now but ok i dont care about yum.
    sorry for my bad english i am greek so ...
    if somebody has an idea about that?
    oh my os fedora 6 becau se i like the name.
     
    Last edited: Apr 29, 2007
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ifconfig
    and
    Code:
    ping -c2 google.com
    ? What's in your /etc/resolv.conf?
     
  3. tera7

    tera7 New Member

    if config:

    eth0 Link encap:Ethernet HWaddr 00:15:C5:F5:10:A5
    inet addr:85.17.154.86 Bcast:85.17.154.255 Mask:255.255.255.0
    inet6 addr: fe80::215:c5ff:fef5:10a5/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:2457014 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1175668 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:2515114913 (2.3 GiB) TX bytes:147301206 (140.4 MiB)
    Interrupt:16

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:50096 errors:0 dropped:0 overruns:0 frame:0
    TX packets:50096 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:4279695 (4.0 MiB) TX bytes:4279695 (4.0 MiB)
    ping:
    ping: unknown host google.com

    but i can ping with ip



    ping -c2 72.14.207.99
    PING 72.14.207.99 (72.14.207.99) 56(84) bytes of data.
    64 bytes from 72.14.207.99: icmp_seq=1 ttl=245 time=92.5 ms
    64 bytes from 72.14.207.99: icmp_seq=2 ttl=245 time=92.1 ms

    --- 72.14.207.99 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1000ms
    rtt min/avg/max/mdev = 92.131/92.322/92.513/0.191 ms


    /etc/resolv.conf its empty.


    i am realy new at linux maybe its something simple.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    That's the problem. Put this into it:
    Code:
    nameserver 145.253.2.75
    nameserver 193.174.32.18
     
  5. tera7

    tera7 New Member

    excuse if i am wrong but i thought i must enter my domain and the nameservers of it.
    i tried both.i entered my domain and the nameservers nothing i entered the nameservers you told me still nothing i can't ping domain only ip.

    update
    ok now i can ping with domain but the script doesn't work
     
    Last edited: May 1, 2007
  6. tera7

    tera7 New Member

    solved

    ok solved it was selinux probably because i set disabled but i guess i didnt reboot my server when i rebooted all worked fine thanks anyway because resolv.conf its something that i didnt know it.
     

Share This Page