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!
Integrating Open-Realty into phpWCMS
- Oliver Georgi
- Site Admin
- Posts: 9892
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
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
Oliver
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
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
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!
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!
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