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
Author Message
sak
Worker
Worker



Joined: Jul 06, 2005
Posts: 172

PostPosted: Mon Feb 20, 2006 1:04 am Reply with quote

I recently decided to turn on the security image feature. Our site was visited by a spambot, so I decided this would be worthwhile. I activated it to option 6 I believe (new user reg only). The image does NOT show up.

I've read the FAQ, and a number of other forum threads about this. I've read the guide and everything, none of what it suggests has helped.

Here's what the nukecops analyze thing reads:

GD Library Information
Type Value
GD Version bundled (2.0.28 compatible)
FreeType Support Yes
T1Lib Support No
GIF Read Support Yes
GIF Create Support Yes
JPG Support Yes
PNG Support Yes
WBMP Support Yes
XBM Support Yes

· Admin Security Image Found: images/admin/code_bg.jpg ·

· Your_Account Security Image Not Found: modules/Your_Account/images/code_bg.jpg ·

Here's some other server info:

Apache Version 1.3.34 (Unix)
PHP Version 4.4.1
Mysql Version 4.1.13-standard


I'm running ravennuke 7.6 2.02.00 (latest). I figured it wasn't a problem with this awesome distro, so I posted in the nuke 7.6 forum instead. I've tried uploading the image file that anazlyze.php says is missing, but that doesn't seem to change anything. I've had like 2 spammers tonight, and it's getting very very frustrating Sad

_________________
[ 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! ]

Last edited by sak on Tue Feb 21, 2006 7:36 am; edited 1 time in total 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Feb 20, 2006 7:50 am Reply with quote

Weird. When you say it doesn't show up, does the actual image try to load? Or does none of the security code text load at all?

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
sak







PostPosted: Mon Feb 20, 2006 8:44 am Reply with quote

Only the alternate text ("Security Code") shows up in firefox. A no-image X logo shows up in IE. I thought it was because the modules/Your_Account/images/code_bg.jpg was missing, but nothing changes when I upload this file.

If you right click on the image box and go to properties, it gives something like this for the image location: [ Only registered users can see links on this board! Get registered or login! ]
 
sak







PostPosted: Mon Feb 20, 2006 8:53 pm Reply with quote

Still haven't gotten it working Sad It's so bad, I even had nightmares about spammers!

I looked at the url the the graphic on raven's site here, and this is what it is:
[ Only registered users can see links on this board! Get registered or login! ]

is mine wrong because it's missing the ACTUAL module and op=gfx, etc? It would appear so. Why is this and how to fix it though?
 
evaders99







PostPosted: Mon Feb 20, 2006 9:18 pm Reply with quote

It depends on what version you are using - phpNuke has changed what URL generates the image. Do you have any error logs? That would determine if it is a coding error or something else. It really looks like its generating something, but the code isn't right for a valid jpg
 
sak







PostPosted: Tue Feb 21, 2006 8:08 am Reply with quote

no error messages regarding this in cpanel error logs at least.
 
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Tue Feb 21, 2006 12:06 pm Reply with quote

Here's a posting I did over on the Karakas forums after dealing with this problem a while back. One thing to try is to right click on the image (or where the image should be) and try view image and see. But that's explained below and I realize it may not fit your situation:

Quote:
I've read all the threads and I've solved my own problem with this but since it drove me crazy before I did I thought I'd offer the solution.

I was having some other problems on my local test system and I had put some trace statements (basically tables with a green background and a statement like "got to mainfile" or "got to sentinel" plus maybe a variable dump to see the values of variables at various stages) in programs that I knew were executing before I got an access denied statement. I still had the traces in after I had fixed my other problems and I was testing the local system and noticed that the security graphic didn't come up, it said "security code" instead as others have found.

If I right clicked on the security code box and chose view image I got the following:

Quote:
The image “http://localhost/cms/modules.php?name=Your_Account&op=gfx&random_num=549828” cannot be displayed, because it contains errors.


Humm, I said and after too long a while a bright light went off and I looked at view source for the page.

You get something like this the echoed diagnostic statement and then the system tries to append the graphic in the same "window" and that causes some sort of error that it can't cope with.

Generalizing on this I'd say that if you have the graphic security code problem: (1) try the right click trick, (2) look at the page source where the error is and (3) be aware of any mods you may have made that are causing anything to be displayed on the screen together with the login box.

Hope this helps someone to avoid wasting as much time as I did.
 
View user's profile Send private message Visit poster's website
sak







PostPosted: Tue Feb 21, 2006 12:20 pm Reply with quote

When I go to view image, it just brings up a blank page with this:
[ Only registered users can see links on this board! Get registered or login! ]
 
fkelly







PostPosted: Tue Feb 21, 2006 12:56 pm Reply with quote

Did you try right clicking on it and choose view image?

My "solution" may not be applicable in your case, it's just an idea.
 
sak







PostPosted: Tue Feb 21, 2006 12:59 pm Reply with quote

yeh that's what I did in firefox. It just brought up a blank white page with that url Confused
 
fkelly







PostPosted: Tue Feb 21, 2006 1:24 pm Reply with quote

Yeah, I see that. I think Evaders is probably right. If you look at the view source on your generated page it looks like it's trying to generate a jpg but it's generating garbage characters instead. I guess you'd need to work backwards to find the program that generates the graphic, it says "CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 75" in the view source and, find out what's wrong with that.

Reading back thru the posts I think you may have something when you point out that in Raven's case the Your_Account module with an op of gfx is in the string and in yours it's not. Without digging into the code I would guess that you need to have Your_Account in there because the index.php file there tests for an "op" and if it's gfx it does something to generate the graphic. So you'd need to determine why that's not in your system. Sorry to not be much more immediate help than that.
 
sak







PostPosted: Thu Feb 23, 2006 10:15 pm Reply with quote

anyone have any ideas? Sad

I feel like im banning the entire country of russia, one octet at a time.
 
hinksta
Worker
Worker



Joined: Dec 23, 2005
Posts: 226
Location: UK

PostPosted: Sat Feb 25, 2006 6:44 am Reply with quote

I have the same problem

My view source

Code:
<table width="100%" border="0" cellspacing="0" cellpadding="2">

                    <tr>
                      <td height="15" style="background-image: url(/themes/otbi/images/mid.gif)"><form onsubmit="this.submit.disabled='true'" action="modules.php?name=Your_Account" method="post"><center><font class="content"><br><b>Name</b><br><input type="text" name="username" size="10" maxlength="25"><br><b>Password<b><br><input type="password" name="user_password" size="10" maxlength="20"><br>Security Code: <img src='?gfx=gfx&amp;random_num=416414' border='1' alt='Security Code' title='Security Code'><br>
Type Security Code<br><input type="text" NAME="gfx_check" SIZE="7" MAXLENGTH="6">
<input type="hidden" name="random_num" value="416414"><br>
<input type="hidden" name="op" value="login"><input id="submit" type="submit" value="Login"></font></center></form><center><font class="contentsmall">Don't have an account yet? You can <a href="modules.php?name=Your_Account&amp;op=new_user">Register Here</a>.</font></center><br></td>

                    </tr>
                  </table>


The security number only works on the home page and for new users.

GD Version 2.0 or higher
FreeType Support Yes
T1Lib Support No
GIF Read Support Yes
GIF Create Support Yes
JPG Support Yes
PNG Support Yes
WBMP Support Yes
XBM Support No
 
View user's profile Send private message Visit poster's website
hinksta







PostPosted: Sat Feb 25, 2006 9:54 am Reply with quote

For me this is only a problem on gtng pages
 
hinksta







PostPosted: Fri Mar 03, 2006 8:49 pm Reply with quote

This sorted my un gt'd Login Security Code failure

in block-Login.php change
Code:
if (extension_loaded('gd') AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {

    $content .= ""._SECURITYCODE.": <img src='?gfx=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n";

to
Code:
if (extension_loaded('gd') AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {

    $content .= ""._SECURITYCODE.": <img src='modules.php?gfx=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n";
 
Virgin_Steel
Worker
Worker



Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Wed Mar 08, 2006 3:14 pm Reply with quote

I had the same problem few times and it was result of:
FAQ wrote:

the most often cause is a blank space/line either before or after the php tags in your config.php, one of your language files, theme file, or some other include file. This is usually the result of using Notepad or Wordpad. You need to use a better programmer's editor like Textpad.
 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
jimmo
Worker
Worker



Joined: Dec 08, 2005
Posts: 107

PostPosted: Fri Jul 21, 2006 6:08 am Reply with quote

Also watch out for theme files that print out things in the wrong place. I just spent a couple of hours tracking down a problem. I checked all of the files for blank lines, etc, etc and found nothing. It turned out that one of the theme files was outputting some javascript code that ended up at the start of the image file. Naturally, it was then an invalid and I was getting "cannot be displayed, because it contains errors".
 
View user's profile Send private message
erisds
New Member
New Member



Joined: Sep 07, 2005
Posts: 11

PostPosted: Sun Sep 03, 2006 3:53 am Reply with quote

I had this problem too!

This thread really helped!!

It was caused by an extra space after my closing php tag in my theme.php.

Weird that that would cause it..but nonetheless removing it solved it.

Thanks peeps

Eris
 
View user's profile Send private message
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

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 ©