mjahern Posted August 13, 2005 Share Posted August 13, 2005 Hi Just wondering if anyone could shed some light on a problem that has just cropped up. Having succesfully edited the create_account.php file and uploaded it to my website I have been getting this error when I click on the "Create An Account" button on the index page of the website. Fatal error: Cannot redeclare tep_db_connect() in /var/shops/shared/secure/globallearning/includes/functions/database.php on line 13 I have not edited the index.php page or the database.php page. The link worked perfectly until this morning and now I get the above error constantly. I have uploaded the original create_account.php page but to no avail. I have even tried uploading the original versions of the index.php and the database.php files although they were never touched in the first place. Could anyone give me any advice at all? Many thanks in advance John Link to comment Share on other sites More sharing options...
WiseWombat Posted August 13, 2005 Share Posted August 13, 2005 Hi Just wondering if anyone could shed some light on a problem that has just cropped up. Having succesfully edited the create_account.php file and uploaded it to my website I have been getting this error when I click on the "Create An Account" button on the index page of the website. Fatal error: Cannot redeclare tep_db_connect() in /var/shops/shared/secure/globallearning/includes/functions/database.php on line 13 I have not edited the index.php page or the database.php page. The link worked perfectly until this morning and now I get the above error constantly. I have uploaded the original create_account.php page but to no avail. I have even tried uploading the original versions of the index.php and the database.php files although they were never touched in the first place. Could anyone give me any advice at all? Many thanks in advance John <{POST_SNAPBACK}> Could be your host has a problem with the databse ? Fatal error: Cannot redeclare tep_db_connect() ?? or unless your have a problem in your configure.php files pointing to the wrong database ref ( WARNING ) I think I know what Im talking about. BACK UP BACK UP BACK UP BACK UP Link to comment Share on other sites More sharing options...
mjahern Posted August 13, 2005 Author Share Posted August 13, 2005 Could be your host has a problem with the databse ?Fatal error: Cannot redeclare tep_db_connect() ?? or unless your have a problem in your configure.php files pointing to the wrong database ref <{POST_SNAPBACK}> Thanks for the reply. I'm hoping it's the host because I've haven't altered the configure.php file either. It's got me really confused but that's nothing new!! :rolleyes: Thanks again John Link to comment Share on other sites More sharing options...
241 Posted August 13, 2005 Share Posted August 13, 2005 have you added any contributions recently or modified any files as cannot redeclare can be caused by the function having already been declared No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
mjahern Posted August 13, 2005 Author Share Posted August 13, 2005 have you added any contributions recently or modified any files as cannot redeclare can be caused by the function having already been declared <{POST_SNAPBACK}> I've added nothing although I have altered the create_account.php to exclude some items that are not required like - postcode, state, suburb, gender and age - other than that I honestly cannot think of anything else I have done. The index page displays correctly after I added some HTML text but it's the link to create an account that displays the error. What could I have done to alter things so drastically? I'm at a complete loss! Link to comment Share on other sites More sharing options...
241 Posted August 13, 2005 Share Posted August 13, 2005 in your configure.php files do you have define('USE_PCONNECT', 'false'); or define('USE_PCONNECT', 'true'); No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
FalseDawn Posted August 13, 2005 Share Posted August 13, 2005 Having succesfully edited the create_account.php file and uploaded it to my website You probably uploaded the create_account.php file to the /languages folder by mistake, and hence are trying to include this function twice via the included application_top.php Link to comment Share on other sites More sharing options...
mjahern Posted August 13, 2005 Author Share Posted August 13, 2005 in your configure.php files do you have define('USE_PCONNECT', 'false'); or define('USE_PCONNECT', 'true'); <{POST_SNAPBACK}> It says: define('USE_PCONNECT', 'false'); Regards John Link to comment Share on other sites More sharing options...
FalseDawn Posted August 13, 2005 Share Posted August 13, 2005 It's nothing to do with pconnect Link to comment Share on other sites More sharing options...
mjahern Posted August 13, 2005 Author Share Posted August 13, 2005 You probably uploaded the create_account.php file to the /languages folder by mistake, and hence are trying to include this function twice via the included application_top.php <{POST_SNAPBACK}> Good point but sadly no... :blush: Link to comment Share on other sites More sharing options...
241 Posted August 13, 2005 Share Posted August 13, 2005 do you have a localised copy of your files which you can run a search on? if so search for tep_db_connect a default install should give you 4 files with this statement. admin/includes/application_top.php admin/includes/functions/database.php catalog/includes/application_top.php catalog/includes/functions/database.php No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
mjahern Posted August 13, 2005 Author Share Posted August 13, 2005 do you have a localised copy of your files which you can run a search on? if so search for tep_db_connect a default install should give you 4 files with this statement. admin/includes/application_top.php admin/includes/functions/database.php catalog/includes/application_top.php catalog/includes/functions/database.php <{POST_SNAPBACK}> Excellent point and I've just uploaded the original configure.php and got this:- Warning: I am able to write to the configuration file: /var/shops/shared/shop.globallearning.ie/globallearning/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. I'm completely lost now - I really am. Contemplating losing it all and uploading it all from new. Not sure what that'll do as the only file I've altered is the create_account.php file...!! :'( Backups of originals don't seem to make any difference as the same errors appear. Thanks again for all your help John Link to comment Share on other sites More sharing options...
241 Posted August 13, 2005 Share Posted August 13, 2005 the warning is due to the wrong permissions being on the configure.php file change the permissions using your ftp program to CHMOD 444 or if on windows right click and set to read only No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.