Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: issues with xp_publish if not in http root.  (Read 6558 times)

0 Members and 1 Guest are viewing this topic.

hschnit

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
issues with xp_publish if not in http root.
« 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'?>&amp;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.

« Last Edit: August 10, 2006, 08:21:33 am by GauGau »
Logged

toreS

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: issues with xp_publish if not in http root.
« Reply #1 on: October 23, 2005, 12:17:51 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: issues with xp_publish if not in http root.
« Reply #2 on: October 23, 2005, 02:57:08 pm »

Could a dev who actually has WinXP look into this issue please?
Logged

Nibbler

  • Guest
Re: issues with xp_publish if not in http root.
« Reply #3 on: November 20, 2005, 10:41:05 pm »

Committed fixes similar to those suggested above, please test and report back.
Logged

kjpuck

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: issues with xp_publish if not in http root.
« Reply #4 on: November 22, 2005, 02:22:11 am »

Now I can login and create albums, but it doesnt upload pictures. I get no error message.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: issues with xp_publish if not in http root.
« Reply #5 on: November 22, 2005, 06:53:51 am »

not a valid testing report. You appear to be looking for support, although cpg1.4.x currently goes unsupported.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: issues with xp_publish if not in http root.
« Reply #6 on: August 10, 2006, 08:21:18 am »

No reports - issue appear to have been fixed. Marking thread accordingly.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 18 queries.