Posts: 36
Threads: 13
Joined: Jul 2012
The extractor works great as supplied.
Placed the single files in root and it shows exactly what it should do.
However, when I include the php part of example in my website (cms) it does not show the data.
In that case the code doesn't get past the line with $extractor = new extractor($cmtx_path);
I have used the full path as well as the short in both scenarios.
Though it works as you supplied it and likely the failure is in my setup, I would appreciate a hint to get it to work.
Thanks
Posts: 2,890
Threads: 59
Joined: Jun 2010
Did you move the extractor.php file into the same directory as the file that you pasted the PHP part of example.php?
What data are you trying to display? For the Comment Count, Page Rating and Page Rating (Stars) it's important to pass the correct 'cmtx_identifier' as the parameter.
Do you have error reporting turned on in your CMS?
Have
you completed
the interview?
Posts: 36
Threads: 13
Joined: Jul 2012
I have placed both the extractor file and the demo file in the root.
Works great, items display correct.
Copied the part from the demo file in my cms page (that is a root page) with the same paths and it doesn't display anything.
$cmtx_path = 'bin/comm/';
require_once 'extractor.php';
The php error :
Warning: require_once(includes/db/connect.php): failed to open stream: File or map does not exist in in /home/vho22/domains/mydomain.nl/public_html/extractor.php on line 12
Fatal error: require_once(): Failed opening required 'includes/db/connect.php' (include_path='.:/usr/local/lib/php') in /home/vho22/domains/mydomain.nl/public_html/extractor.php on line 12
When I use the full path to connect.php in the extractor.php file as:
/home/vho22/domains/mydomain.nl/public_html/bin/comm/includes/db/connect.php
I get an 'access denied' error.
You're support is appreciated Steven.
Posts: 2,890
Threads: 59
Joined: Jun 2010
Okay, use the full path, and remove the following line from /comm/includes/db/connect.php
PHP Code:
<?php
if (!isset($cmtx_path)) { die('Access Denied.'); }
It should be fine without it.
Have
you completed
the interview?