forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: drummerkid08 on January 20, 2006, 06:07:23 am

Title: help with php scripts?
Post by: drummerkid08 on January 20, 2006, 06:07:23 am
Hi!  Lately my gallery has had trouble loading.  Sometimes it works and other times it takes forever to load and times out.  I've e-mailed my host and they said that my coppermine database is not closing properly and there are a lot of open connections.  They said I need to check the php scripts or something.  I never had this problem until I updated.  Is there anyway to fix this?
Title: Re: help with php scripts?
Post by: Joachim Müller on January 21, 2006, 05:18:41 am
a mysql connection that is opened through a PHP script is being closed automatically when the PHP script has finished, so imo your webhost is wrong, see http://www.php.net/manual/en/function.mysql-close.php
Quote
mysql_close

(PHP 3, PHP 4, PHP 5)
mysql_close -- Close MySQL connection
Description
bool mysql_close ( [resource link_identifier] )

mysql_close() closes the non-persistent connection to the MySQL server that's associated with the specified link identifier. If link_identifier isn't specified, the last opened link is used.

Using mysql_close() isn't usually necessary, as non-persistent open links are automatically closed at the end of the script's execution.

I suggest that you post a link to your page if you're looking for answers
Title: Re: help with php scripts?
Post by: drummerkid08 on January 21, 2006, 05:35:04 pm
hi, where would i check those scripts at?  Here's the link to my gallery: www.shineon-media.com/gallery  sometimes it will load and i can get to the albums and stuff and then i hit the user panel button and it times out...other times i just can't get on.  It never happened till I upgraded.  My webhost has fantastico which upgraded it for me, but I was thinking maybe I should have deleted the gallery and then installed it new instead of trying to upgrade, but I don't know if that would have made a difference.
Title: Re: help with php scripts?
Post by: whmeeske on January 21, 2006, 06:49:10 pm
When I click the link to your gallery I get a login screen.
Do you have a username+password to enter your gallery?
Without it it's hard to look at it.
Title: Re: help with php scripts?
Post by: drummerkid08 on January 21, 2006, 07:08:15 pm
okay, i have changed it for the time being so everyone can have access...but half the time i try to get to teh gallery page it won't load...and other times it will.
Title: Re: help with php scripts?
Post by: Tranz on January 21, 2006, 07:23:41 pm
The gallery wasn't properly upgraded (most likely by Fantastico). I ran update.php and the gallery no longer requires a login.
Title: Re: help with php scripts?
Post by: drummerkid08 on January 21, 2006, 08:01:09 pm
The gallery wasn't properly upgraded (most likely by Fantastico). I ran update.php and the gallery no longer requires a login.

i just took the setting off so that you don't have to log in.    since fantastico didn't seem to upgrade it right, should i just delete and reinstall it?? cause it's still timing out on me.
Title: Re: help with php scripts?
Post by: whmeeske on January 21, 2006, 10:39:02 pm
I checked your galley, but everything seems to be OK. All pages are loading normally.
Is your problem reproducable? And does it happen when you do the same actions?
Title: Re: help with php scripts?
Post by: drummerkid08 on January 21, 2006, 11:15:49 pm
well, sometimes it loads when i put in the address, but when i click to go to the users manager, cause I usually require people to register, it never gets there, it like times out.  and then if i try to bring up the gallery again it won't come up.  I've had other people tell me it doesn't always load and that it's being extra slow.  sometimes it works, and sometimes it doesn't, but i never used to have a problem till i tried to upgrade it.
Title: Re: help with php scripts?
Post by: whmeeske on January 21, 2006, 11:42:20 pm
sometimes it works, and sometimes it doesn't, but i never used to have a problem till i tried to upgrade it.
I tried to load your gallery again, but it failed.
It seems your host has some problems with handling your gallery. I agree with GauGau.
Maybe the idea of doing a fresh install of your gallery isn't that bad (after you made a backup of your gallery database !!).
In case it's not working after that, then it's up to your host.
Title: Re: help with php scripts?
Post by: drummerkid08 on January 21, 2006, 11:57:10 pm
thanks for the  help!! yeah, I think i'll just delete it and start all over.  hopefully that'll sort out all the problems.  thanks again!!
Title: Re: help with php scripts?
Post by: Joachim Müller on January 22, 2006, 02:07:21 pm
no need to do a fresh install. Upgrade to cpg1.4.3, using the package we provide (download link at top of this page), doing as suggested in the upgrade instruction in the docs that come with it and that are available online as well (link at top of this page). Don't use Fantastico, it's buggy.