Archive for September, 2008

file /etc/avahi/avahi-autoipd.action from install of avahi-autoipd-0.6.22-10.fc9.i386 conflicts with file from package avahi-0.6.17-1.fc7.i386

In : system, Posted by admin on Sep.09, 2008

Today, try to do a “yum update”.

It complains about:

Transaction Check Error:
file /etc/avahi/avahi-autoipd.action from install of avahi-autoipd-0.6.22-10.f
c9.i386 conflicts with file from package avahi-0.6.17-1.fc7.i386
file /usr/sbin/avahi-autoipd from install of avahi-autoipd-0.6.22-10.fc9.i386
conflicts with file from package avahi-0.6.17-1.fc7.i386
file /usr/share/man/man8/avahi-autoipd.8.gz from install of avahi-autoipd-0.6.
22-10.fc9.i386 conflicts with file from package avahi-0.6.17-1.fc7.i386

To fix it, do the following:

su
rpm -e –noscripts avahi-0.6.17-1.fc7.i386
yum update

Tags :


_default_ VirtualHost overlap on port 80, the first has precedence

In : system, Posted by admin on Sep.09, 2008

Try to set up apache server with virtual hosts. When I restart the apache server, it keeps saying that:

_default_ VirtualHost overlap on port 80, the first has precedence

The problem is that the NameVirutalHost is commented. Make sure your NameVirtualHost line in httpd.conf is uncommented as:

NameVirtualHost *:80

Tags :


setting the user agent in php curl

In : PHP, Posted by admin on Sep.09, 2008

I am trying to write a spider to scraoe Google result. Google returns different content for differnet user agent. Here is how to setup the user agent in curl.

$url=’http://www.google.com/search?hl=en&q=’.$keyword.’&start=10′;
$ch = curl_init($url);
$useragent=”Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1″;
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);

Tags : ,