forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: hschnit on October 23, 2005, 09:07:51 am
-
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.
-
Confrimed - it now works on my set-up:
Apache/1.3.33
php 4.4.0
Mysql 4.0.24
Gallery is not stored in root.
Fixes two problems:
- it generates the correct reg file
- the upload actually works
Tested upload into existing gallery and creation of new gallery.
Fantastic!!
:D
-
Could a dev who actually has WinXP look into this issue please?
-
Committed fixes similar to those suggested above, please test and report back.
-
Now I can login and create albums, but it doesnt upload pictures. I get no error message.
-
not a valid testing report. You appear to be looking for support, although cpg1.4.x currently goes unsupported.
-
No reports - issue appear to have been fixed. Marking thread accordingly.