Author |
Message |
black_mantis
Hangin' Around

Joined: Oct 11, 2003
Posts: 32
Location: Orlando, FL
|
Posted:
Thu Oct 23, 2003 5:39 am |
|
I know that this issue has been reviewed many times but i cannot get the security code to show on the index.php page but it shows fine on the admin.php page I have GD installed with jpeg and png I dont know what is the problem... I check the config file and took out the carriage retuns and spaces... if I right click on the security code and go to properties I see the code but when I right click on the security code to view image it tells me that there is a error with no direction only the path listed in the block-site.info.php page... Can you help me resolve this issue.. im using osc2nuke but it has the same effect with nukecops 6.5 enhanced...
Thanks in advance |
|
|
 |
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Oct 23, 2003 6:14 am |
|
This is normally (almost always) due to extra spaces and/or lines after the closing ?> tag in ANY included file. Check your language files in your main language folder and your Your_Account/language folder. Check mainfile.php, header.php, and footer.php also. |
|
|
|
 |
black_mantis

|
Posted:
Thu Oct 23, 2003 7:50 am |
|
I edited all the files removed all carriage returns and any spaces still the same result.. |
|
|
|
 |
Raven

|
Posted:
Thu Oct 23, 2003 8:38 am |
|
I will still bet that you have a file that has the extra spaces/lines. Did it ever work? If so, look back at every file you've touched since then. Another cause is if in one of these included files, like languages, you have more than 1 set of php tags. Some applications will do this
<?
php code
?>
<?
more php code
?>
That blank line inbetween sends a character to the browser and will kill the image. Really, if the image is where it ought to be and you can directly access it and display it in your browser, then there is an errant space or line somewhere. You just have to hunt it down. This is only in included files. Not like index.php |
|
|
|
 |
black_mantis

|
Posted:
Thu Oct 23, 2003 11:32 am |
|
Ok i removed all the spaces and carriage returns so the code is all bunched up now this is a fresh install It didnt work from the start... maybel it will not work for me how will you remove the security code or what part do i comment out...
thanks |
|
|
|
 |
Raven

|
Posted:
Thu Oct 23, 2003 11:46 am |
|
That's not what you needed to do. It is only cases AFTER the ?> tag, or if a file has a blank line BEFORE the opening <? tag that will cause this. I have found it to be the case 100% of the time. Somewhere there is something being transmitted to the browser before the graphic, which is not allowed, by design of the security mechanism. There is some included file that has the problem, but it has nothing to do with blank lines within the php tags. If you want to disable the security mechanism, then see the notes in the config.php file for what code to use. But, |
|
|
|
 |
black_mantis

|
Posted:
Thu Oct 23, 2003 2:08 pm |
|
Ive checked all the files in the main folder, modules accounts, language and themes but with no luck I have remove any spaces behind or infront of the opening and closing tags..
Is there anything esle that i can check..
Thanks for all your respnses  |
|
|
|
 |
Raven

|
Posted:
Thu Oct 23, 2003 2:14 pm |
|
If you would like to PM me your FTP url, id, password, I will take a look when I get home from work. These things are very sly and I can tell that you have been thorough. Still, 2 sets of eyes are better than one  |
|
|
|
 |
black_mantis

|
Posted:
Thu Oct 23, 2003 2:54 pm |
|
I was just wondering is there an image file that suppose to be there and where if so will it be located and the name of the file... |
|
|
|
 |
Raven

|
Posted:
Thu Oct 23, 2003 3:38 pm |
|
It uses the graphic in modules/Your_Account/images/code_bg.jpg . It then dynamically overlays the security code onto that template. |
|
|
|
 |
black_mantis

|
Posted:
Fri Oct 24, 2003 11:20 am |
|
well i went to check to see if the image were there and it was so I right clicked on the security code in the site info box... so I put the address given from the security code..
http://24.233.140.92:8080/modules.php?name=Your_Account&op=gfx&random_num=960571
and I came up with this..
<br />
<b>Warning</b>: imagecreatefrompng(modules/Your_Account/images/code_bg.png): failed to open stream: No such file or directory in <b>/opt/lampp/htdocs/modules/Your_Account/index.php</b> on line <b>797</b><br />
<br />
<b>Warning</b>: imagecolorallocate(): supplied argument is not a valid Image resource in <b>/opt/lampp/htdocs/modules/Your_Account/index.php</b> on line <b>798</b><br />
<br />
<b>Warning</b>: imagestring(): supplied argument is not a valid Image resource in <b>/opt/lampp/htdocs/modules/Your_Account/index.php</b> on line <b>800</b><br />
<br />
<b>Warning</b>: imagepng(): supplied argument is not a valid Image resource in <b>/opt/lampp/htdocs/modules/Your_Account/index.php</b> on line <b>801</b><br />
<br />
<b>Warning</b>: imagedestroy(): supplied argument is not a valid Image resource in <b>/opt/lampp/htdocs/modules/Your_Account/index.php</b> on line <b>802</b><br />
It seems that is looking for a png file... So I created the png file and saved it in the folder but it only displays the box with the red X but no errors.. |
|
|
|
 |
Raven

|
Posted:
Fri Oct 24, 2003 11:27 am |
|
That looks like my SiteInfo block, but mine comes with JPG, not PNG, so i don't know where you got that code from. |
|
|
|
 |
black_mantis

|
Posted:
Fri Oct 24, 2003 11:31 am |
|
I got the code from the index.php file in the your_account folder in the modules catagory.. so thats how it came with the osc2nuke I didnt change any files.... Do you know what I should change.. |
|
|
|
 |
Raven

|
Posted:
Fri Oct 24, 2003 11:49 am |
|
Download my site info block and either install my block or use the code that is in there. |
|
|
|
 |
black_mantis

|
Posted:
Fri Oct 24, 2003 11:53 am |
|
This is the block downloaded from your site... |
|
|
|
 |
Raven

|
Posted:
Fri Oct 24, 2003 11:59 am |
|
DUH! I forgot that the site info block uses the Your_Account code. If you are using the png code, then you have modified the original code in the Your_Account/index.php file to use png and not jpg. I just saw your PM with the ftp info. Give me a minute to look at it. |
|
|
|
 |
Raven

|
Posted:
Fri Oct 24, 2003 12:16 pm |
|
It's your modified mainfile.php that's causing the problem. Somewhere in there it's sending something to the browser ahead of the graphic and that's hosing it up. I haven't looked it over yet, but I renamed it to xx-mainfile.php and restored the original 6.9 mainfile.php and the image now shows. I also replaced the Your_Account/index.php gfx() code to use jpg instead of png. |
|
|
|
 |
black_mantis

|
Posted:
Fri Oct 24, 2003 12:28 pm |
|
Hey raven thanks man your great dont forget to post the fix for anybody who is using the osc2nuke and your site infor block it will be a great help...  |
|
|
|
 |
black_mantis

|
Posted:
Fri Oct 24, 2003 12:30 pm |
|
sorry must have been posting at the same time..
Thanks |
|
|
|
 |
|