BUG when you try to list all images


  • Developer

    revision 2547

    This bug is new and has appeared with the last revisions. I can not list the images when I click on “List All Images”, in the browser appears an error " Content Encoding Error". If I setup the apache:

    zlib.output_compression = On in /etc/php.ini
    The page appears but another error gets:
    "Warning: current() expects parameter 1 to be array, string given in /var/www/html/fog/lib/fog/Image.class.php on line 196 Warning: ob_start(): output handler ‘ob_gzhandler’ conflicts with ‘zlib output compression’ in /var/www/html/fog/management/index.php on line 42 "


  • Senior Developer

    No,

    Sorry I didn’t get back sooner. Yes you’ll likely still have the select_db messages, but no if all is working you should be good.

    My guess is some of your images are setup without having a storage group assigned to them. All that release did was make it so it would “fail gracefully?” as I like to call it.



  • [quote=“Tom Elliott, post: 38948, member: 7271”]I know what’s wrong. The select_db is still not it.

    Can you give me a print out of imageID’s you have and the imageGroupAssociation tables?[/quote]

    Tom, do you still need this information?

    Thanks.



  • Tom, I just installed SVN 2637 and it worked!


  • Senior Developer

    Okay:

    Please try 2637. I’m trying some better error handling, hopefully.


  • Senior Developer

    I know what’s wrong. The select_db is still not it.

    Can you give me a print out of imageID’s you have and the imageGroupAssociation tables?



  • Yes, the select_db(). The issue where when I choose “List All Images” and nothing is displayed.

    Thanks.


  • Senior Developer

    [quote=“Squeaner, post: 38940, member: 350”]Tom, I just installed the latest SVN Revision 2636 and still have the issue.

    Let me know if I can help in any way to help troubleshoot.[/quote]

    Which issue? The select_db()?



  • Tom, I just installed the latest SVN Revision 2636 and still have the issue.

    Let me know if I can help in any way to help troubleshoot.


  • Senior Developer

    Try the latest svn 2612 and it should, hopefully, be fixed.


  • Senior Developer

    Alright,

    Hopefully this should be fixed.


  • Senior Developer

    I know what the issue is, but I don’t know of a good means to test.

    Basically, it’s trying to detect if the database is available. If it’s not, (such as when it’s performing an upgrade and mysql is restarting) it’s going to throw the select_db() error.



  • It’s not, but I’m just trying to provide you with anything I can that will help you identify the root of the issue.

    I appreciate all that you do. Keep up the good work.


  • Senior Developer

    Forgive my brashness here, but I fail to understand how a warning is considered a bug?



  • Tom, I installed SVN 2609, but the bug still seems to be present for me.

    I checked my PHP config and “display_errors” and “display_startup_errors” to are both [B]Off[/B].

    Here’s my configuration:
    Ubuntu Server 14.04.1 LTS 64-bit
    Apache2 - 2.4.7
    PHP5 - 5.5.9-1ubuntu4.5
    MySQL:
    Version: 5.5.40-0ubuntu0.14.04.1
    Version: 5.5.35+dfsg-1ubuntu1

    Here’s the warnings from apache error.log

    [Mon Nov 10 11:58:49.904242 2014] [:error] [pid 23103] [client 172.16.21.7:57448] PHP Warning: mysqli::select_db(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 74, referer: [url]http://172.16.21.254/fog/management/index.php?node=image&sub=list[/url]
    [Mon Nov 10 11:58:49.904819 2014] [:error] [pid 23103] [client 172.16.21.7:57448] PHP Warning: mysqli::select_db(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 74, referer: [url]http://172.16.21.254/fog/management/index.php?node=image&sub=list[/url]

    [url="/_imported_xf_attachments/1/1497_foglog.txt?:"]foglog.txt[/url]


  • Senior Developer

    Should be fixed in 2609, the display of the error of mysqli you’re seeing is probably because you have display error’s on?



  • Tom, I’m having this issue with SVN Revision 2608. I can’t get the “List All Images” list to appear.

    I’m finding the following error in apache.log.

    [Mon Nov 10 10:08:19.920633 2014] [:error] [pid 15849] [client x.x.x.x:55628
    ] PHP Warning: mysqli::select_db(): Couldn’t fetch mysqli in /var/www/fog/lib/d
    b/MySQL.class.php on line 74, referer: [url]http://x.x.x.x/fog/management/index[/url]
    .php?node=image&sub=edit&id=31

    I replaced the IP addresses with x.x.x.x.

    Let me know how I can help troubleshoot.


  • Developer

    Works!! Thanks


  • Senior Developer

    2548 should fix the storage group assignment on image creation.


  • Developer

    No :) The problem is when you create a new definition. The entry in the DB is OK (FOG creates the image definition) but later … doesn’t work.

    ±--------±-----------±----------±-----------±-------------±---------------±--------------------±--------------±--------------±----------±------------±---------------------±----------±------------±--------------------+
    | imageID | imageName | imageDesc | imagePath | imageProtect | imageMagnetUri | imageDateTime | imageCreateBy | imageBuilding | imageSize | imageTypeID | imagePartitionTypeID | imageOSID | imageFormat | imageLastDeploy |
    ±--------±-----------±----------±-----------±-------------±---------------±--------------------±--------------±--------------±----------±------------±---------------------±----------±------------±--------------------+
    | 8 | monodisk | | monodisk | 0 | | 2014-11-03 19:37:04 | fog | 0 | 0 | 2 | 1 | 5 | NULL | 0000-00-00 00:00:00 |
    ±--------±-----------±----------±-----------±-------------±---------------±--------------------±--------------±--------------±----------±------------±---------------------±----------±------------±--------------------+

    Errors:
    [LIST]
    []"Warning: current() expects parameter 1 to be array, string given in /var/www/html/fog/lib/fog/Image.class.php on line 196 Fatal error: Uncaught exception ‘Exception’ with message ‘Image does not have a storage group assigned.’ in /var/www/html/fog/lib/fog/Image.class.php:198 Stack trace: #0 /var/www/html/fog/lib/fog/SubMenu.class.php(44): Image->getStorageGroup() #1 /var/www/html/fog/management/index.php(90): SubMenu->__construct() #2 {main} thrown in /var/www/html/fog/lib/fog/Image.class.php on line 198 "
    [
    ]“Warning: current() expects parameter 1 to be array, string given in /var/www/html/fog/lib/fog/Image.class.php on line 196 Warning: ob_start(): output handler ‘ob_gzhandler’ conflicts with ‘zlib output compression’ in /var/www/html/fog/management/index.php on line 42”
    [/LIST]


Log in to reply
 

447
Online

38927
Users

10692
Topics

101463
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.