Using Random Block on a standalone PHP webpage

clarke1866
clarke1866's picture

Joined: 2004-06-05
Posts: 4
Posted: Sat, 2004-06-05 23:12

Greetings all,

First time poster, long time lurker. Anyway, I have a problem with the random module at my site and was hoping someone can clue me in as to whats going down. The problem:

Block random works fine when placed in its own dir (example: http://gallery.maxpower.ca/block-random.php)

Block random works fine when placed in an adjacent dir (with the $GALLERY_BASEDIR properly defined) Example: www.maxpower.ca/block-random.php.

Block random works, with errors when called from another php file. Example,

<?php
require 'block-random.php';
?>

The errors are:

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /homepages/blah/htdocs/maxpower/123.php:6) in /homepages/blah/htdocs/gallery/session.php on line 60

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /homepages/blah/htdocs/maxpower/123.php:6) in /homepages/blah/htdocs/gallery/session.php on line 60

Having already review the board some, I have found that this error is related to spaces in the config.php or something. However, since gallery works fine on its own, I know its something that I'm doing. Anyway, does any one have and idea what to do to fix this?

Essentially, I would like a block random standalone module for php pages (no use of java)

Cheers,

Clarke

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2004-06-06 04:53

Try:
<?php @include("http://www.maxpower.ca/block-random.php"); ?>or without the @

Dave

 
clarke1866
clarke1866's picture

Joined: 2004-06-05
Posts: 4
Posted: Sun, 2004-06-06 16:56

that did it! Thanks dave! Now I just have to figure out why the page won't load in Explorer, but will in mozilla.... very strange! But that is for another forum .....

clarke

www.maxpower.ca