This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Extractor
#1

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
Reply
#2

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?
Reply
#3

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.
Reply
#4

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?
Reply
#5

Removed that part from connect.php
But the error still shows.
I see that this piece of code occurs 286 times in other files to, so I have no idea where I should remove the same code?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post

Forum Jump:


Users browsing this thread: 3 Guest(s)