forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upgrading => Topic started by: rissa on January 13, 2006, 03:17:51 am

Title: Fatal error: Call to a member function on a non-object
Post by: rissa on January 13, 2006, 03:17:51 am
After loging into the account at the login page; http://www.bamargera.net/gallery/login.php I get this error...

Fatal error: Call to a member function on a non-object in /home/bamarger/public_html/gallery/login.php on line 37

And I just learned mySQL so I'm not familiar with anything, may someone please help me? Thank you.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Paver on January 13, 2006, 03:32:17 am
Please post a non-admin test account.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: rissa on January 13, 2006, 03:53:25 am
Please post a non-admin test account.

I'm sorry, I can't even do that cuz the gallery doesn't work to even attempt that from some other errors.  ???
Would you like to PM me and you can login using my password and such?
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Paver on January 13, 2006, 04:06:55 am
No, my mistake.  I should have realized that.  Your version is 1.3.5 so you should have posted in that forum.  An admin will probably move this thread over there.

Did this error just happen?  How long have you been using Coppermine?

I would guess your MySQL server is not responding.  Do you have phpMyAdmin to logon to the MySQL account directly (or some other webhost panel)?
Title: Re: Fatal error: Call to a member function on a non-object
Post by: rissa on January 13, 2006, 04:20:59 am
It just happened. And I only just learned mySQL so I'm completely lost. :( I know it's probably fault for not studing it more.
I actually just switched to coppermine from 4images.
Coppermine was very easy and learnable till this error accored.

I do have a panel and it's located here, https://st31.startlogic.com/phpMyAdmin-2.6.3/index.php
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Paver on January 13, 2006, 04:27:18 am
Have you tried to logon?  If you can, then it must be something else.  If you cannot, then maybe your webhost's MySQL server is down and will be up later.

Was the Coppermine installation working properly before this happened?  Did you change any core scripts?  If it was working and you didn't change any core scripts or change anything manually in the MySQL database, you might try to run install.php again to setup the MySQL configuration again. 

Once you get things working, you should upgrade to 1.4.3.  It's easy to upgrade and there are lot of useful features in the current version.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: rissa on January 13, 2006, 04:44:32 am
Yes, I have loged in and that works fine from there.

It's just when I go to log in to the actually gallery to update and upload pictures.

I already have so many pictures and things in there. And I do recall, on accident deleting a script so I reuploaded it from the backup, and that's when this error occured.

If I go and do the reinstallation, will my pictures still be saved? Or do I have to back them up?
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Paver on January 13, 2006, 05:00:45 am
I would recommend backing up your database first.  It's easy to do in phpMyAdmin under "Export" or "Dump Schema & Data".  Save it to a file on your computer.  Make sure to check off structure and data and select SQL for the type.  I usually check off "Complete inserts" and "extended inserts" as well but I don't think it's necessary.  You could output one file without (which is the default) and one with to be safe.  Open the file with a text editor to make sure it looks like your data is in there.  You don't have to know MySQL to do this; that's the magic of phpMyAdmin.

You probably should backup up your files as well, but I'm not sure how an installation or re-installation or upgrade would delete your photos.  If you have some custom files like anycontent.php or your theme, you should back those up at least.  If it's easy for you to backup your whole folder, go ahead to be safe.

Then you could try a re-installation or maybe a straight upgrade to 1.4.3.  Someone else might know better if there are risks with doing an upgrade in your case, but I think it should be OK.  The upgrade will give you a clean copy of the 1.4.3 scripts and convert your database to the new version (which is quite simple). 

Unless you touched your database; in that case something might go haywire.  If you only deleted a script, your database should be fine.

If you back things up, feel free to try things; I would do the 1.4.3 upgrade.  If things go strange, you can restore your database & files back using your backup and try again.  The documentation (linked above and in the 1.4.3 package) tells you step-by-step how to upgrade.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: rissa on January 13, 2006, 05:23:31 am
Okay, I will try all this.

I have not touched my database.

Where can you get the updated version of coppermine? The one you are talking about 1.4.3?

And by backing up my files and such I am backing up the photos as well right?
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Paver on January 13, 2006, 05:31:22 am
You can download 1.4.3 by using the link at the top of this page: "Downloads".

Yes, if you backup your entire folder including subfolders, you will backup your current Coppermine files plus photo albums.  The albums are located under the subdirectory "albums", unless you set them up someplace else.  In that case, I guess I'm wrong and you'll have to back them up from where they are.

To backup everything, you back up two things: your files and your database.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Tranz on January 13, 2006, 05:36:57 am
Backing up isn't something that you should reserve for updates. It should be an ongoing thing you do so that it's not a big project when you need to do a backup, since you can do it incrementally, and you don't lose data when horrible things happen. We've seen it many times, unfortunately, when something happens with the server and people lose precious data along with the (sometimes) irreplaceable photos.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: rissa on January 13, 2006, 06:03:37 am
Alright, I just updated coppermine to 1.4.3 and I have my photos saved, but as I go to the gallery I now get this error...

While executing query "SELECT extension, mime, content, player FROM cpg135_filetypes;" on 0

mySQL error: Unknown column 'player' in 'field list'
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Tranz on January 13, 2006, 07:18:35 am
You missed a step... running update.php. I just did it for you and the gallery is up, but offline.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Paver on January 13, 2006, 07:21:22 am
Yeah, I was just going to say what TranzNDance said - really!  update.php adds that column as part of the upgrade.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: rissa on January 13, 2006, 05:12:35 pm
Thank you so much guys!

I did put the gallery offline to work on something the first time with uploading.

I logged in this morning, and the CONFIG isn't working to put it back up. it's just a little blank space and no writing to edit and nothing comes up to change my status. Is there something missing for that? Here's all that DEBUG info

USER:
------------------
Array
(
    [ID] => b91530b8c45996c7d0ab369d38e52e4e
    [am] => 1
    [liv] => Array
        (
           
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => rissa
    [groups] => Array
        (
           
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 10
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
   
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Joachim Müller on January 13, 2006, 06:19:38 pm
don't post debug output unless requested.
Title: Re: Fatal error: Call to a member function on a non-object
Post by: Paver on January 13, 2006, 06:42:45 pm
rissa: You have to be more detailed about what's happening but that doesn't mean you should post everything on the page like debug info because some things are not related.  What I mean is what's happening right now?  You login, everything looks normal, you click on the config button, but nothing comes up - is that what you see?

Oh,wait a second, let's pause.  Your original problem is now solved (by upgrading), so you should start a new thread with your current problem.  There's a one question per thread policy, for organization and archival purposes (to help other people).
Title: Re: Fatal error: Call to a member function on a non-object
Post by: rissa on January 13, 2006, 08:13:12 pm
^^ Thank you, will do a new thread right now. :)