you are using relative paths instead of explicit ones I think. For example, if I have a script called test.pl.....located in $DOCUMENT_ROOT/cgi-bin, to access a object relative to the document root, the link would have to start with / in the link, other wise, it tries to access the link below...