forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: mlin on November 29, 2003, 07:59:57 am

Title: <?php include 'gallery/index.php'; ?>
Post by: mlin on November 29, 2003, 07:59:57 am
I would like to have my gallery displayed alongside my homepage's main content without using IFRAMES, as shown in this example:
http://www.defencetalk.com/pictures

So I use the following PHP code to include the gallery index on my homepage <?php include 'gallery/index.php'; ?>

However, I am getting errors:

When my homepage is in a DIFFERENT directory as that of the gallery:

Warning: main(include/config.inc.php): failed to open stream: No such file or directory in /home/ml/public_html/www/gallery/include/init.inc.php on line 135

Fatal error: main(): Failed opening required 'include/config.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ml/public_html/www/gallery/include/init.inc.php on line 135

When I put the homepage in the SAME directory as the gallery:

Warning: Cannot modify header information - headers already sent by (output started at /home/ml/public_html/www/gallery/index2.php:7) in /home/mlin/public_html/www/gallery/themes/water_drop/theme.php on line 790

Warning: Cannot modify header information - headers already sent by (output started at /home/ml/public_html/www/gallery/index2.php:7) in /home/ml/public_html/www/gallery/include/functions.inc.php on line 51

Any ideas on how to fix this? Thanks a lot!
Title: <?php include 'gallery/index.php'; ?>
Post by: Joachim Müller on November 29, 2003, 10:06:58 am
well, simply speaking: you can't php-include coppermine! Instead, you'll have to modify the looks of your homepage to fit into the overall theme of coppermine (or change the coppermine theme to look like the rest of your homepage, your choice). If you're not familiar with the errors you got I say don't try experimenting with php-includes at all, since they are most familiar and should already point you into the right direction. If you want to find out about the "why"s, take a deep look at php.net (http://www.php.net/), but in fact you can just forget about the include stuff and try my recommendation from the first paragraph...

GauGau