Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6 Bugs/Fixes
Author Message
SuperCat
Hangin' Around



Joined: Nov 27, 2004
Posts: 37
Location: MN

PostPosted: Sat Nov 27, 2004 5:07 pm Reply with quote

If you use the security graphic, You wont be able to get new users and nobody will be able to login until you fix this:

Open modules/Your_Account/index.php

Find:
Code:
function new_user() {


Just above that, add:
Code:
function gfx($random_num) {

    global $prefix, $db, $module_name;
    require("config.php");
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 6);
    $image = ImageCreateFromJPEG("modules/$module_name/images/code_bg.jpg");
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/jpeg");
    ImageString ($image, 5, 12, 2, $code, $text_color);
    ImageJPEG($image, '', 75);
    ImageDestroy($image);
    die();
}


In function new_user() find:
Code:
echo "<tr><td>"._SECURITYCODE.":</td><td><img src='?gfx=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>\n"


Replace with:
Code:
echo "<tr><td>"._SECURITYCODE.":</td><td><img src='modules.php?name=$module_name&amp;op=gfx&amp;random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."' /></td></tr>\n"


Find inside function main($user):
Code:
echo "<tr><td colspan='2'>"._SECURITYCODE.": <img src='?gfx=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."' /></td></tr>\n"


Replace with:
Code:
echo "<tr><td colspan='2'>"._SECURITYCODE.": <img src='modules.php?name=$module_name&amp;op=gfx&amp;random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."' /></td></tr>\n"
 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Sat Nov 27, 2004 6:52 pm Reply with quote

The gfx function is now stored in mainfile.php
 
View user's profile Send private message Visit poster's website
SuperCat







PostPosted: Sat Nov 27, 2004 8:24 pm Reply with quote

I see it there at the bottom, but i wouldnt have had to reimport the old way if it worked in the first place.
 
chatserv







PostPosted: Sat Nov 27, 2004 9:58 pm Reply with quote

I'll check what changed because it worked with 7.5, only a minor change was required but only if using GT.
 
SuperCat







PostPosted: Sat Dec 11, 2004 9:37 am Reply with quote

Any resolution yet on this bug?

I didnt use 7.5, so i wouldnt know if the problem crept up between 7.5 and 7.6. My last version was 7.1.
 
chatserv







PostPosted: Sat Dec 11, 2004 10:24 am Reply with quote

Are you using some form of GoogleTap Supercat?
 
SuperCat







PostPosted: Mon Dec 13, 2004 8:57 am Reply with quote

no i am not. I make sure my nuke is as close to stock as possible.

I do think i have a possible bug that may cause it. Ill post about it in a new thread.
 
Darrell3831
Worker
Worker



Joined: Feb 18, 2004
Posts: 244

PostPosted: Mon May 23, 2005 6:48 pm Reply with quote

I just upgraded from nuke 7.4 patched 2.9 to 7.5 pathced 3.0 and the issue croped up for me too.

Does anyone have a resolution for it yet, besides rolling back to the old code?

Thanks,
Darrell

_________________
[ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
chatserv







PostPosted: Mon May 23, 2005 7:10 pm Reply with quote

Darrell3831 did you first upgrade Nuke before adding the patch for 7.5? you can't use Nuke Patched to upgrade Nuke.
 
Darrell3831







PostPosted: Mon May 23, 2005 7:38 pm Reply with quote

Yes I did upgrade first.

Here's how I did it.

I copied 7.5 original over the top of my current 7.4. Then I ran the upgrade script for 7.4 to 7.5.

Then I copied the 7.5/3.0 patches over the top of that and ran the upgrade script you included with that.

Then I deleted the administration stuff you mentioned in the sticky in the other folder. (case, links, and .php files..)

Would that have been the wrong approach?
 
chatserv







PostPosted: Mon May 23, 2005 8:07 pm Reply with quote

If the site in question is psy-center edit the your account module's index file and the login block, change:
Code:
img src='?gfx=gfx&random_num=$random_num'

to:
Code:
img src='modules.php?name=Your_Account&gfx=gfx&random_num=$random_num'
 
ardmhacha
Hangin' Around



Joined: Jan 26, 2004
Posts: 30
Location: Ireland

PostPosted: Mon May 30, 2005 3:23 am Reply with quote

I upgraded from 6.9 to 7.6 and have the security image problem also. I have tried the fixes as suggested without any luck. To upgrade I did as Darrell 3831 above only to the newer version of phpnuke.

This problem is happening in 'Your Account' module as well as in my 'Site info' block. When I go to properties of the image in 'Your Account' it is [ Only registered users can see links on this board! Get registered or login! ]

The properties in the 'Site info' is [ Only registered users can see links on this board! Get registered or login! ]

I have also checked for a blank line at the start and end of certain files but everything seemed OK. I ran analyse.php and the security image showed up there. I have been looking for a fix for this for two days to no avail. This has been the most frustrating problem i have yet encoutered with phpnuke.

I would really appreciate someone's help with this.

Thank you
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon May 30, 2005 4:19 am Reply with quote

Please create, for me, both a user and an admin account. Then PM me your
Site URL, id/pass
Ftp Url, id/pass

I'll look into it as soon as I can. This will save 20 questions.
 
View user's profile Send private message
Darrell3831







PostPosted: Mon May 30, 2005 7:59 am Reply with quote

ardmhacha and Raven,

If you find out what is wrong with ardmhacha's site please post back here so that I can fix mine too.

After not being able to fix it I just switched the check to off.. =0 and moved on to other problems.

Thanks,
Darrell
 
chatserv







PostPosted: Mon May 30, 2005 8:05 am Reply with quote

Are any of you using NextGen GT?
 
ardmhacha







PostPosted: Mon May 30, 2005 8:53 am Reply with quote

Chatserv - No I' not using it on my site [ Only registered users can see links on this board! Get registered or login! ]
 
Darrell3831







PostPosted: Mon May 30, 2005 9:01 am Reply with quote

I am chatserv,

I had it installed and working in 7.4.. Everything worked that I know of in 7.4, but my upgrade to 7.5 is where things stopped working. The gfx and admin autorecognizing modules both stopped... (I don't have 7.6)

Darrell
 
chatserv







PostPosted: Mon May 30, 2005 9:53 am Reply with quote

Darrell Do a find & replace in the Your Account module's index.php file and block-Login.php for:
Code:
?gfx=gfx&random_num=$random_num

Change to:
Code:
modules.php?name=Your_Account&gfx=gfx&random_num=$random_num
 
Raven







PostPosted: Mon May 30, 2005 10:55 am Reply with quote

ardmhacha,

I have tried about everything I can think of and I'm at a loss at this point. It's finding everything it should because it's not showing a red X. I'll look again later if it hasn't been solved. It is a very strange one, indeed, and the solution is probably very simple - I'm just not spotting it.
 
ardmhacha







PostPosted: Mon May 30, 2005 11:28 am Reply with quote

Thanks Raven,

As I said, I too had tried everything I could find as a possible solution to this. I also downloaded the 'Your Account' module again and overwrote the files, as others had done, but no joy. You mentioned that "It's finding everything it should because it's not showing a red X" Thats not the case here. Even when logged in as admin, it shows a red X.

Thanks again for the help.

Barry
 
Raven







PostPosted: Mon May 30, 2005 12:58 pm Reply with quote

I don't see a red X - I see the ALT tag. If you're seeing a red X then that helps me. I'll look at it again this evening.
 
Darrell3831







PostPosted: Tue May 31, 2005 12:44 pm Reply with quote

Chatserv,

Before I try this, is there a better way to tap Nuke than GTNextGen? Do you prefer or reccomend something else?

I'd hate to change my core files and mess up my 'upgradeability' over this if there is a better method of tapping.

Thanks,
Darrell


chatserv wrote:
Darrell Do a find & replace in the Your Account module's index.php file and block-Login.php for:
Code:
?gfx=gfx&random_num=$random_num

Change to:
Code:
modules.php?name=Your_Account&gfx=gfx&random_num=$random_num
 
chatserv







PostPosted: Tue May 31, 2005 1:49 pm Reply with quote

I use NextGen myself on several sites, outside of it there's NC's tap and the Googlifier, you would have to try those, i have and prefer GT but that's a matter of taste.
 
ardmhacha







PostPosted: Fri Jun 03, 2005 1:26 am Reply with quote

I'm still experiencing a problem with the security code image in version 7.6. The link is still broken in both the 'Your Account' module and 'Site Info'. (more concerned about the in 'Your Account' though) I have had another look through various files to check for a space after ?> and despite finding and fixing one in the mainfile.php, it did not cure the problem. The ones I checked were those in the top level area (where config.php is) and those in the 'Admin' and 'modules/Your Account' directories. Does anyone know any other files I should check that may have a bearing on this problem? Do I have to so through every file in the site? Also, I would appreciate if someone using 7.6 with their security image showing could post the path to the image that is present in modules/Your Account/index.php. Also, chatserv, you mention above 'The gfx function is now stored in mainfile.php' Should the same amendments to the path be made in both mainfile.php and modules/Your Account/index.php.

Any advice would be much appreciated. Now, excuse me while I go and bang my head off the nearest wall.

Thanks

Barry
 
Raven







PostPosted: Fri Jun 03, 2005 5:24 am Reply with quote

I searched your files and was unable to locate any offending files. It truly has me baffled.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6 Bugs/Fixes

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 ©