Almirena Posted November 20, 2007 Posted November 20, 2007 The error returned after an upgrade to the latest (5.2) PHP is Catchable fatal error: Object of class infoBox could not be converted to string in /home/sounds/public_html/catalog/includes/boxes/information.php on line 30 The code in line 30 is new infoBox($info_box_contents); Obviously I need to edit this, but I'm not sure to what. Can someone help?
♥geoffreywalton Posted November 20, 2007 Posted November 20, 2007 Have you applied all the updates required to run using mysql 5.2? There are several contributions covering this. google on gave http://www.zen-cart.com/forum/showthread.p...e=3&t=54378 and http://drupal.org/node/90345 Which could help if step 1 doesn't fix it. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Almirena Posted November 20, 2007 Author Posted November 20, 2007 I'll try those links - thank you in advance. EDIT: A quick look at those threads doesn't seem to show the specific problem I have - it's more focused "Argument #2 is not an array" which (so far) hasn't appeared for me... But I'll look through it more carefully tonight.
Almirena Posted November 21, 2007 Author Posted November 21, 2007 The two links you gave me really don't address the issue I'm having. I can't be the only person experiencing this problem... Has anyone any insight into this? At present, my store is not working as a result of this.
Almirena Posted November 22, 2007 Author Posted November 22, 2007 I'm sorry to bump this thread, but I'm utterly at a standstill and - like most of us - can't afford to have this happen. There are a couple of threads which talk about the "catchable fatal error", but they either don't address this particular issue or still don't have any answers or resolutions. As I said in my last post, I cannot possibly be the only person experiencing this problem. When I google for it, there are threads elsewhere... but nothing that helps or elucidates what needs to be edited. Some suggest reverting to a previous PHP - obviously that is UNSAFE (which is why PHP is continually upgraded), and I cannot be alone in thinking that reverting to a version of PHP which is unsafe.
germ Posted November 22, 2007 Posted November 22, 2007 Post the contents of: /home/sounds/public_html/catalog/includes/boxes/information.php Maybe someone can spot something. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Almirena Posted November 22, 2007 Author Posted November 22, 2007 The contents of boxes/information.php are: <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_HOWTO) . '">' . BOX_INFORMATION_HOWTO . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); '<a href="' . tep_href_link(FILENAME_HOWTO) . '">' . BOX_INFORMATION_HOWTO . '</a><br>' . new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Any help would be very very much appreciated.
Guest Posted November 22, 2007 Posted November 22, 2007 The contents of boxes/information.php are: <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_HOWTO) . '">' . BOX_INFORMATION_HOWTO . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); '<a href="' . tep_href_link(FILENAME_HOWTO) . '">' . BOX_INFORMATION_HOWTO . '</a><br>' . new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Any help would be very very much appreciated. Try changing '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); '<a href="' . tep_href_link(FILENAME_HOWTO) . '">' . BOX_INFORMATION_HOWTO . '</a><br>' . to '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_HOWTO) . '">' . BOX_INFORMATION_HOWTO . '</a>' );
Almirena Posted November 22, 2007 Author Posted November 22, 2007 Yes, I should have fixed that - I've edited that. (Thanks.) But that wouldn't have anything to do with this particular error which is still stopping the site from functioning. I know unquestionably it's occurring as a result of the latest PHP upgrade. I've been trawling through the internet trying to find out exactly what the problem is and what needs to be done... Still no luck. I'm about ready to give up and try another shopping cart, but I LIKE the functionality of osCommerce and dread the thought of starting from scratch again.
Guest Posted November 22, 2007 Posted November 22, 2007 Yes, I should have fixed that - I've edited that. (Thanks.) But that wouldn't have anything to do with this particular error which is still stopping the site from functioning. I know unquestionably it's occurring as a result of the latest PHP upgrade. I've been trawling through the internet trying to find out exactly what the problem is and what needs to be done... Still no luck. I'm about ready to give up and try another shopping cart, but I LIKE the functionality of osCommerce and dread the thought of starting from scratch again. You still having the error? I am surprised that every box does not display the error if that is the case. The posts on the web I saw indicated a php 5.2 issue, but they would not have had that error in their files.
Almirena Posted November 22, 2007 Author Posted November 22, 2007 Yes, it's definitely an error resulting from something not being turned into a string, happening only since the recent upgrade to PHP5.2. If I find a solution, I'll post it here for the benefit of others who will - I'm sure - have similar errors. How many people here are using osCommerce successfully after an upgrade to the latest PHP? I'd very much like to know... but I'd like even more to know how to fix this problem. I'll be pulling out my hair soon - and I don't think "bald" is a good look for me... EDIT: Let me add some of the other problems I've experienced since the upgrade. None of the product images show. None of the product descriptions show. No one can log in. In fact, nothing that should be in the centre "information area" of the page is showing up.
Guest Posted November 22, 2007 Posted November 22, 2007 Yes, it's definitely an error resulting from something not being turned into a string, happening only since the recent upgrade to PHP5.2. If I find a solution, I'll post it here for the benefit of others who will - I'm sure - have similar errors. How many people here are using osCommerce successfully after an upgrade to the latest PHP? I'd very much like to know... but I'd like even more to know how to fix this problem. I'll be pulling out my hair soon - and I don't think "bald" is a good look for me... EDIT: Let me add some of the other problems I've experienced since the upgrade. None of the product images show. None of the product descriptions show. No one can log in. In fact, nothing that should be in the centre "information area" of the page is showing up. If you install the standard information.php do you still get the eroor? http://www.oscommerce.com/community/contri...earch,php+mysql may or may not help. Had a quick search but I could not find the thread for php 5 upgrade. The other errors may be fixed when you get this one fixed, otherwise: If images do not display in IE, but they do in firefox, and if the includes/configure.php files are correct, and the images are in the /images directory, and the permissions on the /images directory and the images are correct, then, go to includes/application_top.php and where it says $request_type = (getenv('HTTPS') == 'on') try changing the "on" to "off". If that fixes the problem, then in the HTML source of /index.php file: <base href=""> should be something like: <base href="http://www.yourdomain.com/"> That is all I can offer at this stage, but keep posting. Maybe start a new thread called php 5.2 issues, and post the problems.
Jan Zonjee Posted November 22, 2007 Posted November 22, 2007 This part looks like you messed up adding new links (the line with the semi-colon comes last) '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); '<a href="' . tep_href_link(FILENAME_HOWTO) . '">' . BOX_INFORMATION_HOWTO . '</a><br>' . new infoBox($info_box_contents);
Almirena Posted November 23, 2007 Author Posted November 23, 2007 You're right - I had indeed neglected to edit that, but wasn't "seeing" it for some reason. That still wasn't the main problem that occurred as a result of the upgrade to PHP5.2, though. However, my server host just emailed me saying "Ta-da!"... and it's been fixed. I have asked him what he did, so that I can post that information here to help if anyone else is experiencing the same (or similar) problem. I will post that as soon as I receive a reply. Thank you to Germ, Coopco and Jan. (Jan and Coopco in particular for picking up that semi-colon and the line break. One of these days I'll go through all the osCommerce code and update the html to xhtml.
Almirena Posted November 23, 2007 Author Posted November 23, 2007 The problem was related to PHPSuexec. My server host overhauled the Apache configuration and replaced PHPSuexec with newer and better solutions. This is probably not going to be of great use to many - but it points out that server issues may cause such a generic error.
Guest Posted November 24, 2007 Posted November 24, 2007 The problem was related to PHPSuexec. My server host overhauled the Apache configuration and replaced PHPSuexec with newer and better solutions. This is probably not going to be of great use to many - but it points out that server issues may cause such a generic error. If it helps one person, the posting of the solution is worthwhile.
adrian.pearce Posted June 4, 2008 Posted June 4, 2008 The problem was related to PHPSuexec. My server host overhauled the Apache configuration and replaced PHPSuexec with newer and better solutions. This is probably not going to be of great use to many - but it points out that server issues may cause such a generic error. I have this issue, what did they do to fix the problem
Guest Posted April 28, 2009 Posted April 28, 2009 I have this issue, what did they do to fix the problem I also have this problem - did anyone ever come up with a solution as to what the host did to correct situation?
crapu Posted May 6, 2009 Posted May 6, 2009 Hello! Installed a few contributions (links manager II and addblog) and I get the following message when I try to access those specific pages Catchable fatal error: Object of class infoBox could not be converted to string in /home/medicals/public_html/includes/boxes/information.php on line 29 You can see that specific error accessing this page My information.php file contains this: <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_MY_POINTS_HELP) . '">' . BOX_INFORMATION_MY_POINTS_HELP . '</a><br>' . // Points/Rewards Module V2.1rc2a '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); '<a href="' . tep_href_link(FILENAME_LINKS) . '">' . BOX_INFORMATION_LINKS . '</a><br>' . // Links Manager II v1.00 added new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Can somebody help with the solution for this problem, please?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.