Author Topic: [HOWTO] - Attachments /w Servage [0.1-stable]  (Read 8201 times)

Offline btcentral

  • Jr. Member
  • **
  • Posts: 26
[HOWTO] - Attachments /w Servage [0.1-stable]
« on: March 10, 2008, 09:04:25 AM »
Here's what I did to get it working on my servage account...



Prereqisites:

- Roundcube Installed
- Make sure PHP Safe Mode is Off - In the control panel, select Web Server - setup a new virtual host, e.g. webmail.domain.com
Then click List Virtual Hosts, click View Zone next to the domain, look for webmail.domain.com - Click Advanced - Set PHP Safe Mode to Off - leave everything else as it is, and click apply. Note: Virtual Hosts can take up to 3 hours to become active!

Howto:

1. Browse to the webmail (or whatever you called it) folder in the File Manager, and click the properties button next to the Temp folder.
(See picture if you don't know what to press)



2. Under Change dir permissions (chmod): in the box where it says New setting: type 777, click the dropdown list next to it and select Recursive. Then click the Apply Changes button next to it.

3. Click the properties button next to Temp again, this time under Change dir owner (chown): in the box next to where it says New setting: select Webserver, and in the box next to that Recursive, again click Apply Change.

Now the script can write files to that folder, which is one of the things we need to be able to do.
Repeat steps 1-3 for the logs folder too, so that error logs can be written correctly.

4. Click [edit] next to .htaccess

Copy/Paste the following - replacing the file contents:

Code: [Select]
# AddDefaultCharset UTF-8
AddType text/x-component .htc

<IfModule mod_php4.c>
 php_flag display_errors Off
 php_flag log_errors On
 php_value error_log logs/errors
 php_value upload_max_filesize 10M
 php_value post_max_size 12M
 php_value memory_limit 256M
 php_value session.auto_start 0
 php_value zlib.output_compression 0
 php_value magic_quotes_gpc 0
 php_value   max_execution_time   120
 php_value LimitRequestBody 81920000
 php_value upload_tmp_dir /homeXXc/sub001/scXXXXX-MDOY/webmail/temp
</IfModule>

<IfModule mod_php5.c>
 php_flag display_errors Off
 php_flag log_errors On
 php_value error_log logs/errors
 php_value upload_max_filesize 10M
 php_value post_max_size 12M
 php_value memory_limit 256M
 php_value session.auto_start 0
 php_value zlib.output_compression 0
 php_value magic_quotes_gpc 0
 php_value   max_execution_time   120
 php_value LimitRequestBody 81920000
 php_value upload_tmp_dir /homeXXc/sub001/scXXXXX-MDOY/webmail/temp
</IfModule>

<FilesMatch &quot;(\.inc|\~)$&quot;>
 Order allow,deny
 Deny from all
</FilesMatch>

Order deny,allow
Allow from all

Note: You need to change:
Code: [Select]
php_value upload_tmp_dir /homeXXc/sub001/scXXXXX-MDOY/webmail/temp
To reflect the path to your real temp folder - you can find the Account Path under Documentation on the Servage CP.
It will be that (ie. /homeXXc/sub001/scXXXXX-MDOY) / the path to the temp folder (ie. /domain.com/webmail/temp or /webmail/temp etc.) in your control panel, in the example the webmail folder is in the root directory, which then contains the temp folder.

Then click Save Changes to File - we're almost done now ;)

5. Browse to the Config folder, click [edit] next to db.inc.php

Find:
Code: [Select]
$rcmail_config['db_max_length'] = 512000; // 500KChange it to:
Code: [Select]
$rcmail_config['db_max_length'] = 81920000;
Again click Save Changes to File

Congratulations, now everything should work perfectly :)

Enjoy,
BTCentral

Edit: Added
Code: [Select]
php_value upload_tmp_dir /homeXXc/sub001/scXXXXX-MDOY/webmail/temp
Values - this is required as the default tmp folder doesn't seem to work correctly 100% of the time.
http://www.btcentral.org.uk - Cheap, Top Quality Web-design.

Offline jansportw

  • Newbie
  • *
  • Posts: 3
Re: [HOWTO] - Attachments /w Servage [0.1-stable]
« Reply #1 on: March 29, 2008, 11:42:35 AM »
Because of either a mistake on my part or just a different server config, for me changing all of the above didn't work.
But after changing my php.ini file as shown below, and adding a copy of that file to all directories, including subdirectories, that have RoundCube PHP files in them, it worked (even if I undid all the .htaccess changes)

change the following in php.ini
Code: [Select]
upload_max_filesize = 20M
post_max_size = 20M
(Adjust 20M as needed)
I found a copy in my main directory, edited it, then copied the changed file to all my main RoundCube folders

Got the idea from post: http://roundcubeforum.net/forum/index.php?topic=2817.0

Offline Kyvill

  • Newbie
  • *
  • Posts: 3
Re: [HOWTO] - Attachments /w Servage [0.1-stable]
« Reply #2 on: April 16, 2008, 09:58:27 AM »
Do you have more things that you can do with RoundCube using Servage?
I'd like to have a full-functional webmail :D lol

edit:

jansportw: are you hosted by servage to? if so: how did you managed to change settings in php.ini?

Offline prj

  • Newbie
  • *
  • Posts: 1
[HOWTO] - Attachments /w Servage [0.1-stable]
« Reply #3 on: July 05, 2008, 04:43:42 AM »
Thank you for this guide,it made my installation work a treat.:)

Still not sure about setting up multi-domain logins but with over 500GB on my Servage account to play with I just did an install for each one which works nicely.

Cheers

Paul

Offline darkchron

  • Newbie
  • *
  • Posts: 2
[HOWTO] - Attachments /w Servage [0.1-stable]
« Reply #4 on: September 06, 2008, 02:42:21 AM »
500 Internal Error
 

The requested page produced an internal error. If you are the webmaster of this website please check:
That script has been uploaded as ASCII (if CGI/Perl)
If the file and folder permissions are correct, e.g. 755
Your .htaccess file (if any).

did not work here... Soo, how do i fix this ?

Offline darkchron

  • Newbie
  • *
  • Posts: 2
[HOWTO] - Attachments /w Servage [0.1-stable]
« Reply #5 on: September 06, 2008, 02:48:01 AM »
LoL sorry. My fault :-)

Still not working tho. I am able to upload the attachments but when i send it the receiver has not received any attachment. I tryed mailing myself too and it didn't work. Someone please help.
« Last Edit: September 06, 2008, 02:50:59 AM by darkchron »