View Full Version : php script can't connect
tera7
29th April 2007, 04:36
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.
falko
30th April 2007, 15:18
What's the output of ifconfig and ping -c2 google.com? What's in your /etc/resolv.conf?
tera7
30th April 2007, 21:04
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.
/etc/resolv.conf its empty.
That's the problem. Put this into it:
nameserver 145.253.2.75
nameserver 193.174.32.18
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
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.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.