Jump to content

Recommended Posts

Posted

maybe someone can help me on this... after having uploaded squirrelmail, created the attachments and data directories, CHMOD'ed the right stuff, when i try to run the configuration script in the browser i get the message "You must run this script from the command line." I know absolutely nothing about perl/php whatever type of script it is, so I was wondering how I could do that. My first instinct was to try and telnet to my server but that's not allowed, so I'm lost.

 

many thanks,

piotr

Posted

I'm assuming you meant running the conf.pl file? Along with others I too had encountered similar errors. Some guys from the board said that conf.pl has to be run from the command line (as in Unix or Linux), or at least from a shell. You can get one from TotalChoice for a small fee.

 

Personally I just edited the config.php file manually. It still works. :)

Posted

i would edit it manually, if i knew how to...

the only way i can think of doing it is notepad, but it looks a big jumble to me..

any other way?

 

and once i'm done, do i just upload the file i've edited, ie config_default.php?

Posted

Download and install a PHP editor. The text will then be color coded and easier to read. Here is an editor I have used in the past it was ok then should be better now:

http://www.phpedit.net/

 

Next make a copy of config_default.php and call it config.php put it in same directory.

Next you will need to edit the config.php. In the config file you will see a bunch of lines that start with //. The lines are remarks that are not part of the code and contain some directions.

 

As far as I can tell there are only three lines you really need to change in order to get it working. Find these lines that begin in the same way and modify the part between the quotes:

 

$domain = "your_domain_without_the_www.com";

$data_dir = "/home/your_cpanel_login_name/sqmail/data/";

$attachment_dir = "/home/your_cpanel_login_name/phpinc/mail/tmp/";

 

The first one is your domain name without the WWW

The next two are two directories that you must create and give read and write access to.

To do this use the file manager in CPanel:

First create a directory called sqmail one level below the web root.

Then create a data and tmp dir in the sqmail directory.

Next add read and write access:

Click on the tmp link and select Change Permissions on the right hand side and give everything everyone (I am not sure what the min rights are so set it like this until you can login and then retract rights until it fails). Do the same for the data dir.

 

Also make a test user with a short password. Also you must type in the full email address when login in (you@******). And remember unix and php are for the most part case sensitive so use lower case letters when creating directories and modifying the config file.

 

Good luck

Posted

thanks for the tips, they helped, i'm trying to figure out why it gives me this error:

 

"Error opening ../data/default_pref

Could not create initial preference file!

/home/redonet/sqmail/data/ should be writable by user nobody"

 

ive configured both the data subdirectory and the default pref file to CHMOD 777 but i still seem to get that error.

 

however, what about mail users - when you said create a test user, did you mean doing so from within cpanel? will squirrel mail automatically recognize that such a user has been created in cpanel?

Posted

Yes squirrel mail is accessing the email accounts of the domain name you typed in. So if you add more users sq. mail will see them automatically...

 

If your are getting that error it means your are getting authenticated (logged in to sq mail) but php sq can't find the data directory. I would guess that the directory does not exist or the rights are not set.

Here are two possibilities:

 

1. The directory was created in the wrong place. Based on the dir I gave you the sqmail dir should appear in the root directory when ftp into your site.

 

2. The permissions: Make sure you used chmod or the cpanel to set rights right clicking in windows may not work. Also make sure that the data dir is 777 and the tmp is 777 and their parent is at a min readable by everyone.

Posted

hi there and thanks...

i've double and triple checked everything and all the permissions are set fine - i did it both in cpanel and in cuteftp, setting all to 777 even. I searched some archives for squirrelmail with user support, and people have been getting the same problems, and were referred to point 3b in the installation file... basically (see below) it tells you to run a few command lines. but how can i do that if i have no telnet/ssh access? or is there any other way?

 

"3b. Setting up directories

 

  ...

  The data directory is used for storing user preferences, like

  signature, name and theme. When unpacking the sources this directory

  is created as data/ in your SquirrelMail directory. This directory

  must be writable by the webserver. If your webserver is running as

  the user "nobody" you can fix this by running:

 

    $ chown -R nobody data

    $ chgrp -R nobody data

 

  Keep in mind that with different installations, the web server could

  typically run as userid/groupid of nobody/nobody, nobody/nogroup,

  apache/apache or www-data/www-data.  The best way to find out is to read

  the web server's configuration file.

 

  There also needs to be a directory where attachments are stored

  before they are sent. Since personal mail is stored in this

  directory you might want to be a bit careful about how you set it

  up. It should be owned by another user than the webserver is running

  as (root might be a good choice) and the webserver should have write

  and execute permissions on the directory, but should not have read

  permissions. You could do this by running these commands (still

  granted that the webserver is running as nobody/nobody)

"

 

concerning the temp directory:

 

$ chgrp -R nobody attachments
Posted

I have squirrelmail running on a couple of TCH sites and have never had to do any thing more. It's version 1.4.0 if that matters.

 

I really think that it must be a directory location problem.

Just to be clear:

At the root of your ftp site there is a directory called sqmail and under that are two other directories called data and tmp?

 

Your root dir in ftp land is different the root in php land. So the above ftp directories are found by php in

/home/redonet/sqmail/data/ and

/home/redonet/sqmail/tmp/

 

in ftp land

/sqmail/data/ and

/sqmail/tmp/

 

Hope this helps.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...