Page 1 of 1

Migrating php based website not having correct paths in code

Posted: Wed Sep 02, 2009 5:37 am
by dragos
I have a working PHP installation on Linux and I want to migrate a site consisting only from php, html, js files,
so I copied those files using ftp (I don't have ssh on the box from where I copied the files) and when I placed
them in my installation the site appears to have broken paths.

All the images are not being shown like

In browser when I right click on the not displayed file I get this path:

Code: Select all

 
http://site.com/img/header.gif
 
But this is the actual code ni the source php
root@site:/var/www# grep -R "header.gif" /var/www/
/var/www/web/themes/1/oudenniel.html:<td width="690" height="9" bgcolor="#C4C183" height="9"><CENTER><IMG SRC="img/header.gif" width="650" height="9" alt="Address here"></CENTER></td>
/var/www/web/lib/themelib.php:$header = eregi_replace ("---ECO_header---", "img/header.gif", $header); }
 
I could fix this by replacing

Code: Select all

 
<IMG SRC="img/header.gif"
 
with

Code: Select all

 
<IMG SRC="/var/www/img/header.gif"
 
But this is not a solution since there are many picture files.

What do I miss ?