Author Topic: paths are incorrect... how to fix?  (Read 5186 times)

0 Members and 1 Guest are viewing this topic.

Offline hanue

  • Pre-Newbie
  • Posts: 8
    • View Profile
paths are incorrect... how to fix?
« on: February 11, 2003, 03:38:49 PM »
Hey,
I have looked around for the english version of this solution but haven't found it. When I send an ecard from my gallery site the email it sends has a link that doesn't work. Everything in the link is fine except the port.

See I have to run my site on a port other than 80 and I put that in the path or url when installing. Somehow the email gets the port twice and I can't find out where it's getting duplicated.

My question is: What files contain any settings for paths so I can edit them accordingly. My blind eyes don't seem to locate where this port comes in.

PM or email me if you want a link to my site to see it for yourself. Thanks for you help!!  :roll:
Hanue

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
paths are incorrect... how to fix?
« Reply #1 on: February 11, 2003, 07:01:32 PM »
in /includes/constants.php try to add this line:
Code: [Select]
define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline hanue

  • Pre-Newbie
  • Posts: 8
    • View Profile
Nope didn't work
« Reply #2 on: February 12, 2003, 05:05:06 AM »
Unfortunately, I saw the post that recommend this I and I tried it... to no avail... I PM'd you the URL and email snippet for your viewing...

Thanks for the help!  :oops:
Hanue

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
paths are incorrect... how to fix?
« Reply #3 on: February 12, 2003, 07:21:54 PM »
it's really strange, I have set my server listen on port 801, then I sent ecard to myself, and it came with double port number...then I uncoment that code in constants.php and got email with correct url/port .
but, anyway, I found out why it does doble port, because 4images checking only port 80 (default) and 443 (SSL). then it checking if $HTTP_SERVER_VARS['HTTP_HOST'] has the server URL...if it does, then it uses it, if not, then uses: getenv("SERVER_NAME"), then it add port (if it found from first step). but, here is why it shows double port:
$HTTP_SERVER_VARS['HTTP_HOST'] - includes port number, but getenv("SERVER_NAME") - doesnt...

so, here is the fix for u:
open global.php
Find:
Code: [Select]
 $script_url .= $port ;
replace with:
Code: [Select]
 $script_url .= (empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $port : "";
that should work. if it still doesnt work, then just comment that line.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline hanue

  • Pre-Newbie
  • Posts: 8
    • View Profile
your solution werks
« Reply #4 on: February 13, 2003, 06:24:02 AM »
Hey thanks V@no!
The Ecard email contains the correct URL now.
Many props to you!  :P
Hanue

Offline JackSilb

  • Pre-Newbie
  • Posts: 5
    • View Profile
    • http://www.4wdtrips.net
ecard wrong URL
« Reply #5 on: March 24, 2003, 06:42:47 AM »
Hey that worked for me big time. Thank you.

I played so much with my server trying to solve this problem.

Oh boy, I should have been reading this before ...
 :oops:

-JACK