Send a webpage that is local fails [solved]

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

Send a webpage that is local fails [solved]

Postby liliplanet » 8:09am, Mon 10 Oct, 2011

Hi,

Sending an embedded remote url [URL:http://yahoo.com] or [URL:http://cnn.com] works perfectly and arrives beautifully in email.

but trying to send any pages from my local host (website) fails

1. PHPlist installation = 2.10.17
2. Pear package is installed at /usr/local/cpanel/3rdparty/lib/php/HTTP/Request.php

Changes have been made to list/admin/lib.php as follows as per http://forums.phplist.com/viewtopic.php?f=6&t=2658&start=75

replaced @include_once "HTTP/Request.php"; - (approx line 111) with ...

Code: Select all
$origIncludePath = get_include_path();
    set_include_path(get_include_path() . ':/usr/local/cpanel/3rdparty/lib/php');

    @include_once 'HTTP/Request.php';

    set_include_path(get_include_path() . $origIncludePath);


replaced require_once "HTTP/Request.php"; - (approx line 590) with ..

Code: Select all
$origIncludePath = get_include_path();
    set_include_path(get_include_path() . ':/usr/local/cpanel/3rdparty/lib/php');

    require_once "HTTP/Request.php";

    set_include_path(get_include_path() . $origIncludePath);


added the following to config.php

Code: Select all
 ini_set('include_path',ini_get('include_path').':/usr/local/cpanel/3rdparty/lib/php');


yet somehow it will not retrieve a webpage from the localhost, only external websites :?:

Would most appreciate any suggestions, and thank you!
Last edited by liliplanet on 4:29pm, Mon 10 Oct, 2011, edited 3 times in total.
liliplanet
PL Nut
 
Posts: 26
Joined: 2:38pm, Tue 31 Aug, 2004
Location: Cape Town

Re: cannot send webpage from localhost, remote urls work per

Postby liliplanet » 3:27pm, Mon 10 Oct, 2011

I seem to have found a similar problem in 2006 :)

Sending local URL= http://mantis.phplist.com/view.php?id=7410

well, basically you'd have to go to the machine and try to load the site, eg "wget http://site.eg" [^]

if that doesn't load, you'd need to put something in your hosts file (/etc/hosts) to fool the machine to think that the site is somewhere else.


http://mantis.phplist.com/view.php?id=7410

When sending a webpage (formula [URL:http://www.mysite.eg [^]]) that is local, i.e. on the same domain as where PHPList is installed, all emails fail. The same messages go out fine when processing the queue manually.


Could the following perhaps be the problem?

SOLVED:

The page I included has a compressed .js and .css file. If you disable cache for the page you want to send, all is good :D
liliplanet
PL Nut
 
Posts: 26
Joined: 2:38pm, Tue 31 Aug, 2004
Location: Cape Town


Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest