latron22 Posted June 6, 2013 Share Posted June 6, 2013 Hi, I'm working with a company called Inventory Source to manage the inventory levels of our suppliers on our website. In order for them to do this they have to install a script on our site, but when they go to access it they receive an error 500. We just recently switched from GoDaddy to a2 hosting. There were no problems installing and accessing the script with GoDaddy but there were other issues that encouraged us to make the switch. Here is the message from the Inventory Source tech: "I'm recieving an error 500 when I try to access our script located at: http://college-etc.com/store/prestashop-1.5.1.php?group=Visitor&category=Home&tax=1 Please have your webhost review this and resolve the error." I've contacted a2 and they are looking into it but they also referred me to theforum. Any help or information would be greatly appreciated! Thanks, Chris Link to comment Share on other sites More sharing options...
vekia Posted June 6, 2013 Share Posted June 6, 2013 500 internal error means that something goes wrong with php script parse / ,htaccess file if you've got an access to the PHP error log - you should check it. Link to comment Share on other sites More sharing options...
latron22 Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) I contacted a2 and they looked over the PHP log for me and had this to say: "I have looked over the new php log. Below is the error message. PHP Fatal error: Cannot redeclare class ObjectModelCore in /home/college2/public_html/store/classes/ObjectModel.php on line 28 This is commonly caused by class file is trying to be redefined due to being included through multiple sources using "include" or "require" rather than "include_once" or "require_once". The developer will be able to better assist you in resolving the issue as this is outside our scope of support." Where should I go from here? Edited June 10, 2013 by latron22 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 check the source of the script if there is include / require - change it to include_once / require_once Link to comment Share on other sites More sharing options...
latron22 Posted June 10, 2013 Author Share Posted June 10, 2013 This is all that I could find: include_once(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php'); There was no need to change it but I can't find "require"...any other suggestions? Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 but any include / requre exist there? without "_once" sufix? Link to comment Share on other sites More sharing options...
latron22 Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) Removed the original code Edited July 2, 2013 by latron22 (see edit history) Link to comment Share on other sites More sharing options...
latron22 Posted June 30, 2013 Author Share Posted June 30, 2013 Any suggestions? Link to comment Share on other sites More sharing options...
latron22 Posted July 2, 2013 Author Share Posted July 2, 2013 "PHP Fatal error: Cannot redeclare class ObjectModelCore in /home/college2/public_html/store/classes/ObjectModel.php on line 28" On Line 28 of there is only a "{". Is there anything that I can do to fix this problem? Link to comment Share on other sites More sharing options...
vekia Posted July 2, 2013 Share Posted July 2, 2013 your code that you pastes is totally undreadable, sorry to bother you, but you should attach it as a file, not as a undreadable piece of code Link to comment Share on other sites More sharing options...
latron22 Posted July 2, 2013 Author Share Posted July 2, 2013 (edited) My mistake. I have attached a copy of the file for you to review. Thank you for your help. ObjectModel.php Edited July 2, 2013 by latron22 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 2, 2013 Share Posted July 2, 2013 ah so you attached objectmodel well, this isn't bug related to this file somewhere in your script you've got include (or require) instead include_once (or reuqire_once) exactly as i said above. it's hard to say without na access to the script that you've got. Link to comment Share on other sites More sharing options...
Recommended Posts