1
sblackwell
XHLD, fsockopen don't work with PHP 5.04
  • 2005/8/31 3:40

  • sblackwell

  • Just popping in

  • Posts: 9

  • Since: 2005/8/23


HI,

Been troubleshooting XHLD on XOOPS 2.2.2 and PHP 5.04, Fedora 4. I get the following error when trying to hook up to any RSS feeds:

Could not open file: http://news.google.com/?output=rss
Snoopy status=connection failed (13)

PHP debug output provides:
Warning [PHP]: fsockopen() [function.fsockopen]: unable to connect to news.google.com:80 (Permission denied) in file class/snoopy/Snoopy.class.php line 1126

In researching fsockeopen, I notice in the PHP 5 change log the following:

Improved the streams support: (Wez, Sara, Ilia)
Improved performance of readfile(), fpassthru() and some internal streams operations under Win32.
stream_socket_client() - similar to fsockopen(), but more powerful.

It appears that XHLD relies on fsockopen(), but it no longer exists in PHP 5.

The obvious answer would be to downgrade PHP to 4.x, but have you ever tried that in Fedora 4? There are so many dependencies that I am afraid of blowing everything to crap in the meantime. Not to mention, I am not sure how to actually go about it.

Any suggestions?

Thanks!
Steve

2
hyperpod
Re: XHLD, fsockopen don't work with PHP 5.04
  • 2005/8/31 3:48

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


Thats funny...

Im using XLHD with great success...

My host decided to cut off use of fopen(url) for security reasons, so now I cannot use XOOPSHeadlines, since it doesnt use fsockopen.


The fact that XLHD uses fsockopen is wonderful... I can still use RSS on my more secure server :)


Honestly, could you state the reason why you need PHP5.

PHP5 is new and breaks many PHP scripts being used currently, including XOOPS. XOOPS 2.4 should support PHP5, although that will be in the future.


I would recommend using PHP4... you will solve many, many issues.


Best Regards,
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

3
sblackwell
Re: XHLD, fsockopen don't work with PHP 5.04
  • 2005/8/31 13:25

  • sblackwell

  • Just popping in

  • Posts: 9

  • Since: 2005/8/23


Sure,

Read my post again. PHP5 comes standard with Fedora 4. And, all the associated modules come installed as well (LDAP, ODBC, MYSQL, etc.)

I don't WANT to use PHP5, but I am not sure that uninstalling is really an option. If I were more advanced, I would probably try. However, I am not sure how to even attempt it.
Steve

4
Mithrandir
Re: XHLD, fsockopen dont work with PHP 5.04

Quote:
It appears that XHLD relies on fsockopen(), but it no longer exists in PHP 5.

Yes it does.

Quote:
Warning [PHP]: fsockopen() [function.fsockopen]: unable to connect to news.google.com:80 (Permission denied) in file class/snoopy/Snoopy.class.php line 1126

For some reason it is unable to connect to news.google.com:80 because it isn't permitted to... but I don't think it is because PHP5 doesn't support fsockopen().

Quote:

PHP5 is new and breaks many PHP scripts being used currently, including XOOPS. XOOPS 2.4 should support PHP5, although that will be in the future.

XOOPS has supported PHP5 since 2.0.10

Not all modules do, though.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

5
sblackwell
Re: XHLD, fsockopen dont work with PHP 5.04
  • 2005/8/31 14:45

  • sblackwell

  • Just popping in

  • Posts: 9

  • Since: 2005/8/23


Quote: For some reason it is unable to connect to news.google.com:80 because it isn't permitted to... but I don't think it is because PHP5 doesn't support fsockopen().

>>> If that is the case, it cannot connect to ANY RSS or ATOM feed. I have tried 20 or so and there is not a feed that works.

Also, I cannot find any reference to fsockopen() ANYWHERE in PHP5, and the changelog listed above leads me to believe that it was replaced. Can you tell me how you know it was not replaced? I would like to know, as it would help me figure out why this is not working.

Or, if some great Fedora 4 guru could help, tell me how to downgrade to PHP4.x!

Thanks :)
Steve

6
hyperpod
Re: XHLD, fsockopen dont work with PHP 5.04
  • 2005/8/31 14:51

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


Quote:

XOOPS has supported PHP5 since 2.0.10

Not all modules do, though.



That's good to know.

Do you know if the module packs for XOOPS 2.2+ all work under PHP5?
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

7
sblackwell
Re: XHLD, fsockopen dont work with PHP 5.04
  • 2005/8/31 17:01

  • sblackwell

  • Just popping in

  • Posts: 9

  • Since: 2005/8/23


Well, I successfully downgraded from PHP5 to PHP4 and XHLD works perfectly. Not sure why, but that is the situation.
Steve

8
hyperpod
Re: XHLD, fsockopen dont work with PHP 5.04
  • 2005/8/31 17:27

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


Steve wrote:
Quote:

Well, I successfully downgraded from PHP5 to PHP4 and XHLD works perfectly. Not sure why, but that is the situation.


That is good to hear.

I like XHLD... Its been running great on www.PSPFocus.com so far.


Cheers,
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

Login

Username:
Password:

Lost Password? Register now!

Who's Online

56 user(s) are online (27 user(s) are browsing Support Forums)


Members: 0


Guests: 56


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits