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 -> RN Installer/Setup Issues
Author Message
jlajax
Ardent RavenCMS Supporter



Joined: Oct 12, 2006
Posts: 244
Location: Jacksonville, Florida

PostPosted: Fri Aug 03, 2007 1:11 pm Reply with quote

Greetings all.

I have all my portals on the same Apache server. I have different graphics displaying in the GD Extension security code area. All of my portals are un-modded RavenNuke(tm) v2.10.00. My databases are running on MySQL - 4.1.18. Any suggestions on why I have different graphics displaying in the security codes window when the set-ups are identical? My support folks haven’t figured it out and I am the proverbial lost puppy.
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Aug 06, 2007 7:49 am Reply with quote

This code in mainfile.php seems to be what determines whether the GD is working and used
Code:


define('GDSUPPORT', extension_loaded('gd'));
if(function_exists('imagecreatetruecolor') && function_exists('imageftbbox')) {
    define('VISUAL_CAPTCHA',true);
}


If any of those conditions don't work, then it will load the old security code

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
jlajax







PostPosted: Thu Aug 09, 2007 2:57 am Reply with quote

This is what I got from my suport folks.

Quote:
Presumably they are passing different parameters to generate their images. There isn't really a "create a security image" function in GD. The software that wants the security image instead tells GD "make a box with this sort of border, containing this sort of background, containing this text text using this font, and run the text through this distortion filter, and return an image with these dimensions."

I have never done any coding for GD, so I can't really tell you how to change the code on the sites that are using the smaller image with the hatched background to work like the sites that are using the larger image with the random-lines background. But that's what you need to look into. The code is simply requesting images with different parameters.


To me this is a non answer because I am using identical installs to call the GD extensions. Given that I am using the unmodified RavenNuke(tm) install I do not understand why I am gettting different graphics on differnt portals installed on the same apache server. Is not the install identical using the RavenNuke Installer?
 
montego
Site Admin



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

PostPosted: Thu Aug 09, 2007 7:24 am Reply with quote

Maybe it has something to do with where you have placed the installation. For example, subdomain vs. sub-directory vs. ????. I am just guessing as I have not had an issue with many installs under my belt.

_________________
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
jlajax







PostPosted: Thu Aug 09, 2007 7:44 am Reply with quote

I have done each installation except the first one out of the box

Code:
www.somedomain.com/html/


The installer included in RavenNuke(tm) is so seamless and easy to use…… Well if it ain’t broke don’t fix it so I do out of the box installs on each Portal I bring up. The first site I installed was not a RavenNuke(tm) site. When I upgraded I left what was established as it was established and simply upgraded the Portal in place. Again I employed the documentation which is a step by step even an idiot like me can follow set of instructions.
 
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Thu Aug 09, 2007 8:21 am Reply with quote

A couple of suggestions off the top of my head:

Write a PHP script to test the code conditions that evaders posted. Run it on each portal.

Also make sure that the fonts and other files the security code is using are there for each portal. When I first upgraded to RN, some of the font files got uploaded with 0 size. So certain security codes had missing letters and other weirdness. Check the integrity of the uploaded files or re-upload. Once I re-uploaded all was well.

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
technocrat
Life Cycles Becoming CPU Cycles



Joined: Jul 07, 2005
Posts: 511

PostPosted: Thu Aug 09, 2007 9:08 am Reply with quote

Can you give me a URL of a site where the code is the older style?

_________________
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! / Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
jlajax







PostPosted: Fri Aug 10, 2007 2:44 am Reply with quote

Sent via PM
 
technocrat







PostPosted: Fri Aug 10, 2007 7:52 am Reply with quote

Looking at the differences the errors are saying that you did not compile freetype into your GD extension.
 
jlajax







PostPosted: Tue Aug 14, 2007 9:02 am Reply with quote

Image

class.php-captcha.php

Code:
 /************************ Default Options **********************/

if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
    exit('Access Denied');
}
   // start a PHP session - this class uses sessions to store the generated
   // code. Comment out if you are calling already from your application
   if (session_id()=='') session_start();

   // class defaults - change to effect globally

   define('CAPTCHA_SESSION_ID', 'php_captcha');
   define('CAPTCHA_WIDTH', 250); // max 500
   define('CAPTCHA_HEIGHT', 40); // max 200
   define('CAPTCHA_NUM_CHARS', 5);
   define('CAPTCHA_NUM_LINES', 70);
   define('CAPTCHA_CHAR_SHADOW', false);
   define('CAPTCHA_OWNER_TEXT', '');
   define('CAPTCHA_CHAR_SET', ''); // defaults to A-Z
   define('CAPTCHA_CASE_INSENSITIVE', false);
   define('CAPTCHA_BACKGROUND_IMAGES', '');
   define('CAPTCHA_MIN_FONT_SIZE', 16);
   define('CAPTCHA_MAX_FONT_SIZE', 20);
   define('CAPTCHA_USE_COLOUR', true);
   define('CAPTCHA_FILE_TYPE', 'png');
   define('CAPTCHA_FLITE_PATH', '/usr/bin/flite');
   define('CAPTCHA_AUDIO_PATH', '/tmp/'); // must be writeable by PHP process

   /************************ End Default Options **********************/


Mainfile.php

Code:
/*****[BEGIN]******************************************

 [ Base:    GFX Code                           v1.0.0 ]
 ******************************************************/
define('GDSUPPORT', extension_loaded('gd'));
if(function_exists('imagecreatetruecolor') && function_exists('imageftbbox')) {
    define('VISUAL_CAPTCHA',true);
}

/*****[END]********************************************
 [ Base:    GFX Code                           v1.0.0 ]
 ******************************************************/


The graphic shows the differences I am getting. The code is from the source files that I use to upload portals from. Each class.php-captcha.php is identical to the above. I desire the much easier to read Alpha Security code. The majority have the more difficult to read graphic. I am getting a lot of complaints about the left hand side. How do I get the right hand side?

RavensScripts


Last edited by jlajax on Tue Aug 14, 2007 9:20 am; edited 1 time in total 
technocrat







PostPosted: Tue Aug 14, 2007 9:08 am Reply with quote

I gave you the answer already, it appears you do not have FreeType compiled into your GD extension. You should talk to your host, or if your the host google it.
 
jlajax







PostPosted: Tue Aug 14, 2007 9:33 am Reply with quote

I am trying to get a response from my hosting support folks it appears they are not well versed in GD extensions. At least they have not resolved it and I gave them your response. I was kinda hopning it was something I could manage I guess.
 
Gremmie







PostPosted: Tue Aug 14, 2007 9:40 am Reply with quote

I'm confused because he said all these portals are on the same server. Wouldn't they all use the same extension? Or perhaps he is hosted with the same hosting company, but his host has his portals spread across servers with different PHP configurations?
 
technocrat







PostPosted: Tue Aug 14, 2007 10:10 am Reply with quote

That's the only way this would make sense. The errors he is getting is pretty explanatory those functions are not there. Unless I am missing something that's the only possible answer. Pinging both of the sites comes back with 2 different IPs. They are not on the same box.

jlajax if you host can't help you then it's time to find a new one. It should only take a few minutes of Googe'ing to find how to compile FreeType into GD.
 
jlajax







PostPosted: Tue Aug 14, 2007 3:57 pm Reply with quote

It was resolved today. Support said it was in the php configuration. I asked what was wrong. Haven’t gotten a response from them yet, Seems strange to me.

They did not note any changes made in any of the code. If I rewrote someone’s code I would surely point out to them what I had done and offer an explanation of why I did what I did. At least that is what I have done in the past when I have changed something that was someone elses.

I have been with these people for over 10 years and until very recently they have always provided pristine top shelf first class support. I am self taught & pHp is new to me. I am not ready to give up on them yet.

Here was their response:

Quote:
OK, there we go. It wasn't a GD issue at all, it was a PHP issue. And, indeed, the code WAS generating the different graphics -- but it was doing so as a fallback method due to the PHP configuration. Should be working as you expect now.


I think what he is saying here is that they had something wrong.....

RavensScripts
 
jlajax







PostPosted: Tue Aug 14, 2007 4:00 pm Reply with quote

OH and I thank you folks for your considerable work and quick responses. I truly do appreciate it.
 
jlajax







PostPosted: Tue Aug 14, 2007 4:18 pm Reply with quote

It was indeed on their end:

Quote:
Nothing was wrong on your end -- it was indeed a freetype issue. But it was an issue with freetype's compilation into PHP, not GD. This couldn't have been the reason if all the sites had shared a server as we previously thought, but when I discovered they didn't, I was able to correlate the sites that weren't working as expected with a single server's PHP config and recompile with the freetype option.


Late Breaking News

Quote:
Edit to add: you were probably asking about this: "And, indeed, the code WAS generating the different graphics -- but it was doing so as a fallback method due to the PHP configuration."

What I mean is this: it isn't possible for two identical pieces of code to query the same library and produce different results (excepting some deliberate call to a randomizer, of course). However, what we have here is a situation where the code is smarter than we were thinking: the code first tries to generate the graphic using FreeType. If FreeType is available, it produces the easy to read format. If FreeType is not available, then the code falls back to a more basic method. In other words, two different pieces of code were generating the graphics -- but both pieces of code were part of the same larger program. The program was intelligently selecting which piece of code to use to generate the graphic based on whether or not FreeType was available.



I believe here he restated my original question that first I posed to them. I also believe he just gave you good people a compliment.
 
evaders99







PostPosted: Tue Aug 14, 2007 11:38 pm Reply with quote

It is possible that PHP configurations are set differently, esp with many of the virtual hosting setups. PHP or other server programs get upgraded, a default configuration is generated differently.

Glad they got you fixed!
 
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 -> RN Installer/Setup 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 ©