LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-10-2005, 05:40 PM   #1
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
Silly squirrelmail error


I've got squirrelmail 1.4.4 up and running. It's running as a webmail interface connecting to a non linux IMAP and SMTP server so I can check my mail on the road without using their bogged down webmail. Everything works fine, except the image on the login page doesn't display. When I look at the properties I see:

So I look at the virtual host entry and see

Quote:
<VirtualHost x.x.x.x:80>
ServerAdmin webmaster@domain.com
DocumentRoot /usr/share/squirrelmail
ServerName mail.domain.com
# ErrorLog /var/los/host.some_domain.com-error.log
# CustomLog logs/host.some_domain.com-access.log common
</VirtualHost>
So I check for /usr/share/squirrelmail/images/sm_logo.png and see

Quote:
nix:/usr/share/squirrelmail/config# ls /usr/share/squirrelmail/images/
delitem.png sec_remove_es_ES.png sec_remove_pt_PT.png
down_pointer.png sec_remove_fo_FO.png sec_remove_ru_RU.png
draft.png sec_remove_fr_FR.png sec_remove_sk_SK.png
folder.png sec_remove_hr_HR.png sec_remove_sl_SI.png
inbox.png sec_remove_hu_HU.png sec_remove_sr_YU.png
index.php sec_remove_id_ID.png sec_remove_sv_SE.png
minus.png sec_remove_it_IT.png sec_remove_tr_TR.png
plus.png sec_remove_ja_JP.png sec_remove_ug.png
sec_remove_bn_IN.png sec_remove_ko_KR.png senti.png
sec_remove_da_DK.png sec_remove_lt_LT.png sm_logo.png
sec_remove_de_DE.png sec_remove_nb_NO.png sort_none.png
sec_remove_el_GR.png sec_remove_nl_NL.png up_pointer.png
sec_remove_eng.png sec_remove_nn_NO.png
So far so good I'd think, so I check the error logs and I find

Quote:
[Tue May 10 15:37:52 2005] [error] [client 216.229.107.32] File does not exist: /usr/share/images/sm_logo.png
Somehow the /squirrelmail/ subdirectory is getting lost. I'm sure it's a simple thing but I'm not seeing it. Anyone got any ideas?
 
Old 05-11-2005, 09:54 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
It's getting lost cause your using it as a virtual host and it doesn't look at the squirrelmail folder as a directory path to images..

If you go to http://www.domain.com/squirrelmail/images/sm_logo.png I betcha a $100.00 bucks it shows up..

So what do you need to do: Probably easist thing to do is either put the full path of the image in the main index page for your squirrelmail.
 
Old 05-11-2005, 10:31 AM   #3
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by trickykid
It's getting lost cause your using it as a virtual host and it doesn't look at the squirrelmail folder as a directory path to images..

If you go to http://www.domain.com/squirrelmail/images/sm_logo.png I betcha a $100.00 bucks it shows up..

So what do you need to do: Probably easist thing to do is either put the full path of the image in the main index page for your squirrelmail.
I tried putting in the full path of http://mail.domain.com/squirrelmail/images/sm_logo.png and still got a 404 error. Apache logs for that show:

Quote:
[Wed May 11 08:31:26 2005] [error] [client 216.229.107.32] File does not exist: /usr/share/squirrelmail/squirrelmail/images/sm_logo.png
There isn't an index it re-directs to a login.php which is configured via config.php . If I put the full path in the config.php as /usr/share/squirrelmail/images/sm_logo.png I get the following:

Quote:
[Wed May 11 08:37:00 2005] [error] [client 216.229.107.32] File does not exist: /usr/share/squirrelmail/squirrelmail/images/sm_logo.png
 
Old 05-11-2005, 10:35 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by Jukas
I tried putting in the full path of http://mail.domain.com/squirrelmail/images/sm_logo.png and still got a 404 error.
Well, http://mail.domain.com/squirrelmail/images/sm_logo.png with the mail before .domain isn't going to work with the full path setup as a virtual host. You'll notice I said www.domain.com to test the full path to the directory.

What is the / directory path of your actual domain setup?
 
Old 05-11-2005, 10:39 AM   #5
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by trickykid
Well, http://mail.domain.com/squirrelmail/images/sm_logo.png with the mail before .domain isn't going to work with the full path setup as a virtual host. You'll notice I said www.domain.com to test the full path to the directory.

What is the / directory path of your actual domain setup?
The root domain doesn't point to this linux box. I setup a subdomain that does nix.domain.com which points to /var/www/ and the debian ph page there. If I go to http://nix.domain.com/squirrelmail/images/sm_logo.png I still get a 404 and the following in the error logs:

Quote:
[Wed May 11 08:27:24 2005] [error] [client 216.229.107.32] File does not exist: /var/www/squirrelmail/images/sm_logo.png
 
Old 05-11-2005, 10:44 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by Jukas
The root domain doesn't point to this linux box. I setup a subdomain that does nix.domain.com which points to /var/www/ and the debian ph page there. If I go to http://nix.domain.com/squirrelmail/images/sm_logo.png I still get a 404 and the following in the error logs:
Okay, apparently your not understanding what I'm asking.. post your httpd.conf file..
 
Old 05-11-2005, 11:07 AM   #7
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by trickykid
Okay, apparently your not understanding what I'm asking.. post your httpd.conf file..
I thought I did, but apparently not. Forum post limits won't let me post the entire httpd file, so I put a zipped up version at http://nix.fallenchaos.com/~jchieppa/httpd.zip
 
Old 05-11-2005, 11:20 AM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
If you truly have a sm_logo.png in your /usr/share/squirrelmail/images then you need to change your login page to have this instead:

Code:
<img src="images/sm_logo.png" alt="Fallen Chaos Logo" width="308" height="111" />
Without the ../ since when you specify a virtual host with a directory, that becomes the root directory for that virtual host. So specifying a ../ is telling the browser to try and grab the image from /usr/share/images instead of /usr/share/squirrelmail/images hence the error in your logs..

I am the smartest man alive..
 
Old 05-11-2005, 11:39 AM   #9
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by trickykid
If you truly have a sm_logo.png in your /usr/share/squirrelmail/images then you need to change your login page to have this instead:

Code:
<img src="images/sm_logo.png" alt="Fallen Chaos Logo" width="308" height="111" />
Without the ../ since when you specify a virtual host with a directory, that becomes the root directory for that virtual host. So specifying a ../ is telling the browser to try and grab the image from /usr/share/images instead of /usr/share/squirrelmail/images hence the error in your logs..

I am the smartest man alive..
There are two different references to the logo.. one in the login.php and one in the config.php. Now the variables should be defined in the config.php and pulled from there. Here is what is listed in the config.php

Quote:
$org_logo = SM_PATH . 'images/sm_logo.png';
Here is what is listed in the login.php

Quote:
echo html_tag( 'table',
html_tag( 'tr',
html_tag( 'td',
'<center>'.
( isset($org_logo) && $org_logo
? '<img src="' . $org_logo . '" alt="' .
sprintf(_("%s Logo"), $org_name) .'"' . $width_and_height .
' /><br />' . "\n"
: '' ).
( (isset($hide_sm_attributions) && $hide_sm_attributions) ? '' :
'<small>' . sprintf (_("SquirrelMail version %s"), $version) . '<br />' ."\n".
Modifying the <img src="images/sm_logo.png" gets me the following in the logs

Quote:
[Wed May 11 09:42:27 2005] [error] [client 216.229.107.32] File does not exist: /usr/share/squirrelmail/src/images/sm_logo.png
the login.php is in the /usr/share/squirrelmail/src/ directory.. .so if I change the image src to ./images/sm_logo I see

[Wed May 11 09:44:19 2005] [error] [client 216.229.107.32] File does not exist:
/usr/share/images/sm_logo.png

and putting in the absolute path gives me the same doubling I posted in the inital thread.

I do see what you are talking about though, looking at the final html output from the login.php it's showing <img src="../images/sm_logo.png which explains why it's looking in /usr/share/ I just don't see why changing it in the config isn't updating that.

Last edited by Jukas; 05-11-2005 at 11:50 AM.
 
Old 05-11-2005, 12:07 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Make it easier for yourself then.. create an images directory in your src directory named the same thing, so its in both places. Or change your overall code to represent what and where the real logo should be located at.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Silly error: If test condition shalomajay Programming 3 10-31-2005 03:57 PM
SquirrelMail SACONF error... and SA ?? latino Linux - Software 7 08-19-2004 06:12 PM
Postfix 2.0 and squirrelmail 1.5.0 error when send mail ley Red Hat 0 07-09-2004 02:04 AM
Grub - error 15, i missing something silly Oxy Linux - Software 3 02-22-2004 01:09 AM
error using squirrelmail in rh7.3 RAMILLY Linux - Distributions 0 09-09-2002 05:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration