Open-Realty and Plesk [SOLVED]

Community support for Plesk, CPanel, WebMin and others with insight from two of the founders of Plesk. Ask for help here! No question is too simple or complicated. :-)
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Open-Realty and Plesk [SOLVED]

Unread post by jmackenz »

A client of mine wants to use open-realty.

It's requirements are :

Server Requirements
•Ability to make outbound connections from your server to HTTP (80) and HTTPS (443) Servers (Ports).
•PHP v5.2 or higher
•PHP GD Support or Imagemagik
•PHP Multibyte String Support
•PHP CURL support
•PHP OpenSSL support
•PHP Zip support
•PHP Short Tag support disabled
•PHP Magic Quotes off
•PHP ionCube Loader support
•MySQL 5 or higher
•Apache mod_rewrite (required for SEO Friendly URLs)
•Apache mod_expires (recommended)
•Apache mod_headers (recommended)


Is this possible on a plesk box?

Thanks
- John
Last edited by jmackenz on Tue Aug 02, 2011 10:16 pm, edited 1 time in total.
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Open-Realty and Plesk

Unread post by mikeshinn »

I dont see any reason why not, those all look normal.
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Re: Open-Realty and Plesk

Unread post by jmackenz »

Code: Select all

[root@phoenix ~]# php --version
PHP 5.3.6 (cli) (built: Apr 19 2011 12:24:31)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with the ionCube PHP Loader v4.0.5, Copyright (c) 2002-2011, by ionCube Ltd.
[root@phoenix ~]# mysql --version
mysql  Ver 14.14 Distrib 5.1.58, for redhat-linux-gnu (i686) using readline 5.1
[root@phoenix ~]# rpm -q --whatprovides php-openssl
php-common-5.3.6-3.el4.art
[root@phoenix ~]# rpm -q --whatprovides php-curl
php-common-5.3.6-3.el4.art
[root@phoenix ~]# rpm -q --whatprovides php-mbstring
php-mbstring-5.3.6-3.el4.art
[root@phoenix ~]# rpm -q --whatprovides php-zip
php-common-5.3.6-3.el4.art
[root@phoenix ~]# rpm -q --whatprovides php-gd
php-gd-5.3.6-3.el4.art
[root@phoenix ~]# cat /etc/php.ini | grep magic_quotes
; magic_quotes_gpc
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
[root@phoenix ~]# cat /etc/php.ini | grep short_open_tag
; short_open_tag
short_open_tag = Off



looks like requirements have been met?


When I get to step 3 of the installer it doesn't load full data.

Code: Select all

[root@phoenix ~]# cat /var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/php_errors.log
[27-Jul-2011 22:15:13] PHP Warning:  [obfuscated](): open(/var/lib/php/session/sess_oemg47gr6iv7qgtf6s5e0l86d5, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/index.php on line 27
[27-Jul-2011 22:15:16] PHP Warning:  [obfuscated](): open(/var/lib/php/session/sess_oemg47gr6iv7qgtf6s5e0l86d5, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/index.php on line 27
[27-Jul-2011 22:15:21] PHP Warning:  [obfuscated](): open(/var/lib/php/session/sess_oemg47gr6iv7qgtf6s5e0l86d5, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/index.php on line 27
[27-Jul-2011 22:15:21] PHP Notice:  Undefined index: or_install_lang in /var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/index.php on line 831
[27-Jul-2011 22:15:21] PHP Warning:  installer::load_lang(/var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/language//lang.inc.php): failed to open stream: No such file or directory in /var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/index.php on line 639
[27-Jul-2011 22:15:21] PHP Fatal error:  installer::load_lang(): Failed opening required '/var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/language//lang.inc.php' (include_path='.:') in /var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/index.php on line 639
[root@phoenix ~]# ls -l /var/lib/php/session/
total 372
-rw-------  1 apache apache  13481 Jul 26 22:09 sess_0f3elvc9rsu10pan3gpvmqrc63
-rw-------  1 apache apache  13396 Jul 27 07:35 sess_2qlpbmeo8o3812hnnf5kgk2654
-rw-------  1 apache apache  13481 Jul 26 21:16 sess_3pp1vo384oki8tpho0rq1pkd40
-rw-------  1 apache apache  13396 Jul 27 12:26 sess_5luigejvtidfie22h1i0rkr8l7
-rw-------  1 apache apache  13396 Jul 27 10:19 sess_7a660a3m8kg9i43tvvi62n8090
-rw-------  1 apache apache  13396 Jul 27 10:46 sess_bagd04ej6h5s8chhu1m50c7196
-rw-------  1 apache apache  13396 Jul 27 16:28 sess_g4jujtmt1m90jebu1er24rtvr6
-rw-------  1 apache apache   2667 Jul 26 21:16 sess_g966i3fqcjknknejimtujv9cu3
-rw-------  1 apache apache      0 Jul 26 21:16 sess_ifr13ka3fenh3oeq50rrhl5uk1
-rw-------  1 apache apache  13396 Jul 26 20:45 sess_k9fivvdh5hljq761q6p2sd3c50
-rw-------  1 apache apache 108363 Jul 26 22:23 sess_lqf6k5v06p02b0rr26b6nvva80
-rw-------  1 apache apache  93797 Jul 26 21:32 sess_m488i90bg12sh6hk1v4tasle50
-rw-------  1 apache apache  13396 Jul 27 08:56 sess_tird5pdg47msrpa03qtiaul2d6
-rw-------  1 apache apache  13396 Jul 27 08:10 sess_uhjg7k6tovir869gdpl70j15l0
[root@phoenix ~]# ls -l /var/www/vhosts/artpratt.com/subdomains/listings/httpdocs/install/
total 52
-rw-r--r--   1 artpratt psacln 34913 Jul 27 22:12 index.php
drwxr-xr-x  22 artpratt psacln  4096 Jun 13 11:51 language
-rw-r--r--   1 artpratt psacln  3651 Jun 13 11:50 logo.png
-rw-r--r--   1 artpratt psacln  1463 Jul 27 22:15 php_errors.log
drwxr-xr-x   2 artpratt psacln  4096 Jun 13 11:51 versions

I'm assuming that the apache / artpratt is where the conflict lies, any idea on a way to resolve without upsetting other vhosts?
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Re: Open-Realty and Plesk

Unread post by jmackenz »

So I edited my php.ini and replaced /var/lib/php/session/ with /tmp/

everything now works, is there any reason why I shouldn't do this?
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Open-Realty and Plesk [SOLVED]

Unread post by mikeshinn »

So I edited my php.ini and replaced /var/lib/php/session/ with /tmp/

everything now works, is there any reason why I shouldn't do this?
Great question. In general you want to protect the session files from your users so they can't manipulate them and potentially hijack a session that doesnt belong to them. The /tmp directory is a place anyone can access, so its not a secure place for your session directory.
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Re: Open-Realty and Plesk [SOLVED]

Unread post by jmackenz »

Any insight on a more secure way of getting the job done?
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Open-Realty and Plesk [SOLVED]

Unread post by breun »

Create a directory for just the application's sessions (writable by 'apache' when using mod_php) and set session.save_path to this location in the domain's Apache configuration (through vhost.conf or .htaccess for instance). If you create this directory in the domain's document root (httpdocs) to avoid having to add the session directory to the open_basedir path, make sure you don't let Apache serve the files in the session directory to the outside world, so set 'Deny from all' for this directory in the Apache configuration.

Since other domains shouldn't have this custom session directory in their open_basedir path, you should now have a more secure setup. An added bonus is that you can now control the lifetime of the sessions for this domain independently of the session lifetimes of other sites by setting things like session.gc_maxlifetime. See http://www.php.net/manual/en/book.session.php for more info on sessions in PHP.
Lemonbit Internet Dedicated Server Management
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Re: Open-Realty and Plesk [SOLVED]

Unread post by jmackenz »

Breun, thanks for the tip, worked like a charm!
Post Reply