vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   ecDownloads 3.2 Legacy (https://vborg.vbsupport.ru/showthread.php?t=75198)

memobug 03-26-2005 10:42 PM

<i>Deleted some long debug sequence that ultimately led to the discovery of a space after the final ?> in dl_category.php that had been causing blank page problems.</i>

Ron1n 03-27-2005 12:42 AM

Quote:

Originally Posted by memobug
ALL the referenced templates are there and look good. The only odd thing I saw was the main heading is "Downloads Templates Templates"

Regards,

Matt

1) what do you mean by Download Templates Templates
2) do you have msn or AIM? i could talk with you and sort this out much faster fi we spoke on a message service
3) I still have no clue what the cause could be, but i will continue to think about it.

rjordan 03-27-2005 01:15 AM

Although purely cosmetic, I noticed that when you add a new link (and/or file) and you get the redirect page, at the top you see EXT: followed by the extension uploaded. It seems that it might have beem used as a troubleshooting line. If anyone wants to get rid of that, I believe the line to comment out or remove is in dl_add.php at about line 50. The line to remove is:

Code:

        echo "EXT: ".$ext;

memobug 03-27-2005 03:33 AM

Quote:

Originally Posted by Ron1n
1) what do you mean by Download Templates Templates
2) do you have msn or AIM? i could talk with you and sort this out much faster fi we spoke on a message service
3) I still have no clue what the cause could be, but i will continue to think about it.

1. The name of the template group in the Template manager is "Downloads Templates Templates"
2. Sorry no, I got rid of AIM when they started spybotting with that Wild Tangent junk.
3. Thanks I would like to get this to work!

Regards,

Matt

memobug 03-27-2005 04:23 AM

Quote:

Originally Posted by Ron1n
3) I still have no clue what the cause could be, but i will continue to think about it.

I found it!!! There is a single space after the closing ?>
in dl_category.php!!

:banana:

memobug 03-27-2005 05:54 AM

Quote:

Originally Posted by rjordan
Although purely cosmetic, I noticed that when you add a new link (and/or file) and you get the redirect page, at the top you see EXT: followed by the extension uploaded. It seems that it might have beem used as a troubleshooting line. If anyone wants to get rid of that, I believe the line to comment out or remove is in dl_add.php at about line 50. The line to remove is:

Code:

        echo "EXT: ".$ext;

It's not purely cosmetic on my server/browser combo. With this "echo" line in place I will get blank pages if the upload file or link extension are unsupported types. I believe this happens because once something is printed to an output device it can mess up the headers that are sent subsequently.

So it should come out of the download.

It is line 50.

Regards,

Matt

memobug 03-27-2005 06:47 AM

Did someone already point out a problem with the date formatting? on the Stats page I get Date showing up as

987654321

Regards,

Matt

Ron1n 03-27-2005 05:50 PM

Quote:

Originally Posted by rjordan
Although purely cosmetic, I noticed that when you add a new link (and/or file) and you get the redirect page, at the top you see EXT: followed by the extension uploaded. It seems that it might have beem used as a troubleshooting line. If anyone wants to get rid of that, I believe the line to comment out or remove is in dl_add.php at about line 50. The line to remove is:

Code:

        echo "EXT: ".$ext;

Yes, that is for debugging.

Quote:

Originally Posted by memobug
Did someone already point out a problem with the date formatting? on the Stats page I get Date showing up as

987654321

Regards,

Matt

I dont get that... i just send it to the vB date formatter, so I dont see why you get a timestamp instead of a date. Point me to your download section.


Quote:

Originally Posted by memobug
I found it!!! There is a single space after the closing ?>
in dl_category.php!!

:banana:

Glad you fixed it, but that 1 space is not a problem. If it were, that would mean your webserver doesnt support integrating php into regular html pages, which is probably not the case. If it is, it means that something on your server is VERY strange.

Quote:

Originally Posted by memobug
It's not purely cosmetic on my server/browser combo. With this "echo" line in place I will get blank pages if the upload file or link extension are unsupported types. I believe this happens because once something is printed to an output device it can mess up the headers that are sent subsequently.

Your server is messed up... wow.

Rids 03-28-2005 02:49 AM

Quote:

Originally Posted by Rids
For some reason when I updated from 1.0e to 2.0c not all of the templates were updated and not all of the mysql fields were set either. I eventually put the templates and mysql right (I think) manually from the installer file but what I have now is a mess: ... I'm now completely stumped with nothing working
Quote:

Originally Posted by Ron1n
I really don't know what to say. I haven't ever recieved those errors with this script or any other webprogram I have written or used. I know you had some data in your tables, but I would suggest a complete reinstall. If you want to save your old data, export it to a .sql file, and do a complete reinstall of EVERYTHING. If it works, I will help you manually add back the mysql data.

Good luck, and keep me posted.
I backed up the database tables and then uninstalled and deleted everything, even removed all the file edits. I then reinstalled the mod using the latest version and then imported the data back into the database. Everything seems to be working properly now except the stats page. The stats page is just showing one member (same one for every day) and the same date (03-25-05) day after day and no other figures. I checked the cron job setup and its the same as in the screenshot so I currently have no idea why its not working.

memobug 03-28-2005 05:54 AM

Quote:

Originally Posted by Ron1n
Yes, that is for debugging.
I dont get that... i just send it to the vB date formatter, so I dont see why you get a timestamp instead of a date. Point me to your download section.

Sorry it was a misunderstanding What I was seeing as an unformatted date 986574321 was actually a username somebody used! So the date formatting is fine. It was just the way the table lined up.

A. HTML issues: However, there seems to be a problem in the table layout of the stats panel. There are several issues where the column counts don't line up. If you turn border="1" on in the template called downloads_util_stats, you'll see it quite obviously. That is why I thought this username was a date problem.. There are also some headings missing.

in the template called downloads_util_stats

1. The table heading "Stats" doesn't cover all the columns beneath it.
It covers 3 columns in a span with the word Stats
<td class="thead" width="100%" colspan="3">Stats</td></tr>

2. Then it has headings for "Date" and "Downloads" at one column each
<tr><td class="alt2" align="center">Date</td><td class="alt2" align="center">Downloads</td> So there is a mismatch there

However next it sends out the template downloads_utils_statsbit, which has 6 columns!
<tr>
<td class="alt2">$name</td>
<td class="alt2">$date</td>
<td class="alt2">$author</td>
<td class="alt2">$downloads</td>
<td class="alt2">$grade</td>
<td class="alt2">$status</td>
</tr>

So

1 needs a span of 6
2 needs to have the missing headings put in or have the spans adjusted.

I was able to sort this all out if you want me to send you the templates let me know, but my hack is probably not as good as what you could do. I think the gist of the problem is that this downloads_utils_statsbit template is used for tables of different column counts; ($_GET['act'] == 'my') where the column count is six, ($_GET['act'] == 'stats') where it appears it should have two columns, and ($_GET['act'] == 'my') where the column count look like it will be three. That means that either separate templates, blank columns or a dynamic downloads_utils_statsbit template are needed.

Just a couple more things I noticed:

C.The stats thing has a little bug where it will report top downloaders as people who have never downloaded anything, so the query should probably be adjusted to not report people who haven't downloaded anything.

D. Similarly it will report top downloaders as people who don't have any downloads.

E. It will report some blank lines in Most Popular. Maybe for the same reason.

Quote:

Glad you fixed it, but that 1 space is not a problem. If it were, that would mean your webserver doesnt support integrating php into regular html pages, which is probably not the case. If it is, it means that something on your server is VERY strange.

Your server is messed up... wow.
No not really. In PHP, anything that is included after the final ?> is output to the browser. Once you've begun sending output, in this case, a space, or in the other example of a diagnostic "echo" output to the browser, it can be a big problem if you follow up with trying to send http headers or cookies. Some browsers can get confused and not know how to process them.

Anyway examples like this are all over the web:
http://www.xoops.org/modules/newbb/v...&post_id=51514

Therefore, there are numerous bits of instructions in PHP coding and installation instructions exhorting people to be sure not to include extraneous lines or spaces following the closing tag.

Many thanks for this excellent hack,

Matt


All times are GMT. The time now is 12:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01694 seconds
  • Memory Usage 1,767KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete