vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Cel Photo Popup - Insert pictures from vB Albums, Attachs, Photopost, vBGallery (https://vborg.vbsupport.ru/showthread.php?t=243865)

scribble 05-02-2016 08:11 PM

After we've moved our board to a more modern server than before, we've encountered a similar problem to what asabet mentioned above: The total image count and the pagination seemed correct, but there were not images to click on in the popup.

I poke around a bit in the code, and seems that the result set for the main database query did not get processed correctly. The SQL query itself delivered the correct results. But when photo_popup.php tried to construct the imagebits, it went wrong.

PHP Code:

$resultcount $cel_pp_prod->db->num_rows($cel_pp_prod->mysql_result_main); 

returned 0, even though the db result set had 9 rows.

Similarly, some lines further down,

PHP Code:

while ($array $db->fetch_array($cel_pp_prod->mysql_result_main))
... 

seemed to exit without any passes of the loop, because $db->fetch_array() didn't find any records in the result set either.

After I switched both functions to the "normal" PHP 5.x versions, mysql_num_rows() and mysql_fetch_array() respectively, the images appeared in the popup as they should.

I'm not really sure why this hotfix worked (and your mileage may vary, so use it on your own risk :p). We modernized our hosting stack quite a bit, Nginx replacing Apache, newer MySQL and PHP versions etc., so I can only guess what's exactly the cause. But maybe my observations can help others or the author of the mod to further enhance it :)

Yours,

scribble


All times are GMT. The time now is 05:20 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.01390 seconds
  • Memory Usage 1,721KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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