help with php scripts? help with php scripts?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

help with php scripts?

Started by drummerkid08, January 20, 2006, 06:07:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

drummerkid08

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?

Joachim Müller

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
Quotemysql_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

drummerkid08

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.

whmeeske

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.

drummerkid08

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.

Tranz

The gallery wasn't properly upgraded (most likely by Fantastico). I ran update.php and the gallery no longer requires a login.

drummerkid08

Quote from: TranzNDance 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.

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.

whmeeske

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?

drummerkid08

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.

whmeeske

Quote from: drummerkid08 on January 21, 2006, 11:15:49 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.

drummerkid08

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!!

Joachim Müller

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.