Page 1 of 1

Integrating Open-Realty into phpWCMS

Posted: Sun 4. Sep 2005, 03:04
by sft233
Okay I am trying to integrate the real estate script Open-Realty into phpWCMS because Open-Realty has pretty awful SEO capabilities, yet that is pretty much its only flaw. Also, I will be able to create content easier this way. So, basically my plan was to just include the Open-Realty pages like so:

[PHP]

include 'open/index.php'; // My Open-Realty directory

[/PHP]

and of course... the error message

Notice: A session had already been started - ignoring session_start() in /home/vbbkbret/public_html/open/index.php on line 33

Fatal error: Call to a member function on a non-object in /home/vbbkbret/public_html/open/include/misc.inc.php on line 153


So basically, I can't find a way to include the page without making them interfere. It seems to be a clash between the two scripts. I also tried using {PHP:open/index.php}, but I believe they are executed in the same function? so they still conflict.

Is there any other practical way to include the other php pages into phpWCMS without errors, aside from iFrame because it does not seem to be SEO-friendly at all...

Thank you in advance!

Posted: Sun 4. Sep 2005, 08:33
by Oliver Georgi
as the error message notices: you script try to re-open a session again. But phpwcms did so eralier. This is the problem you have. So what you have to do is fix that script to use phpwcms' session or to include it by using {URL:...} is an alternative way. The better correct way to include own php scripts is {PHP:...} - not [PHP][/PHP]. [PHP][/PHP] is for additional logic if neccessary...

Oliver

Posted: Thu 5. Jan 2006, 19:49
by tarheit
FYI, I've found it necessary to add the following lines to index.php to get open realty to work correctly under phpWCMS:
global $config, $conn, $css_file;
require_once('or/include/common.php');

I just added them to the beginning of the file. Then in the content of the phpwcms page I can just do {php:or/index.php} Of course I have openrealty setup to use the cms templates.

-Tim

Posted: Mon 27. Feb 2006, 16:14
by Diana_M
Hello,
I tried the fix you recommend above ( global $config, $conn, $css_file;
require_once('or/include/common.php'); ) and got the following error message:

Warning: main(or/listings/include/common.php): failed to open stream:
No such file or directory in /home/oei/public_html/index.php on line
46

Fatal error: main(): Failed opening required
'or/listings/include/common.php'
(include_path='.:/usr/lib/php:/usr/local/lib/php') in
/home/oei/public_html/index.php on line 46


I'm no php wiz so I am at a loss. Any help you can offer would be greatly appreciated!

Posted: Mon 27. Feb 2006, 21:13
by juergen
Seems like CHMOD 777 to or/listings/include/common.php is missing ?

Posted: Tue 28. Feb 2006, 02:35
by DeXXus
Or make sure "config.inc.php" has correct path:

Code: Select all

$phpwcms['DOC_ROOT']          = '/home/oei/public_html';
//$phpwcms['DOC_ROOT']          = $_SERVER['DOCUMENT_ROOT']; //or try Server Variable