I have a few things for you to try, first, instead of using a relative path (../) use an absolute path "/data/images/night.jpg" Assuming /var/www/ is your web root directory, this should work. The other thing to check is the file permissions (make sure it's +r). If you uploaded it via ftp, there is a chance that it's not readable.
Again, is your data in "/var/www/cgi-bin/data/texts/" ? Or is this data the same /var/www/data directory? If so, you need to change your paths.
If something is working on the machine you develop on (windows or linux) and it doesn't work when you upload it, the first things to check are your paths and your permissions.