• I have some trouble with psngallery.

    I get this error:
    Fatal error: Call to a member function on a non-object in /home/virtual/viums.dk/public_html/blog/wp-content/plugins/psnGallery2.php on line 97

    What should i do?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter the_snitch

    (@the_snitch)

    I have to tables within the database (cpg132_ and wp_)
    Should i include the wp_ prefix?
    How do i do it?

    A lot of folks are having the “line 97” problem. There’s a fix posted at https://blog.idahocline.info but it didn’t work for me, and it doesn’t seem to work for many others as well. I did a var_dump on $wpdb inside the psnCPGGetConfig() function, and it comes up NULL. My guess is there’s something about my ISP’s PHP and/or web server configuration that’s making global WP variables like this unavailable in certain contexts. Specifically, they come up null if you follow the instructions and attempt to load the plugin directly in your browser, thus causing the error on line 97. The var_dump does return a positive value as long as I’m not just pointing my browser directly to the plugin.

    I decided to skip past this issue and see if I could get the plugin working anyway. I loaded wp-admin/psnCPGAmin.php in my browser. The page came up blank. I compared its code to my other plugins and noticed it was lacking the line

    require_once('admin.php');

    so I added that at the top of the file and then the page came up correctly. I can now see the albums and photos in the admin page. (I’m using WP 1.5, BTW).

    The psnGallery tags also work for me in my posts. So even though the wp-content/plugins/psnGallery2.php?setup link still doesn’t work for me, the plugin itself does. In looking through the code for psnGallery2.php, I find no reference to the setup argument, so I don’t think it does anything anyway.

    Note on the admin page: if you’re trying to figure out the Picture ID of a picture when viewing it on the admin page, you need to mouse over it so the title info will pop-up – the Picture ID is the first number in the title.

    How did you get your pictures to show on the admin page?

    None of my albums show, and by reading what you posted above I think I have everything correct.

    All I see is:

    Album -1: No picture found

    I also got the “line 97” error but the “famous fix” did nothing.

    I also add the require_once(‘admin.php’); which also did not help.
    Since I actually have no clue psnGallery2.php?setup is supposed to be accomplishing anyway, I just edited psnGallery2.php and changed the Description to:

    Once it is activated, <a href="https://my-url-com/wp-admin/psnCPGAdmin.php">Configure the Coppermine values</a> !

    Cheating? Perhaps, but it gets me to where I can view the PictureIDs…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trouble with psngallery!’ is closed to new replies.