forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Nielsk on January 15, 2007, 11:41:19 pm

Title: Message: an error occurred while processing this directive
Post by: Nielsk on January 15, 2007, 11:41:19 pm
Hi,
I've read the docs, the forum and used the searchtool. But I can't find out what's wrong...
I'm trying to add some random images to my site. Made the following steps:

- The cftest is running properly: www.nielsenjose.nl/cpmfetch/cftest.php (http://www.nielsenjose.nl/cpmfetch/cftest.php)
- The randomimages.php is running properly: http://www.nielsenjose.nl/randomimages.php (http://www.nielsenjose.nl/randomimages.php)
- But on my site www.nielsenjose.nl (http://www.nielsenjose.nl), the message "an error occurred while processing this directive" shows up.

- cpmfetch.php is in the cpmfetch folder (which is on the root)
- randomimages.php is on the root
- the CPG folder called gallery is also on the root

Used code in randomimages.php
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>


Used code in index.shtml
Code: [Select]
<!--#include virtual="/randomimages.php" -->
Also tried this (and several other options), but also didn't work either
Code: [Select]
<!--#include virtual="./randomimages.php" -->
Don't know if it's of any use, but adding a .htaccess file to my root with
Options +Includes
XBitHack on
gave an internal sever warning from my host....

It feels like being so close to the answer but really don't having a clue...  ???

Title: Re: Message: an error occurred while processing this directive
Post by: vuud on January 16, 2007, 07:50:40 pm
Hi,
I've read the docs, the forum and used the searchtool. But I can't find out what's wrong...
I'm trying to add some random images to my site. Made the following steps:

- The cftest is running properly: www.nielsenjose.nl/cpmfetch/cftest.php (http://www.nielsenjose.nl/cpmfetch/cftest.php)
- The randomimages.php is running properly: http://www.nielsenjose.nl/randomimages.php (http://www.nielsenjose.nl/randomimages.php)
- But on my site www.nielsenjose.nl (http://www.nielsenjose.nl), the message "an error occurred while processing this directive" shows up.

- cpmfetch.php is in the cpmfetch folder (which is on the root)
- randomimages.php is on the root
- the CPG folder called gallery is also on the root

Used code in randomimages.php
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>


Used code in index.shtml
Code: [Select]
<!--#include virtual="/randomimages.php" -->
Also tried this (and several other options), but also didn't work either
Code: [Select]
<!--#include virtual="./randomimages.php" -->
Don't know if it's of any use, but adding a .htaccess file to my root with
Options +Includes
XBitHack on
gave an internal sever warning from my host....

It feels like being so close to the answer but really don't having a clue...  ???

If you are using .shtml and your server recognizes it as a SSI, then you do not need the xbit hack.

Should work, unless your path is wrong in there, or your ISP does not allow includes... but i doubt they would allow ssi and not allow includes.  I've been wrong before though...



Title: Re: Message: an error occurred while processing this directive
Post by: Nielsk on January 18, 2007, 11:34:50 pm
To me, the path seems to be right. I will ask them and will write their answer here.

Maybe someone around who has had the same problem?

Niels
Title: Re: Message: an error occurred while processing this directive
Post by: Nielsk on January 25, 2007, 02:51:34 pm
Ok, the answer.
My ISP does support SSI, but says that I cannot include PHP pages
Quote
includer are not supported in PHP

They say,
Quote
you need to rename the file that you include via SSI needs to be named .htm and the file which include the file needs to be named .shtml. As of 5.2.0 there is a new "knob" in PHP to disable inclusion of remote files, allow_url_include. The new default is set to off i.e. remote files cannot be included. It is still possible to open remote files, just not to include and execute remote code.

It's like abracadabra to me, any tips on what to do and what to change are more then welcome!

Title: Re: Message: an error occurred while processing this directive
Post by: vuud on January 25, 2007, 07:01:01 pm
Ok, the answer.
My ISP does support SSI, but says that I cannot include PHP pages
They say,
It's like abracadabra to me, any tips on what to do and what to change are more then welcome!

If you have a really limited requirement, such as a single random photo, you can use an img tag and cfimageget...

Otherwise, I think your only option would be to rename all your site to .php files instead of html.

Sorry I don't have anything better for you...