Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues
Author Message
themadhacker
Worker
Worker


Joined: May 30, 2006
Posts: 100

PostPosted: Thu Mar 27, 2008 6:27 pm Reply with quote

I am having issues with custom blocks not working any more. They used to work fine but then stopped all of a sudden. The reason I said "kind-of" in the subject line is because I think it is related to something my host has done to the cPanel box.

My symptoms are that any custom block such as an RSS feed or perhaps just a link to a server stats page(ie Icecast server) now fails.

I havent noticed that any modules stopped working...its just the blocks.

Again...I am thinking it has to be something that my host has done or removed(such as a package or library) that is causing this. I am running php v5.2.5 and everything looks like its there but I may be overlooking something. I also say this because I have these same problems on 3 different versions of RN on different domains on my reseller account.

Any ideas on where to look or what to ask my host?

Thanks!
 
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Thu Mar 27, 2008 6:52 pm Reply with quote

How about some details or a link?

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Thu Mar 27, 2008 7:00 pm Reply with quote

Sure does sound like your host has disabled PHP's fopen() and possibly other remote connection type functions.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
themadhacker
PostPosted: Thu Mar 27, 2008 7:53 pm Reply with quote

kguske wrote:
How about some details or a link?


link to where? I have disabled the blocks on my site so going there doesnt show any content that doesnt work.

montego wrote:
Sure does sound like your host has disabled PHP's fopen() and possibly other remote connection type functions.


Here is the details of my php config

Code:


montego here... not good to show all of this in an open forum so I have removed.

Other admins/moderators, if you want to take a look I have saved the settings... just request.
 
themadhacker
PostPosted: Thu Mar 27, 2008 7:58 pm Reply with quote

Also...if either one of you wanna take a look at my info.php file....I can PM you the URL.

Id rather not post that in public view.

Thanks again.
 
montego
PostPosted: Fri Mar 28, 2008 7:23 am Reply with quote

themadhacker, I removed your details above. I noticed the fopen has not been disabled. Interesting.

I would ask your host as to what they changed rather than us shooting in the dark... even though we have partially functional infrared goggles.
 
themadhacker
PostPosted: Fri Mar 28, 2008 7:47 am Reply with quote

montego,

My situation is this. My host is in reality a friend of mine that owns a local wireless ISP. He has the cPanel boxes connected to his OC3 backbone and primarily uses it for giving his customers their free webpage.

Saying that...he doesnt have alot of experience adminning cPanel and before I posted on this site I spoke with him about what he changed that could have caused it. He replied that the only things he has changed recently was the following...

Changed from maildir to inbox
Upgraded to php 5.2.5
Set php to run in safe mode(disabling the "nobody" user from running scripts)

However, he changed php mode back after I let him know that safe mode was causing some issues. I still thought that it had to be something to do with that.

If there was anything else done other than that, he failed to remember to mention it.

I would just move my reseller account to another hosting provider. But since this is my friend I am getting a really good price for it and I hate to spend more money than I have to since I dont host my sites for profit in the first place.

Anything more you can add as far as suggestions is appreciated. And I did not think about posting just the config as being a no-no since it didnt have any IP information and basically should be a default config(as far as I know).

Thanks again


Last edited by themadhacker on Fri Mar 28, 2008 3:45 pm; edited 1 time in total 
montego
PostPosted: Fri Mar 28, 2008 8:01 am Reply with quote

Safe mode would definitely have killed it I think. The upgrade to PHP 5.2.5 could also have added / changed some settings with regards to remote connections or remote inclusions. Since you now know which blocks are causing the issue, you need to review the code to see what functions they are calling, especially ones where you see a remote IP address or other URL in the function call. Bet you dollar to donuts one of these functions are disabled.
 
montego
PostPosted: Fri Mar 28, 2008 8:19 am Reply with quote

Ok, just saw what you PM'd me and I think this might be causing the issue:

allow_url_include

You may need to turn that on. But, just to confirm, still check those blocks for any kind of remote file inclusion.

I think you can get rid of that file now.
 
themadhacker
PostPosted: Fri Mar 28, 2008 11:51 am Reply with quote

Thanks so much!

I will do some digging on the block code over the weekend and will email my friend to turn that on and see what happens.

Also...just to mention. Any custom block, for example a default RSS custom block, wont work.

So if I go into the adminCP and go to Blocks....then create new....and just set a URL to an RSS feed....its not gonna work. It says that there is a problem with the feed or whatnot. I know that its not a problem because it worked all along. So does that give you any ideas of where for me to look first?

Thanks
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Fri Mar 28, 2008 2:26 pm Reply with quote

Yes that is correct, if you upgrade PHP from a pre 5.x. version in WHM/cPanel it fails to add a couple of settings in the php.ini which causes a failure when including remote files.

If you can dump the content of your block code to a text file and PM me the link to it, I could take a look.
 
View user's profile Send private message Send e-mail
themadhacker
PostPosted: Fri Mar 28, 2008 3:28 pm Reply with quote

Guardian2003 wrote:
Yes that is correct, if you upgrade PHP from a pre 5.x. version in WHM/cPanel it fails to add a couple of settings in the php.ini which causes a failure when including remote files.

If you can dump the content of your block code to a text file and PM me the link to it, I could take a look.


Ok...heres a little more info.

When creating a custom block with the Blocks AdminCP (RN 2.20.01) and just try to use the default block creation for an RSS feed, it doesnt work. Just to save you time from looking it up on your personal box here is the code(Im posting it because it is part of standard RN with no mods done by me.) And I am Guessing that this is the block nuke uses for when you create a custom block with the blocks editor in AdminCP

Code:


<?php
/************************************************************************/
/* nukeFEED
/* http://www.nukeSEO.com
/* Copyright © 2007 by Kevin Guske
/************************************************************************/
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");
}
$block_module = 'Feeds';
global $module_file, $fid, $type, $name;
if(!isset($module_file)) $module_file='modules';
if (empty($fid)) $fid = 0;
if (empty($type)) $type = '';
if (!defined('nf_CONVERTENCODING')) define('nf_CONVERTENCODING',true);

@require_once('includes/nukeSEO/nukeFEED.php');
seoGetLang($block_module);
$feeds = getFeeds();
$content = '';
   if($feeds)
   {
     $lastcontentname = '';
    foreach ($feeds as $blockFid => $feed)
    {
      if ( $fid>0 and $name == $block_module and $type == 'HTML' and nf_CONVERTENCODING and function_exists('mb_convert_encoding') )
      {
        $feed['title'] = mb_convert_encoding($feed['title'], 'UTF-8');
        $feed['name'] = mb_convert_encoding($feed['name'], 'UTF-8');
        $feed['desc'] = mb_convert_encoding($feed['desc'], 'UTF-8');
      }
      $title        = $feed['title'];
      $contentType  = $feed['content'];
      $contentname  = $feed['name'];
      $order        = $feed['order'];
      $howmany      = $feed['howmany'];
      $level        = $feed['level'];
      $lid          = $feed['lid'];
      $desc         = $feed['desc'];
      $active       = $feed['active'];
      $fBAddress    = $feed['feedburner_address'];
#      $securitycode = $feed['securitycode'];
#      $cachetime    = $feed['cachetime'];
     
      if ($contentname != $lastcontentname)
      {
        if ($lastcontentname != '') $content .= '<br />';
        $lastcontentname = $contentname;
        $content .= '<strong>'.$contentname.'</strong><br />';
      }
         if ($title==null || $title=='') $title='&nbsp;';
      $content .= '<a href="'.$module_file.'.php?name='.$block_module.'&amp;fid='.$blockFid.'&amp;type=HTML" title="'._FEED_PREVIEW.'">'.$title.'</a><br />';
    }
   }
?>


Here is a custom block that I created without the AdminCP on a basic phpNuke 7.4 install. There is no server specific stuff here other than my icecast server address which is published anyway...also the icecast server is NOT part of my cPanel box. Its a totally seperate box that I own and admin BUT is on the same OC3 as the cPanel box)

Code:


<?php
// Icecast Server Status Block
if (eregi("block-Icecast_Status.php",$PHP_SELF)) {
  Header("Location: index.php");
  die();
}
?>
<?php
$content .= "<center>";
$content .= file_get_contents("http://stream.supertraxxradio.com:8000/block-status.xsl");
$content .= "</center>";
?>


Whatever changes that have been done must have caused this to break. Because both of these worked perfectly fine up until a few weeks ago. And I havent done any modding in quite a while just simply because my real job has been taking all of my time lately.

There are other blocks that arent working as well. But they are just RSS feed blocks that were created with AdminCP. So they are the same as the first error desription/code in this post.

I am running at least 3 versions of Nuke on different domains on this same host and all experience the problems. The versions are RN2.20.01, RN2.02.00, and phpNuke7.4 std.

Again...many thanks for all of your quick and courteous repsonses.
 
Guardian2003
PostPosted: Fri Mar 28, 2008 3:59 pm Reply with quote

You don't need to create an actual block to read a valid RSS feed, you just have to type the url to the feed into the in the URL text box when in blocks admin.
The problem being that the feed you are using is not a valid RSS feed Only registered users can see links on this board! Get registered or login!
 
themadhacker
PostPosted: Fri Mar 28, 2008 5:12 pm Reply with quote

I see.

I wont even ponder why it always worked in the past though.

Anyway...I just googled an RSS feed directory and found a valid feed...
Only registered users can see links on this board! Get registered or login!

I then went into my CP (the 2.20.01) and then created a custom block with the URL of the feed.

After half a minute it returns....

There is a problem with the RSS file URL
Please check the URL and RSS file name, then try again.

This is how I create all RSS feeds in the past and its always worked. Other than the icecast and I dont really remember why I had done it that way other than perhaps because of it being an invalid feed. And it "just worked" by using the file that I created.

So while I agree 100% that the icecast feed isnt a valid feed, it worked before. But even if that never works again....I do need the valid RSS feeds to work and they do not. I am certain that its not any fault of the nuke install and I appreciate it much that you are willing to help me get a hosting issue resolved.
 
themadhacker
PostPosted: Tue Apr 01, 2008 6:18 am Reply with quote

Bump...

Anyone else with any input on server side config to check?

Thanks
 
Guardian2003
PostPosted: Tue Apr 01, 2008 7:48 am Reply with quote

What can I saw? It works for me Sad
Are you sure the 'cache' directory is writable?
I put the feed on my site (bottom right corner) and it has been working ok for the last 15 minutes or so.
 
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Tue Apr 01, 2008 1:15 pm Reply with quote

Alright, we need some more information before we can help, what version of php are you using(that php, not nuke).

Also, if you can, link us to a phpinfo page, meaning create a page on your site, put this inside it:

<?php
phpinfo();
?>

That will allow us to see exactly what you have available and what you dont have. It could also be a problem with your servers resolvers, or such, but to test those, we need ssh access, which is probably more then you should allow anyone to have right now.

This is the trouble with having a host that is not as familiar with the system as say a system administrator. If your host wouldnt mind, I'll help you, but I'll need more information.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Guardian2003
PostPosted: Tue Apr 01, 2008 1:36 pm Reply with quote

ARGH! I jut spotted from your first post you are running PHP 5.2.5. that could be the problem.
There are some posts here and on the nukePIE developers site at Only registered users can see links on this board! Get registered or login! regarding a problem with that version - specifically the xml prc library being broken.
 
themadhacker
PostPosted: Wed Apr 02, 2008 8:08 am Reply with quote

gregexp wrote:
Alright, we need some more information before we can help, what version of php are you using(that php, not nuke).

Also, if you can, link us to a phpinfo page, meaning create a page on your site, put this inside it:

<?php
phpinfo();
?>

That will allow us to see exactly what you have available and what you dont have. It could also be a problem with your servers resolvers, or such, but to test those, we need ssh access, which is probably more then you should allow anyone to have right now.

This is the trouble with having a host that is not as familiar with the system as say a system administrator. If your host wouldnt mind, I'll help you, but I'll need more information.


I supposedly have ssh access but I can never get logged in from the cPanel built in java console or even a 3rd party app like PuTTY. But I will let my friend know of your offer to help and see if he will either fix my SSH or set one up for you to the root of the box.

Check your PM for my info.php. Id rather not link it here in public and have already sent it to a couple of posters in this thread

Guardian2003 wrote:
ARGH! I jut spotted from your first post you are running PHP 5.2.5. that could be the problem.
There are some posts here and on the nukePIE developers site at Only registered users can see links on this board! Get registered or login! regarding a problem with that version - specifically the xml prc library being broken.


This seems to make sense. I'll send you the link to the php.info just the same.

Thanks for the replies guys. Im sorry I didnt respond sooner but I have been covered up with work(not related) since I made my last post.
 
gregexp
PostPosted: Wed Apr 02, 2008 9:11 am Reply with quote

Alright, I got your message and link, thanks. That proved one of the worries I had. Most people who upgrade to php5.2.5 forget to add the appropriate tags to their php.ini, as there is no real documentation on it.

Tell your host to add this like to their php.ini:

allow_url_include= ON

they wont find that line in there currently at all. I personally find allow_url_fopen and add it right below that.

It should resolve your issue.
 
themadhacker
PostPosted: Wed Apr 02, 2008 9:23 am Reply with quote

Thanks. I will email him and then report back in this thread on if it fixed it or not.

Fingers Crossed!

Smile
 
gregexp
PostPosted: Wed Apr 02, 2008 9:25 am Reply with quote

Alright, we await your reply.
 
themadhacker
PostPosted: Wed Apr 02, 2008 1:06 pm Reply with quote

He replied to my email and will be tweaking the php.ini file tonight. He could not do it any earlier than then.

If I cant report tonight about it...I will update this thread tomorrow.

Thanks again for everyones input. It is greatly appreciated! Smile
 
themadhacker
PostPosted: Thu Apr 03, 2008 7:55 am Reply with quote

Not sure what happened with my guy but he did not do any work on the server last night.

I just wanted to update you guys as I said I would, because you all have been great to offer quick comments and I didnt want to leave anyone hanging.

I WILL be sure to update this thread as soon as I get some action from the server admin.

Thanks again all.
 
Guardian2003
PostPosted: Thu Apr 03, 2008 11:22 am Reply with quote

That condition not being set in the php.ini is a result of your host using his cPanel/WHM to upgrade the servers PHP version - I had the same problem on my VPS.

All is not lost though, if your host cannot or does not allow that, I think you can work around it but it involves file editing to use a different method to fetch the remote file.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©