Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Manual] How to install Precurio on 1and1 servers
21-Mar-2012, 07:55 AM
Post: #1
Information [Manual] How to install Precurio on 1and1 servers
I have spent more than five days trying to install a Precurio intranet on a 1and1 server.

About 1and1 hosting services
Although I have never had any problem with my pages or the web applications programmed by myself that are hosted in 1and1 servers, when it comes to hosting 3rd party applications it's always a headache (I also found it totally unintuitive to install Moodle and Magento in their hosting). Depending on the complexity of the application, the tunning necessary to make them work goes from a few changes in .htaccess files to including a php.ini in every single directory in the directory tree of the application, or researching for days like in this case.

If you are still on time to choose your hosting services and are planning to install something different from a hand coded website or simple CMS like Wordpress or Joomla, forget about 1and1.

Specifically, if you are installing Precurio, the head of Precurio project himself reccomends Arvixe (http://www.arvixe.com/precurio_hosting) and to me, after all the work put in making precurio work in 1and1 servers, seems the best option.

Also consider the commercial version. The support for the free version is amazingly fast and accurate, so if it is only half as good for the commercial version, you can expect a great application up and running in no time and all the problems (if any) solved on the fly.

If, like for me, none of these is an option for you, and to prevent other people from suffering the same headache that I have recently been through, I'll tell you how I did to have Precurio up and running at their servers.

Administrators and moderators, please feel free to correct my English or any technical aspect you think I'm wrong about.



.htaccess
The first problem I bumped into was that, after uploading all the files to the server, I wasn't able to reach the installation because it redirected in an infinite loop. I remembered that I had a similar problem when installing moodle, and that it was easy to solve:

Just find all the .htaccess files in Precurio that use the "RewriteEngine On" directive and, right below that line, add the following:

Code:
RewriteBase /mypath

where mypath is the path to the .htaccess file from the root of your installation. A couple of examples:

Code:
RewriteBase /
RewriteBase /public

Database
The second problem was that there was no way to link the precurio installation to the database.

1and1 databases, unlike any other I know, have to be accessed through a specific socket ("/tmp/mysql5.sock"). Given that it is so uncommon, hardly any online application contemplates it in their configuration proccess, so it had to be manually added to the precurio.ini file:

Open the file /precurio.ini and look for the "mysql" (or whatever your data base is) configuration. At the end of the section, add the following line:

Code:
database.unix_socket = "/tmp/mysql5.sock"

Home page
After these changes, most of the sections worked ok, but the home page couldn't be accessed. I just had to change the two files [url=www.precurio.com/forums/showthread.php?tid=491&pid=1178]adviced by mayorbrain[/url]:

-\application\default\layouts\yourtheme\header.phtml
the home link has to be changed to:
Code:
<li><a class="first<?php echo $selected;?>" href="<?php echo $this->baseUrl();?>/default/index/home"> <?php echo $this->translate("Home");?> </a></li>

-\application\default\controllers\LoginController.php line 60 & 132
PHP Code:
$this->_redirect('/default/index/home'); 

mysql
There's still a problem at the "contact" section and under "intranet content > details" regarding the database access:

To solve the contact section problem:
Follow the instructions to install the patch in the post: http://www.precurio.com/forums/showthread.php?tid=84

Open application\contact\models\vo\Contact.php and remove the space between "concat" and the bracket in line 199:

PHP Code:
'mobile_phone','email','job_title','address','website','full_name'=>'concat(first_name," " ,last_name)')) 

To solve the intranet contents section problem:

Open application\cms\models\vo\Content.php and again, remove the space between "concat" and the bracket (line 247):

PHP Code:
->join(array('b'=>PrecurioTableConstants::USERS),'a.user_id = b.user_id',array('full_name'=>'concat(first_name," " ,last_name)')) 

There are other occurrences of "concat" separated from its bracket, tho everything was working again, I made a search for "concat" and removed all the spaces just in case.

It seems that the space removal makes precurio compatible with mysql 5.0, so there's no need to update to 5.1 any more.

Magic quotes
1and1 servers have the php.ini setting "magic quotes" enabled by default. That affects the way user input links are displayed (for example, the links in a news item, or in the intranet content), and make them not work.

To disable this behavior, create the file public/php.ini and put this content in it:

Code:
; Magic quotes
;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off

Though I don't know if these changes had any undesired side effects to my intranet, up to now all seems to be working ok. Anyway, if I find anything that doesn't work properly because of these configuration changes, I'll let you know, if possible together with the fixes.

I hope this is helpful to many, and that I have avoided you a few days of research.
Find all posts by this user
Quote this message in a reply
15-Oct-2012, 06:22 AM
Post: #2
RE: [Manual] How to install Precurio on 1and1 servers
Hi,
I am having a dedicated server on 1&1, I tried doing what you did explain (very well) in your memo on 1&1 servers and I am always stocked at the end of the process with this sentence:
"SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql5.sock' (2)"
The db is correct, i checked it
I saw non tables have been created
I am asking you if u may help me
thanks a lot
Yan David
Find all posts by this user
Quote this message in a reply
21-Oct-2012, 12:12 PM
Post: #3
RE: [Manual] How to install Precurio on 1and1 servers
I guess you have checked that the connection info is right (database user and password, etc).

Can you paste your configuration file so that I can take a look to it (make sure you dont paste any delicate data - username, password...).

Also check your database info at 1and1. Mine specified that port, maybe yours is different (/tmp/mysql5.sock may be /tmp/mysql[someothernumber].sock in your case)
Find all posts by this user
Quote this message in a reply
07-Mar-2013, 01:36 PM
Post: #4
RE: [Manual] How to install Precurio on 1and1 servers
Hi Akhasis

The instructions you give here excellent but for some reason I am still having difficulty in getting the database settings, (which I know are correct), to be accepted.

I am using a 1and1 server but when I try to test the connection I get the error: SQLSTATE[HY000] [2005] Unknown MySQL server host '/tmp/mysql5.sock' (1)

Any ideas please?

Many thanks

DezB
Find all posts by this user
Quote this message in a reply
08-Mar-2013, 05:26 PM
Post: #5
RE: [Manual] How to install Precurio on 1and1 servers
Hi Akhasis

I've double checked the connection settings but to no avail.

I am using a 1and1 server but when I try to test the connection I get the error: SQLSTATE[HY000] [2005] Unknown MySQL server host '/tmp/mysql5.sock' (1)

Any ideas please?

Many thanks

DezB
[/quote]
Find all posts by this user
Quote this message in a reply
09-Mar-2013, 04:01 AM
Post: #6
RE: [Manual] How to install Precurio on 1and1 servers
Ha ha

Found the answer...

If anyone is interested I used localhost;unix_socket=/tmp/mysql5.sock for the location and it worked a treat.

Best wishes

DezB
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  install error lulu 8 41,453 05-Feb-2013 04:53 AM
Last Post: reddybrothers80@gmail.com
  Precurio Manual akhasis 8 46,796 03-Sep-2012 01:32 AM
Last Post: akhasis
  Install page is blank in browser (unable to progress) WWFPAdmin 2 26,779 31-Aug-2012 08:35 AM
Last Post: WWFPAdmin
  Trying to install on IIS yeilam 3 14,331 01-Mar-2012 01:48 AM
Last Post: joy89
  Error in Install process (WAMP) Herbert_De_Carvalho 0 11,095 26-Dec-2011 01:10 PM
Last Post: Herbert_De_Carvalho
  Install Help mrodrigues 4 13,996 22-Dec-2011 01:48 AM
Last Post: greenbuto
  Linux Install Help AlinuX 9 13,152 25-Jul-2011 12:28 AM
Last Post: JeniferDecosta10
  Install skips User Setup gmwestrup 4 8,207 07-Feb-2011 10:27 AM
Last Post: linker3000
  Install notes and can't login after completion genloz 2 1,587 24-Nov-2010 01:43 AM
Last Post: mayorbrain
  Testing Precurio 2.1 on Live Servers milord 1 5,089 09-Nov-2010 10:34 PM
Last Post: mayorbrain

Forum Jump:


User(s) browsing this thread: 1 Guest(s)