Help needed solving problem running ProjectPier on Uniform Server!

Installation on latest Uniform Server fails

In regard to this bug report:  http://www.projectpier.org/node/124

A short excerpt:
“The installer showed a success message on step 4 but didn’t asked me to create an account on step 5  - the screen was blank.“

editor's note: I realize I've used a lot of file names in the text without giving the path to the file. If you don't already have a tool to locate files quickly (I use Agent Ransack), it is suggested you get one to speed things up a little.

I took two approaches to determine where the problem was originating, I susptected either (1) something was going wrong during the initial database creation or (2) a problem with the php functions that display that particular page.

Next was a process of elimination through experimentation.

  1. I made two installations, one on Uniform Server (called USVR from now on) and one on a hosted account where I had installed PP several times without fail (called HOSTED from now on). I stopped both installations on the 'create an account' page which follows installation step 4.

  2. I moved the database from the known good HOSTED account onto USVR and pointed the config file on USVR to the newly imported database. This had no effect, USVR 'create an account' page still would not load.

  3. I moved the database from USVR to the HOSTED account and pointed the config file on HOSTED to the newly imported database. This had no effect, HOSTED account's 'create an account' page still worked just fine.

  4. I then loaded activeCollab 0.7.1 on USVR and it had the exact same problem.

  5. First Conclusion: This is NOT a problem with the initial database load or configuration, it is not a problem introduced by PP. It must be a problem with the php functions that display that particular page.

  6. I set out in search of the point of failure. I determined that it was not failing in application.php or AccessController.class.php, although those initially looked like good suspects. The failure point seems to be in \application\models\CompanyWebsite.class.php

  7. Line 62 of CompanyWebsite.class.php, begins the function initCompany(). When this function executes, $company is empty and the “if” statement fails and thorws the error OwnerCompanyDnxError.

private function initCompany() {

$company = Companies::getOwnerCompany();

if(!($company instanceof Company)) {

throw new OwnerCompanyDnxError();

} ...

 

  1. So why would be even be at the function initCompany if there are no companies in the database yet? I believe this is the problem. So where in the code did it check that at least one company existed? Where does it decide to call complete_installation.php?

  2. Look at AccessController.class.php. On line 160 we see the function complete_installation(). OK, this throws up the “Complete the Installation” screen, but where is it being called from?

  3. complete_installation() is being called from application.php, line 41 to be exact. How interesting. Look at this code:

// Owner company or administrator doen't exist? Let the user create them
} catch(OwnerCompanyDnxError $e) {
Env::executeAction('access', 'complete_installation');

  1. Oh boy, does this look familiar? Yep, this is indeed the error that I've already confirmed was being thrown in CompanyWebsite.class.php! So, this is the real point of failure, right? No, the code never makes it this far. It truly dies when the error is thrown in CompanyWebsite.class.php. So what is happening on USVR that things seem to stop processing right when the error is thrown? Hmm...

Well, that's as far as I've gotten with this problem. Any help would be much appreciated!! Having PP run on Uniform Server is very important as it will give us a much broader base of users.

Where can you learn a little about try/throw/catch?

http://www.phpfreaks.com/phpmanual/page/language.exceptions.html

Disclaimer - I have not investigated this matter at all, these are just some suggestions of what to look at next.

Based on Jon's details, I think it would be fair to look at a few different things.

1) The php versions on USVR and the HOSTED, as well as the loaded modules, include paths, etc.

2) Related to #1, I wonder if the error settings are related since it seems like it is the thrown error that is prompting the create company page instead of a more normal method.

3) Has anyone does a search on the aC forums to see about this issue? I agree this is an issue with the base code and not something introduced here.

4) While this doesn't exactly solve the situation, has anyone tried some of the other portable / pre-configured LAMP packages? i.e. webserver-on-a-stick (WOS), XAMPP, MAMP/WAMP, easyPHP, Server2Go, etc? Perhaps it is a problem with Uniform Server.

5) I think the next step would be to try an turn on all the error/debugging messages, and also to try and run a php debugger like DGB, Gubbed or Xdebug

I searched the aC forums when filing the bug and didn't find a solution.

There is a way to install PP manually (importing a DB, editing config.php etc.) but this is not for the end user ... when I am done with the theme and language stuff I will write a How-To.

It is a good suggestion to try this with another local server and I have some other problems with XJ! by creativecoders (www.creativecoders.de) since I cannot enable Inno-DB support in that one :-(

I agree that we should provide one working solution with PP 0.8 - this will help us marketing-wise (see also http://www.projectpier.org/node/125).

For the record I did a PP install using MAMP[1], which seems to be the mac equivalent of Uniform server, and it went off without a hitch.

[1] http://www.mamp.info/en/mamp.html

I also had a successful installation on XAMPP which seems to be the base of all those local servers.

www.apachefriends.org provides nice installers for Linux, Windows, Macintosh and Solaris. I am planning to write a small How-To so that we can recommend that one to ur users.

- Roland

i'd also tried it on xampp and it did not work at all!, after that i'd tried it on a regular LAMPP machine and worked just fine...the thing is that under a xampp installation on a windows machine it did work :O ....i think the issue is with the xampp for linux version or something like that
see you soon:
zer0

PS: sory about my english...i'm from argentina! :O

I wrote down a nice How-To, what worked for me.

Since that is an Uniform Server problem we should not care about this anymore if we can provide a working solution. Can someone test the process steps and verify that it will work on another computer besides mine?

Hello again,

I was able to get ProjectPier going using the information on this post:

http://www.activecollab.com/forums/topic/1654/

It's incomplete, but was able to make it work.

What's missing? Setting the create and modify timestamps in the Company file.

That's all. (Of course we shouldn't have had to do all that to get it going -- hope this helps in your debugging efforts.) Project looks promising.