Hey all,
I encountered some issues with xp_publish.php in the 1.4.1 dev version when the gallery is not installed in the root of the http server.
I saw in the file a bunch of location where the url is constructed this way: 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']
I don't know if it's my PHP version (4.3.10) or apache (2.0) but that didn't work for me.
if I replace by something like that all is ok: 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/' . $_SERVER['PHP_SELF']
Hope that helps...
Here is my full modifications in order to make xp_publish.php work for me (cvs diff):
# cvs diff xp_publish.php
Index: xp_publish.php
===================================================================
RCS file: /cvsroot/coppermine/devel/xp_publish.php,v
retrieving revision 1.30
diff -r1.30 xp_publish.php
464c464
< postTag.setAttribute('href', '<?php echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?cmd=add_picture'?>&album=' + selform.album.value);
---
> postTag.setAttribute('href', '<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/' . $_SERVER['PHP_SELF'] . '?cmd=add_picture&album='?>' + selform.album.value);
478c478
< htmluiTag.text = '<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/'?>';
---
> htmluiTag.text = '<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/'?>';
528c528
< $lines[] = '"href"="' . "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?cmd=publish"';
---
> $lines[] = '"href"="' . $_SERVER['HTTP_REFERER'] . '?cmd=publish"';
632c632
< '{POST_ACTION}' => $_SERVER['PHP_SELF'] . '?cmd=create_album',
---
> '{POST_ACTION}' => dirname($_SERVER['REQUEST_URI']) . '/' . $_SERVER['PHP_SELF'] . '?cmd=create_album',
652c652
< '{POST_ACTION}' => $_SERVER['PHP_SELF'] . '?cmd=create_album',
---
> '{POST_ACTION}' => dirname($_SERVER['REQUEST_URI']) . '/' . $_SERVER['PHP_SELF'] . '?cmd=create_album',
895c895
< ?>
\ No newline at end of file
---
> ?>
--Herve.