# Horde-webmail/PHP help



## pathiaki (Sep 12, 2013)

Hi,

Could someone assist with a problem that I seem to have with the horde-webmail port? Everything installed without error. What I'm left with was configuring Apache 2.2 to interpret PHP. I believe I have that correct as well as I have several applications already running correctly. This port places everything in /usr/local/www/horde. I'm not planning on moving that. I changed my Apache file to have all the correct settings that I know of. I invoke the test.php function in the /usr/local/www/horde/config/conf.php file. I browse to http://<HOST IP>/test.php.

It shows me this:


```
Horde Version

    5.1.4

Horde Applications

    Agora [Forums]: unknown
    Ansel [Photos]: unknown
    Chora [Version Control]: unknown
    Content: 2.0.3
    Gollem [File Manager]: H5 (3.0.1) (run tests)
    Hermes [Time Tracking]: unknown
    Imp [Mail]: H5 (6.1.4) (run tests)
    Ingo [Filters]: H5 (3.1.2) (run tests)
    Jonah [News]: unknown
    Klutz [Comics]: unknown
    Kolab [Kolab]: unknown
    Kronolith [Calendar]: H5 (4.1.3) (run tests)
    Luxor [X-Ref]: unknown
    Mnemo [Notes]: H5 (4.1.1)
    Nag [Tasks]: H5 (4.1.2)
    Passwd [Password]: unknown
    Sam [Spam]: unknown
    Sesha [Inventory]: unknown
    Timeobjects: 2.0.4
    Trean [Bookmarks]: H5 (1.0.3)
    Turba [Address Book]: H5 (4.1.2) (run tests)
    Ulaform [Forms]: unknown
    Vilma [Mail Admin]: unknown
    Whups [Tickets]: unknown
    Wicked [Wiki]: unknown 

PHP Version

    View phpinfo() screen
    View loaded extensions
    PHP Version: 5.4.19
    PHP Major Version: 5.4
    PHP Minor Version: 19
    PHP Version Classification: release
    You are running a supported version of PHP.

Ctype Support: No
The ctype functions are required by various Horde libraries. Don\t compile PHP with --disable-all/--disable-ctype.
```

I go into Gollem, run tests and everything is ok, but it looks like I'm missing a few items which I add and reloading the page shows they are now recognized. Great. I move onto any of the other applications' "run test" and they all come back with a page that reads:


```
"" driver (for Horde_Share not found).
```

Which driver? The driver for that application? Shouldn't the port have installed this?

Is seems that PHP is working correctly as you can click on the phpinfo button at the bottom and it outputs the PHP software and Apache info. Does anyone have any insight into this?

Thank you,

Paul


----------



## ShelLuser (Sep 12, 2013)

The mail/horde-webmail port should indeed have installed everything you need to get you up to speed with Horde, and the Horde applications should also be capable of detecting each other.

Two things come to mind here: you mentioned that you used the IP address to access the test page and that makes me wonder what Apache host entry you used? Because normally you'd place Horde under it's own host definition (optionally with specific settings) after which you'd use a specific name to access it.

I'm assuming Horde should be able to handle this, but I'd still recommend to use (virtual) host names to access Horde.

Another thing: what do you get to see when you go to the Horde administration (configuration)? Do all the installed applications mention that "SQL DB schema is ready"? Because that is also an important factor; this means that they have a presence in the Horde database after which they should be detectable by the others.

Edit: null-edit to fix tags.


----------



## pathiaki (Sep 12, 2013)

Thank you, @ShelLuser.

I went back to see what `webmail-install` did for installation into the database. Although it said it had installed the tables, there's nothing in the PG instance I created for horde. x(

So, I guess I'll check the settings I gave it. However, I believe they were all correct. I checked with phppgadmin and logged in with the proper user/password combination.I can see the empty database and the user has the correct privileges.

Is the best way to reset the configuration file for this is to remove /usr/local/www/horde/config/conf.php and try again?

TIA!

P.

--

I tried moving the conf.php file out of the way and re-ran `webmail-install`.

This is what happened:


```
Installing Horde Groupware Webmail Edition

Configuring database settings

What database backend should we use? 
    (false) [None]
    (mysql) MySQL / PDO
    (mysqli) MySQL (mysqli)
    (pgsql) PostgreSQL
    (sqlite) SQLite

Type your choice []: pgsql

Username to connect to the database as* [] team
Password to connect with 
How should we connect to the database? 
    (unix) UNIX Sockets
    (tcp) TCP/IP

Type your choice [unix]: tcp

Database server/host* [] <database machine name>

Port the DB is running on, if non-standard 5432

Database name to use* [] team

Internally used charset* [utf-8] 
Split reads to a different server? 
    (false) Disabled
    (true) Enabled

Type your choice [false]: 

Writing main configuration file... done.

Creating and updating database tables...root@<horde host>:/usr/local/www/horde/config #
```

This doesn't look like it put the tables in.

P

--

Hi,

Well, simply, it looks like the webmail-install script is broken in some way. I've tested PGSQL connectivity from the jail I have this installed in and I can get to the database instance with the given user. So, the script does not seem to be connecting and passing along the information.

P


----------



## ShelLuser (Sep 13, 2013)

Well, I can't comment on the web install since I never used it. When I set up Horde I simply used the approach I was familiar with, which basically boils down to this:


Copy /usr/local/www/horde/config/conf.php.dist to config.php and edit basic settings.
Add host entry to Apache to gain access to Horde (using /usr/local/www/horde as main directory).
Use browser to access Horde.
By default the configuration will automatically log you on as the Administrator and you'll end up in the Horde configuration list. Here you can access the configuration for all the installed components (or applications).

Start by configuring Horde itself, and begin with the 'Database' tab. Here you can tell it to access your PostgreSQL backend and which properties to use. After you've done that go back to the main configuration page and now you'll have the option to install the main database schema. After that you can also setup the database entries for all installed applications.

This is how I did it and although it maybe a bit of work (Horde is a beast when it comes to extensiveness) it is in my opinion also the best approach.

Edit: null-edit to fix tags, changed moderator edit (set up vs. setup) because of not working colour tags.


----------



## pathiaki (Sep 13, 2013)

@ShelLuser,

Thank you for helping me with this. (I'm really not clueless.) However, there's so many 'partial', 'out of date' and 'out-of-rev' (either on OS or Horde) documents out there, I had no idea what to follow so thanks for providing this.

So, after looking at the conf.php.dist and copying it to conf.php, I realize it's really straightforward.

Now, looking at your remark on the Apache configuration, are you saying Horde should be put in an Apache Virtual Host (vhost)?  I was putting it in a simple alias as there's nothing else except Horde running on this server.

If you could show me your configuration so I don't go mucking around on something that is quite easy but could bite me, I'd prefer to just get it set[]up so I can configure it and see if it's what I want for a groupware product. (It seems highly robust)

I'm curious about a couple of things. test.php shows that I have no config/conf.php file. (I do)

Also, I connect to this machine through a firewall redirect from port 80xx to port 80 on this machine.  Is Horde going to have an issue with that?

Thank you,

P.


----------



## pathiaki (Sep 13, 2013)

@ShelLuser,

I, finally, got to the configuration/administrator page.

However, this is horde-webmail 5.1.2. It doesn't have a database tab.   However, once you're in, it does have a small window on the left. It has:


```
Configuration
Users
Groups
Permissions
Locks
Alarms
Sessions
PHP Shell
SQL Shell
CLI
```

When you click on configuration, you don't get anything having to do with the database. In fact, there doesn't seem to be any[]way in this version, to configure the database. At the top of the screen, there is a column (I checked, it's not a tab) labeled database, but it just tells you the status of: 
	
	



```
DB Access is not configured
```

Please respond and assist when you can.  

Thank you,

P.


----------



## pathiaki (Sep 13, 2013)

Hi to all!

I've moved forward on this yet again.

I enabled the test.php in the /usr/local/www/horde/config/conf.php.  The remarkable thing was it showed a glaring line in red at the bottom that CTYPE was not enabled and Horde heavily requires this.

So, into ports:


```
cd /usr/ports/textproc/php5-ctype
make install
```

Restart the web server and access the test page again.

`/usr/local/etc/rc.d/apache22 restart`

Well, that really changed the test.php (Gollem) display. It showed a tremendous amount of things that were NOT loaded. These are things that I thought I configured (I'm actually quite sure I did) like PostgreSQL support and many other things that Horde did not see.

I have been going through them to get everything installed. According to what I've seen, there's no way the machine could have talked to a PostGreSQL database.

Something is really broken with this port. It does NOT support anything outside of MySQL from what I can see. The Horde-Webmail software DOES support MySQL, PostGreSQL, and several others.

I may have to create a HOWTO until this is fixed, if I can get it working.

P.


----------



## ShelLuser (Sep 13, 2013)

It's good to see you're making progress, but rest assured; the port isn't broken. The problem is that Horde, I mentioned it earlier, is a _beast_ of a program. And I'm not exaggerating either.

Re-reading my previous post I suddenly noticed what could be a possible cause for confusion. When I mention that you should configure Horde I'm not referring to the configuration screen you're in (this got me too when I first set up Horde).

Instead go over the list of applications and one of them will be 'Horde'. This is the so called base application. If you check its configuration you'll come across the Database tab I mentioned earlier.


----------



## ShelLuser (Sep 13, 2013)

To avoid confusion I'm going to answer this question separately because this involves Apache and the previous one involved the Horde configuration itself (also trying to keep things understandable for others).



			
				pathiaki said:
			
		

> Thank you for helping me with this. (I'm really not clueless.) However, there's so many 'partial', 'out of date' and 'out-of-rev' (either on OS or Horde) documents out there, I had no idea what to follow so thanks for providing this.


You're very welcome, and rest assured; the only reason I wrote that whole thing up is because I know how confusing Horde can be at first time. When I first set up Horde (some years ago) I too spend hours and hours searching for something which, according to the documentation, should be so obvious yet was completely hidden from sight.

And well, seems like I somewhat made the same mistake myself too 



			
				pathiaki said:
			
		

> Now, looking at your remark on the Apache configuration, are you saying Horde should be put in an Apache Virtual Host (vhost)?  I was putting it in a simple alias as there's nothing else except Horde running on this server.


Both should work out just well, the reason I mentioned it is because in your original post you mentioned that you accessed Horde with just the IP address of your server. That could be a bad approach, especially for a webserver which is going to be used on the Internet.

The thing is; many nasty people will try to "hack" your webserver by feeding it all sorts of nonsense. Nothing an up to date webserver can't handle. But if you use 1 single entry for everything you run on Apache then all those attempts will find their way into your main logfile too.

So what I always do is set up a default virtual host which is used whenever people access the webserver using it's IP address, and then make sure that these logfiles get treated differently (you can sometimes extract useful information from them).

But this isn't a requirement for Horde. Horde will work with just about any setup you have.

Edit: null-edit to fix tags, fixed grammar mistake: set[]up vs. setup.


----------



## pathiaki (Sep 13, 2013)

A, I see. OK, now here's the fun part. I do believe the port is *very* broken for anything other than MySQL. I had to pull in a *lot* of ports to get the thing to start recognizing what was wrong. Once I had pulled in the 15-25 ports, everything started to pseudo-function in the test and configuration tools.

I got brave at that point.  I tried the [color="DarkGreen"]webmail-install[/color] utility again.

This time:


```
webmail-install

Installing Horde Groupware Webmail Edition

Configuring database settings

What database backend should we use? 
    (false) [None]
    (mysql) MySQL / PDO
    (mysqli) MySQL (mysqli)
    (pgsql) PostgreSQL
    (sqlite) SQLite

Type your choice []: pgsql

Username to connect to the database as* [] horde
Password to connect with 
How should we connect to the database? 
    (unix) UNIX Sockets
    (tcp) TCP/IP

Type your choice [unix]: tcp

Database server/host* [] <DB SERVER IP>

Port the DB is running on, if non-standard 

Database name to use* [] horde

Internally used charset* [utf-8] 
Split reads to a different server? 
    (false) Disabled
    (true) Enabled

Type your choice [false]: 

Writing main configuration file... done.

Creating and updating database tables... done.

Configuring administrator settings

Specify an existing mail user who you want to give administrator
permissions (optional): support@example.com

Writing main configuration file... done.

Thank you for using Horde Groupware Webmail Edition!
```

Hooray!  I can go to the test page and run all the tests after this. Then, I saw your mail. I browsed to [CMD]http://<horde server>:8026/horde[/CMD]. This immediately redirected me to [CMD]http://<horde server>/horde/services/portal/index.php[/CMD]. And I got a blank page...again. x(

Then, I noticed. Software did a rewrite and removed the port number. Plugging the port number back in and I can see the horde page :e  Yay!

(Apologies to DutchDaemon and everyone who has to reformat my stuff.  I did read it a while ago.  I'll have to re-read.  I'll try not to be such a noob asap. _[ Can't be soon enough -- Mod. ]_

P.


----------



## pathiaki (Apr 11, 2014)

Hi,

Been a while since I needed help with this, however, I installed a new instance of Horde webmail.  Everything seemed to go correctly until I tried to save out the first bit of configuration information.

The web server redirects to:



> /horde/imp/admin/config/config.php



I don't know where it's getting that path from.  Which file is it that needs to be modified?

There is no such path below /usr/local/www/horde/imp.  There is admin directory or anything lower.  There is, however, /usr/local/www/horde/imp/config but it contains no config.php only conf.php.

The only location that I have a config.php is in the /usr/local/www/horde/admin/config/config.php

I assume there's a simple reason for this like how to modify in the registry or preferences, however, I'm loathe to poking around in a such a complex piece software.

Thank you,

P.


----------

