It stopped displaying for some reason! It stopped displaying for some reason!
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

It stopped displaying for some reason!

Started by Fred_Brown, June 19, 2007, 02:55:40 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Fred_Brown

cpmfetch has worked very well for months but all of a sudden returns giberish like this
‹������|ÍjÃ0,,ïy ¡{¼n PÙ9ôZ(ôлY[ª$²úAZ—æíZh½Ì Ã2,ŸbœÈ1ìvŠË¦ZÌ,,µöÒ"')W6Ÿ,...ÂóÞKÇœ�1{ÝÌ)@v‰Sík&¼ú€Ö4ÙåSNµßw݃¼Í+¬µÌÿ MK¨°dJ¨|lïîÝ¦ñéå<¶]{hž_ÏòûK<')¸—¿/Ø3™¿¥€Aj*kÚôÍa¼Të?|´â1•¨€õÊ6$«¯"nñ ��ÿÿ�åÅ4'/��
!

I'm sure I've mucked something up but I can't solve the issue. Here is the code in the .htm page;

<!--#include virtual="./photos/cpmfetch/testing1.php" -->

Here is the .php file;

<?php
include "./cpmfetch.php";
$objCpm = new cpm("./cpmfetch_config.php");
$objCpm->cpm_viewRandomMedia(1,1,array( 'subtitle' => '%t' , 'cellstyle' => 'gallerytext' , 'imagestyle' => 'a:link'  ));
$objCpm->cpm_close();
?>

I'm sure this is my blunder and has nothing to with cpmfetch, a great tool! I'm sure I'm missing something obvious!

vuud

Quote from: Fred_Brown on June 19, 2007, 02:55:40 AM
cpmfetch has worked very well for months but all of a sudden returns giberish like this
‹������|ÍjÃ0,,ïy ¡{¼n PÙ9ôZ(ôлY[ª$²úAZ—æíZh½Ì Ã2,ŸbœÈ1ìvŠË¦ZÌ,,µöÒ"')W6Ÿ,...ÂóÞKÇœ�1{ÝÌ)@v‰Sík&¼ú€Ö4ÙåSNµßw݃¼Í+¬µÌÿ MK¨°dJ¨|lïîÝ¦ñéå<¶]{hž_ÏòûK<')¸—¿/Ø3™¿¥€Aj*kÚôÍa¼Të?|´â1•¨€õÊ6$«¯"nñ ��ÿÿ�åÅ4'/��
!

I'm sure I've mucked something up but I can't solve the issue. Here is the code in the .htm page;

<!--#include virtual="./photos/cpmfetch/testing1.php" -->

Here is the .php file;

<?php
include "./cpmfetch.php";
$objCpm = new cpm("./cpmfetch_config.php");
$objCpm->cpm_viewRandomMedia(1,1,array( 'subtitle' => '%t' , 'cellstyle' => 'gallerytext' , 'imagestyle' => 'a:link'  ));
$objCpm->cpm_close();
?>

I'm sure this is my blunder and has nothing to with cpmfetch, a great tool! I'm sure I'm missing something obvious!

Dude...

Wierd...

Did you try running the php file directly?

Did you change encoding in cpg or something?

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Fred_Brown

Quote from: vuud on June 19, 2007, 03:39:58 AM
Dude...

Wierd...

Did you try running the php file directly?

Did you change encoding in cpg or something?



- The first thing I did was update my version of cpmfetch and so it's directory changed to inside /photos
- When running the install, everything worked out great, I could see the four random pictures and I can run
the php file directly. This is a good thing!
- I made sure cpg (Coppermine Photo Gallery 1.4.9) config page had Character encoding utf-8
- I noted that with cpmfetch version changes to 2.0.0, I would have to change the path to run the code from my home
page but I wanted to leave the home page with a .htm extention so I am using something like

<!--#include virtual="./photos/cpmfetch/test.php" -->

and test.php would look like the following because it's in the "/photos/cpmfetch" directory
<?php
  include "./cpmfetch.php";
  $objCpm = new cpm("./cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

- To get it to work before, I remember setting a user defined Apache extention handler ( .htm   server-parsed)
which created the necessary .htacess file with the line "AddHandler server-parsed .htm" in my home directory. I tested this <!--#echo var="DATE_LOCAL" --> in the .htm file and it returns the date properly, so I know the SSI's work.
- I remember that the documentation said that concerning SSI and cpmfetch, "XBitHack On" could be added to the .htaccess file. On Off makes no difference.
- A permission thing? Why would the cpmfetch install.php work and not my test.php? Anyway, the files have the same permissions; -rwxr-xr-x
- No, I figure I'm doing something silly and missing something obvious




vuud

Quote from: Fred_Brown on June 19, 2007, 10:26:14 PM
- The first thing I did was update my version of cpmfetch and so it's directory changed to inside /photos
- When running the install, everything worked out great, I could see the four random pictures and I can run
the php file directly. This is a good thing!
- I made sure cpg (Coppermine Photo Gallery 1.4.9) config page had Character encoding utf-8
- I noted that with cpmfetch version changes to 2.0.0, I would have to change the path to run the code from my home
page but I wanted to leave the home page with a .htm extention so I am using something like

<!--#include virtual="./photos/cpmfetch/test.php" -->

and test.php would look like the following because it's in the "/photos/cpmfetch" directory
<?php
  include "./cpmfetch.php";
  $objCpm = new cpm("./cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

- To get it to work before, I remember setting a user defined Apache extention handler ( .htm   server-parsed)
which created the necessary .htacess file with the line "AddHandler server-parsed .htm" in my home directory. I tested this <!--#echo var="DATE_LOCAL" --> in the .htm file and it returns the date properly, so I know the SSI's work.
- I remember that the documentation said that concerning SSI and cpmfetch, "XBitHack On" could be added to the .htaccess file. On Off makes no difference.
- A permission thing? Why would the cpmfetch install.php work and not my test.php? Anyway, the files have the same permissions; -rwxr-xr-x
- No, I figure I'm doing something silly and missing something obvious

PM Me (or post here):
a link to the index page
a link to the test.php

As for the date - you are correct that it shows SSI is working, but it can be limited by the configuration of the server to what exactly is allowed.  In any case, it should not cause garbled output to be displayed. 

The XBitHack is preferred (if allowed) over telling the server to parse every htm file that comes up.

Anyway - none of this explains your issue, so post the stuff above and we shall see


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

Quote from: Fred_Brown on June 19, 2007, 10:26:14 PM
- The first thing I did was update my version of cpmfetch and so it's directory changed to inside /photos
- When running the install, everything worked out great, I could see the four random pictures and I can run
the php file directly. This is a good thing!
- I made sure cpg (Coppermine Photo Gallery 1.4.9) config page had Character encoding utf-8
- I noted that with cpmfetch version changes to 2.0.0, I would have to change the path to run the code from my home
page but I wanted to leave the home page with a .htm extention so I am using something like

<!--#include virtual="./photos/cpmfetch/test.php" -->

and test.php would look like the following because it's in the "/photos/cpmfetch" directory
<?php
  include "./cpmfetch.php";
  $objCpm = new cpm("./cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

- To get it to work before, I remember setting a user defined Apache extention handler ( .htm   server-parsed)
which created the necessary .htacess file with the line "AddHandler server-parsed .htm" in my home directory. I tested this <!--#echo var="DATE_LOCAL" --> in the .htm file and it returns the date properly, so I know the SSI's work.
- I remember that the documentation said that concerning SSI and cpmfetch, "XBitHack On" could be added to the .htaccess file. On Off makes no difference.
- A permission thing? Why would the cpmfetch install.php work and not my test.php? Anyway, the files have the same permissions; -rwxr-xr-x
- No, I figure I'm doing something silly and missing something obvious

Well Fred,  I give up.  I took a look at your code and that all looks fine.  It does seem as though the SSI is executing, so its not an XBITHack or handler problem.

I did some googling about this and some people say you cannot do an SSI on a php file, but others say you cant.  Still others say it is a server configuration thing. 

So at this point, I am going to note that the php file works fine directly.  I would take this up with your provider, or someone who is better at apache ssi / php stuff than I am.  I have made it work for me and others before, so it was possible at one time.  Who knows.

If you can, post back a solution if you find one.

Sorry

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco