Author Topic: Zufallsbild außerhalb des Scripts  (Read 33958 times)

0 Members and 1 Guest are viewing this topic.

Offline whistler81

  • Newbie
  • *
  • Posts: 30
    • View Profile
cannot add header info?
« Reply #15 on: May 19, 2002, 11:36:38 PM »
wieso bekomme ich diese meldung?
Das Bild wird angezeigt, und diese Meldung erscheint

Warning: Cannot add header information - headers already sent by (output started at /www/htdocs/xyz/scripts/random_img.php:10) in /www/htdocs/xyz/4images/includes/sessions.php on line 129

Warning: Cannot add header information - headers already sent by (output started at /www/htdocs/xyz/scripts/random_img.php:10) in /www/htdocs/yxyz/images/includes/sessions.php on line 130

Liebe Grüße
Clemens

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Zufallsbild außerhalb des Scripts
« Reply #16 on: May 19, 2002, 11:49:01 PM »
Hast Du es so gemacht wie es hier steht? http://www.4homepages.de/forum/viewtopic.php?p=743#743

Der erste Codeabschnitt muss ganz am Anfang der Dateien stehen, also noch vor dem HTML-Code.

Gruß Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline whistler81

  • Newbie
  • *
  • Posts: 30
    • View Profile
Zufallsbild außerhalb des Scripts
« Reply #17 on: May 20, 2002, 10:55:04 AM »
Danke!!
es funktioniert!

Clemens

Offline kaiand1

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Zufallsbild außerhalb des Scripts
« Reply #18 on: June 09, 2002, 10:36:33 AM »
Ich wollte dies auch machen nur bekomme ich anstadt des Bildes folgende Fehlermeldung
Warning: Unable to access /bilder/global.php in /home/www/htdocs/rosis-welt.de/1.php on line 6

Warning: Failed opening '/bilder/global.php' for inclusion (include_path='') in /home/www/htdocs/rosis-welt.de/1.php on line 6

Fatal error: Call to a member function on a non-object in /home/www/htdocs/rosis-welt.de/1.php on line 7
Ich habe die Version 1.5 final
mfg
kai

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Zufallsbild außerhalb des Scripts
« Reply #19 on: June 09, 2002, 10:58:11 AM »
Dein $root_path scheint falsch zu sein. Du musst einen relativen Pfad angeben.

z.B.
$root_path = "bilder/";

Gruß Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline kaiand1

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Zufallsbild außerhalb des Scripts
« Reply #20 on: June 09, 2002, 11:07:23 AM »
ich habe jetzt den absuliuten pfad genommen und auch wie bei deinen beispiel den path eingefügt nur bekomme ich da eine leere seite angezeigt
hier die php datei
<?php
//Relativer Pfad zum 4images-Verzeichnis
$root_path = "/home/www/htdocs/rosis-welt.de/bilder/";

define('ROOT_PATH', $root_path);
include(ROOT_PATH.'global.php');
$random_image = $site_template->clean_template(get_random_image(0,0));
?>
<?php
echo $random_image;
?>

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Zufallsbild außerhalb des Scripts
« Reply #21 on: June 09, 2002, 11:25:52 AM »
Wenn Du Version 1.5 Final verwendest, musst Du diesen Code verwenden:
http://www.4homepages.de/forum/viewtopic.php?p=2776#2776
Gruß Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline urkel

  • Pre-Newbie
  • Posts: 1
    • View Profile
Zufallsbild außerhalb des Scripts
« Reply #22 on: July 02, 2002, 12:16:27 PM »
Guten Tag,

ich habe jetzt bei meiner Galerie Version 1.5 schon mit allen hier aufgeführten Tips und Beispielen versucht, eine php Datei zu erstellen, die ich in meine .shtml Startseite außerhalb des Scripts includen kann.
Leider wird mir  beim Aufrufen der php-Datei nur eine weißer Bildschirm angezeigt, ich erhalte nichtmal eine Fehlermeldung oder so.
Würde sich vielleicht jemand aufopfern, mir eine komplette php Datei zu schreiben, die ich ohne weiteres includen kann? Die relativen Pfadangaben würde ich selbst einfügen.

Vielen Dank für Eure Hilfe!
Jörg

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
Zufallsbild außerhalb des Scripts
« Reply #23 on: July 02, 2002, 03:31:16 PM »
Why don't you try this approach:

http://www.vierstra.com/forum/viewtopic.php?t=37
Thats It !

Offline kralle

  • Newbie
  • *
  • Posts: 23
    • View Profile
Zufallsbild außerhalb des Scripts
« Reply #24 on: July 04, 2002, 04:07:41 PM »
Hallo alle zusammen,

wie funktioniert das denn unter einem WAMP das auf XP aufgesetzt ist ?

Habe folgende PHP Datei probiert:

Code: [Select]

<?php 
$root_path 
"c&#58;/apache/htdocs/home/foto2/"

define&#40;'ROOT_PATH', $root_path&#41;; 
include&#40;ROOT_PATH.'global.php'&#41;; 
$random_image $site_template->clean_template&#40;get_random_image&#40;0,0&#41;&#41;;
?>


<?php 
echo $random_image
?>



und bekomme folgende Fehlermeldung  :?

Code: [Select]

Fatal error: Call to a member function on a non-object in c:\apache\htdocs\home\foto2\includes\functions.php on line 194


Hat einer eine Idee wie ich das hinkriegen könnte ?

Ich benutze 4Images 1.6

l.g.

kralle

Offline Greif-Net

  • Pre-Newbie
  • Posts: 4
    • View Profile
    • http://www.greif-net.com
Zufallsbild außerhalb des Scripts
« Reply #25 on: July 05, 2002, 07:15:40 PM »
Ich bin absolut begeistert von dem Script, aber es ist zum Verzweifeln:
Ich bekomme einfach das Zufallsbild nicht auf einer anderen Seite hin!
ALLES ausprobiert! Hmmm, ansonsten hatte ich noch NIE ein Problem
mit der Installation, Update oder Bedienung.
Wer ist bitte so nett, und hilft mir ein wenig weiter?
Ich danke schon einmal recht herzlich.

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Zufallsbild außerhalb des Scripts
« Reply #26 on: July 05, 2002, 07:56:45 PM »
also auf einen OmniHTTPd(port 80), apache(port 8000), IIS5 (port 10000) funktioniert dieser code:
Code: [Select]

<?php 
//your path Pfad to 4images-directory 
$root_path "g&#58;/httpd/htdocs/4images/";

define&#40;'ROOT_PATH', $root_path&#41;; 
include&#40;ROOT_PATH.'global.php'&#41;; 
include&#40;ROOT_PATH.'includes/sessions.php'&#41;; 
$random_image $site_template->clean_template&#40;get_random_image&#40;0,0&#41;&#41;; 
?>


<?php 
echo $random_image
?>



auf den echten server (linux) mit
Code: [Select]

<?php 
//your path Pfad to 4images-directory 
$root_path "./4images/"

define('ROOT_PATH'$root_path); 
include(
ROOT_PATH.'global.php'); 
include(
ROOT_PATH.'includes/sessions.php'); 
$random_image $site_template->clean_template(get_random_image(0,0)); 
?>


<?php 
echo $random_image
?>

cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Greif-Net

  • Pre-Newbie
  • Posts: 4
    • View Profile
    • http://www.greif-net.com
Zufallsbild außerhalb des Scripts
« Reply #27 on: July 05, 2002, 08:23:40 PM »
Hallo Nicky,

Quote from: Nicky

auf den echten server (linux) mit
Code: [Select]

<?php 
//your path Pfad to 4images-directory 
$root_path "./4images/"

define&#40;'ROOT_PATH', $root_path&#41;; 
include&#40;ROOT_PATH.'global.php'&#41;; 
include&#40;ROOT_PATH.'includes/sessions.php'&#41;; 
$random_image $site_template->clean_template&#40;get_random_image&#40;0,0&#41;&#41;; 
?>


<?php 
echo $random_image
?>



Jetzt funktioniert es!!! Dankeschön!
Habe ich da was übersehen, ich habe die anderen Forenbeiträge zum
Thema doch alle ausprobiert. Naja, manchmal ist es schon komisch.

Bitte noch eine Frage:
Kann ich bestimmen, daß die Zufallsbilder nur aus einer bestimmten Kategorie angezeigt werden, bzw. private Kategorien nicht?

MfG, René

Offline kralle

  • Newbie
  • *
  • Posts: 23
    • View Profile
Zufallsbild außerhalb des Scripts
« Reply #28 on: July 05, 2002, 08:38:33 PM »
Hallo Nicky,

bei mir fluppt es jetzt auch fast.....

Die Seite mit Namen des Images usw. wird angezeigt, aber anstatt dem Vorschaubild ist nur ein Platzhalter zu sehen  :cry:

Hier mal die Eigenschaften des nicht angezeigten Thumbnails:

file:///c:/apache/htdocs/home/foto2/data/thumbnails/8/Carptiger.jpg

Was könnte ich da machen, damit das Imagebild angezeigt wird.....

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Zufallsbild außerhalb des Scripts
« Reply #29 on: July 05, 2002, 10:20:47 PM »
hallo kralle,

du hast recht, war ein blödsinn von mir mit dem vollen pfad ...

wenn dein gallery so vorhanden ist
http://localhost/4images/

und die datei für den zufallsbild befindet sich hier
http://localhost/zufallsbild.php

dann setzte den pfad auf
$root_path = "./4images/";

test: ist heute bis 23:00 online (privat PC)
apache: http://emails.nicky.net:8000/zufallsbild.php
IIS5: http://emails.nicky.net/zufallsbild.php
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi