PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
jlajax
Regular
Regular


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

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

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 Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2852

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

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
View user's profile Send private message Visit poster's website
jlajax
Regular
Regular


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

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

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?
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

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.
View user's profile Send private message Visit poster's website
jlajax
Regular
Regular


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

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

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.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


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

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

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


Joined: Jul 07, 2005
Posts: 492

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

Can you give me a URL of a site where the code is the older style?
View user's profile Send private message
jlajax
Regular
Regular


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

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

Sent via PM
View user's profile Send private message Visit poster's website
technocrat
Involved
Involved


Joined: Jul 07, 2005
Posts: 492

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

Looking at the differences the errors are saying that you did not compile freetype into your GD extension.
View user's profile Send private message
jlajax
Regular
Regular


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

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

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
View user's profile Send private message Visit poster's website
technocrat
Involved
Involved


Joined: Jul 07, 2005
Posts: 492

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

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


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

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

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.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


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

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

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


Joined: Jul 07, 2005
Posts: 492

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

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


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

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

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
View user's profile Send private message Visit poster's website
jlajax
Regular
Regular


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

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

OH and I thank you folks for your considerable work and quick responses. I truly do appreciate it.
View user's profile Send private message Visit poster's website
jlajax
Regular
Regular


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

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

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.
View user's profile Send private message Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2852

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

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!
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum