Sending a Web Page

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.

My remote webpage is still not sending

Postby mvmtravel » 1:19pm, Wed 05 Mar, 2008

Can somebody help me how to send remote page, as mu local page is working fine, pear is installed on my share server, but i am not able to send remove web page. what setting i have to do?
PL Nut
Posts: 15
Joined: 12:13pm, Wed 05 Mar, 2008
Location: Bangkok

Sending a Web Page

Postby colourbomb » 8:56am, Mon 10 Mar, 2008


I've also got a problem with sending a web page, I have had my host install the latest pear, server currently -

[root@web1 ~]# pear list
Installed packages, channel
Package Version State
Archive_Tar 1.3.2 stable
Auth_SASL 1.0.2 stable
Console_Getopt 1.2.3 stable
DB 1.7.13 stable
HTTP 1.4.0 stable
HTTP_Request 1.4.2 stable
Mail 1.1.14 stable
Net_SMTP 1.2.11 stable
Net_Socket 1.0.8 stable
Net_URL 1.0.15 stable
PEAR 1.7.1 stable
Structures_Graph 1.0.2 stable
XML_Parser 1.2.8 stable
XML_RPC 1.5.1 stable

But still when I go to send a message I am getting the error -

Warning: You are trying to send a remote URL, but PEAR::HTTP/Request is not available, so this will fail

Can any one help?


phpList newbie
Posts: 1
Joined: 11:54pm, Sun 09 Mar, 2008

Re: Sending a Web Page

Postby maratonic » 10:27am, Mon 31 Aug, 2009

This thread is rather old by now but still helpful - though I haven't managed to get it to work yet myself...
Installing PEAR, adding the files from the zip to a HTTP directory, checking the include paths in a number of files and checking some apache variables hasn't led me all the way to the solution.

[---EDIT: ignore this section, it ges rid of the error message but I didn't get Request2 to work. See posts below.-----]
However I might be able to give the answer to the previous post, at least how I finally got rid of the red error message. Since the thread was started, HTTP_Request has been replaced by HTTP_Request2. When I made sure the file lists/admin/lib.php checked for the class HTTP_Request2 instead of HTTP_Request, it was all ok. Maybe there was some more file that needed editing, to find out just do
rgrep 'HHTP_Request' /path/to/php
rgrep 'HHTP_Request' /path/to/phplists
and check.
[-----End ignore-----]

NOW, is there anyone who can share the solution with me? I seem to have the same problem as saul11 and morgs, at least I get the same symptoms:
* when trying to send a test message with [URL:some.url] the page output ends after "Message saved"
* when sending with processqueue it says "found 5 users", "Script stage: 4", "Finished, nothing to do" and in the list of messages one message is listed as "in process" and another as "submitted" (none of them are sent).

I have phplist version 2.10.5 and PHP Version 5.2.4-2ubuntu5.4

Apache safe_mode is off, open_basedir is set to 'none' (='no restriction' = nothing that could cause trouble i assume) and apache allows short format for php tags (i.e. "<?" instead of "<?php"), don't remember the variable name now.

What apache settings are cruicial for sending an URL to work? Can someone who got it to work post their phpinfo() here so that I can compare?
In what files do I need to explicitly add
ini_set("include_path", ".:/path/to/HTTP_Request:/path/to/php");
or such?
What solution have I missed? There are some suggestions about removing some line that screws up error reporting from some file but that was for an earlier version years ago, do I still need to do that?

Would really appreciate if you could help me solve this!

Last edited by maratonic on 7:16am, Mon 14 Jun, 2010, edited 1 time in total.
phpList newbie
Posts: 3
Joined: 9:39am, Mon 31 Aug, 2009

Re: Sending a Web Page

Postby maratonic » 3:59pm, Thu 10 Sep, 2009

Update: I've now upgraded to phplist version 2.10.10 and installed PEAR (including Net2 and HTTP_Request2) locally in my /var/www folder too, using go-pear.php. (It was previously only in /usr/share/php.) After that I changed the path to PEAR and edited lists/admin/lib.php to include, and check for, HTTP_Request2 instead of HTTP_Request. But still I can't send using the [URL:], it still hangs at script stage 4 when sending to a list and hangs after "Message saved" when sending a test message.

phpList newbie
Posts: 3
Joined: 9:39am, Mon 31 Aug, 2009

Re: Sending a Web Page

Postby alxr » 9:17am, Thu 13 May, 2010

Moved the HTTP folder containing the Request files etc to under Admin. Fixed. Didnt have to then change any paths etc.

HTTP_request etc was installed under a CPANEL installation. So the default placement of HTTP folder is not where 2.10.10 expects it to be.

Whilst I have installed the latter REQUEST2 package, I am yet to enable it in phplists. REQUEST does the job fine for time being.
Posts: 10
Joined: 8:36am, Thu 13 May, 2010

Re: Sending a Web Page

Postby maratonic » 7:13am, Mon 14 Jun, 2010

Wow, thanks!
I haven't spent any more time wrestling this problem for a while and now I check back and see that someone has new thoughts - and it worked for me too!

I copied the HTTP folder from /usr/share/php (where the PEAR installer put it) to lists/admin and changed back from "Request2" to "Request" in lib.php.

I don't know what it takes to get Request2 to work but seriously I don't give a crap. :D

phpList newbie
Posts: 3
Joined: 9:39am, Mon 31 Aug, 2009

Re: Sending a Web Page

Postby zygo » 9:28am, Wed 04 Aug, 2010

I got pear installed with HTTP_Request(2) in /home/user/php/ (it works well as described here :
I added /home/user/php in the root php.ini with include_path.
I tried either require_once "/home/user/php/HTTP/Request.php" and "/home/user/php/HTTP/Request2.php" in the file admin/lib.php

It doesn't display the red warning anymore, but after saving the message, nothing is fetched and it only displays []

Any phplist ninja to help me ?

I tried the technique in the previous post but it displays a blank page on all my phplist's pages.
phpList newbie
Posts: 1
Joined: 9:01am, Wed 04 Aug, 2010

Re: Sending a Web Page

Postby kiwifella » 11:29pm, Tue 14 Sep, 2010

Kia ora,
So the main reason i want to use PHPlist is so i can set the content of the email from a dynamic URL...
However... it is clear from this thread that this functionality is majorly flawed and doesn't work!? :shock:

(For such a popular script - i'm amazed at how much of a frickin headache PHPList is - things could be so much simpler!)

OK... so i have a solution for everyone :)

My Host uses cPanel - it allows me to install "PHP PEAR packages"... so i installed "HTTP_Request" (as per that little red 'fail' message)... this by default installs into a folder below my root... eg. "installs into: /home/user/php"...

From the work i've done, the problem is to do with the include_path... PHPList does something that magically changes the include_path so the HTTP/Rquest.php file can not be found... so we have to fix that!

only one file needs to be changed in two places... none of this moving/creating duplicate copies of the entire php/pear script library under the list/admin directory

File to be changed = "list/admin/lib.php"
Change1 = @include_once "HTTP/Request.php"; - (approx line 111)
Change2 = require_once "HTTP/Request.php"; - (approx line 590)

comment out the two lines mentioned above (so you can revert back to original if you muck it up)
and replace with the following

change 1
Code: Select all
$origIncludePath = get_include_path();
set_include_path(get_include_path() . ':/home/user/php');

    @include_once 'HTTP/Request.php'; 

set_include_path(get_include_path() . $origIncludePath);


change 2
Code: Select all
$origIncludePath = get_include_path();
set_include_path(get_include_path() . ':/home/user/php');

    require_once "HTTP/Request.php"; 

set_include_path(get_include_path() . $origIncludePath);


change the "/home/user/php" to point to where your HTTP_Request script is - (NOTE: my HTTP_Request file has the structure of "/home/user/php/HTTP/Request.php" - if yours is different then change the reference to it in the @include_once + require_once lines above)

Basically what we are doing above is...
1) set the current include_path as a variable (so we can revert back to it)
2) we overwrite the current include_path so it points to our HTTP_Request script
3) run the Include/require HTTP/Request.php file
4) reset the include_path to what it was originally, so everything else keeps working

I'm not geek enough to know exactly whats going on here - there is probably redundant code in my example, but i don't really care - it works for me and after 8-10hrs of troubleshooting :evil: i don't want to waste anymore of my time !

Hope that prevents someone else wasting their time,

Kiwi Fella.
phpList newbie
Posts: 1
Joined: 10:35pm, Tue 14 Sep, 2010

Re: Sending a Web Page

Postby elalcaudon » 1:51pm, Mon 13 Jun, 2011

Using 2.10.1 - IFRAME method comes back blank.
URL method requires PEAR.
So far the only method that is foolproof is to copy thml into the message to send.
phpList newbie
Posts: 2
Joined: 1:33pm, Mon 13 Jun, 2011

Re: Sending a Web Page

Postby liliplanet » 4:17pm, Thu 06 Oct, 2011

Thank you for this wonderful thread ..

My host installed PEAR via the command line and I've changed my include path in lib.php to HTTP:/request.php (thank you kiwifella)

and yes! it works, able to send [] and [] which arrives perfectly in html email

the problem is when I try to send my own pages (local website) receiving error 'send failed'.

Why would it be able to send other websites and not mine (the above mentioned)?

Would most appreciate any suggestions and thank you.

PL Nut
Posts: 26
Joined: 2:38pm, Tue 31 Aug, 2004
Location: Cape Town

Re: Sending a Web Page

Postby jimlaws » 4:33pm, Sat 29 Dec, 2012

I think IFRAME should end with forward slash.
phpList newbie
Posts: 1
Joined: 8:53am, Thu 27 Dec, 2012


Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest