Jump to content

Archived

This topic is now archived and is closed to further replies.

HoundComicsCIO

Incorrect coding issue(?) Please help.

Recommended Posts

Hello all.

 

     So my store suddenly stopped working on me. I hadn't made any updates or upgrades in a while and about a month ago it would only load the home page (www.houndcomics.com/store) but when clicking on any link I get a 500 Internal server error.

 

     I contacted my webhost and they said that my situation was due to a scripting error/incorrect code. The report they gave me is as follows:

 

[25-Sep-2014 07:14:29 UTC] PHP Warning:  ini_set(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.  in /home/thebrims/public_html/houndcomics.com/store/includes/application_top.php on line 15

[25-Sep-2014 07:14:29 UTC] PHP Warning:  require(includes/languages/.php): failed to open stream: No such file or directory in /home/thebrims/public_html/houndcomics.com/store/includes/application_top.php on line 284

[25-Sep-2014 07:14:29 UTC] PHP Warning:  require(includes/languages/.php): failed to open stream: No such file or directory in /home/thebrims/public_html/houndcomics.com/store/includes/application_top.php on line 284

[25-Sep-2014 07:14:29 UTC] PHP Fatal error:  require(): Failed opening required 'includes/languages/.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/thebrims/public_html/houndcomics.com/store/includes/application_top.php on line 284 

 

     I also indicated that I could not access my ADMIN area, that when I do I get the following error:

 

Error!

Unable to determine the page link!

Function used:

tep_href_link('', '', 'NONSSL')

 

     The host replied with the following error code:

 

[05-Oct-2014 22:47:40 America/Chicago] PHP Warning:  http_build_query(): Parameter 1 expected to be Array or Object.  Incorrect value given in /home/thebrims/public_html/houndcomics.com/store/admin/login.php on line 63

[05-Oct-2014 22:49:10 America/Chicago] PHP Warning:  http_build_query(): Parameter 1 expected to be Array or Object.  Incorrect value given in /home/thebrims/public_html/houndcomics.com/store/admin/login.php on line 63

 

     My current version is 2.3.1. I know I am way overdue for an upgrade, but at this point I cannot even access anything to be able to backup and upgrade.

 

     Any help would be greatly appreciated.

 

Thank you.

Share this post


Link to post
Share on other sites

@@HoundComicsCIO

 

Check with your hosting provider if they upgraded php version.


Like post..hit LIKE button.

 

osCommerce | Joomla | WordPress | Magento | SEO | CakePHP | CI

 

Guaranteed Website Speed Optimization!!

Share this post


Link to post
Share on other sites

Hi,

 

you should consider updating your store to the most recent version of OSC.

 

Did you change anything in your store? Can you please post the lines 10-20 of your includes/application_top.php?

 

I don't know if the first error-message and the language-error are connected. However you can try this: 

http://forums.oscommerce.com/topic/396659-no-language-without-register-globals/#entry1695916

 

About your admin-problem: http://forums.oscommerce.com/topic/397934-my-site-has-turned-volatile-help/page-2#entry1704677

 

Seems to be working.

 

Please note, before you do anything: Do a backup! Do a backup! Do a backup!

 

AD

Share this post


Link to post
Share on other sites

If you can install the latest standard osC 2.3.4 version, and have it working, then you know it is something in your (old) code that is no longer up-to-date.

 

If osC 2.3.4 doesn't work, you have a serious issue to sort out first with your hosting company to get that functioning first as a proof of concept before making the effort to update your custom site.


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

your host upgraded php version and did not inform you about it.

 

you can see your site still somehow works if would add the language id to the url's like:

 

product_info.php?products_id=126&language=en

 

if you want to see your admin:

 http://www.yoursite.com/admin/index.php?language=en

or

 http://www.yoursite.com/admin/login.php?language=en

 

As it is just to let you know what is wrong with it, and still let you have a bit of control of your site, you can do it like that until you made the upgrade.

Share this post


Link to post
Share on other sites

It does sound like your host moved from PHP 5.2 (or earlier) to at least 5.3 (accounting for the timezone warnings). That may also account for some of the object/array warnings. Versions of osC prior to 2.3.3.something also had a problem with a missing $language variable (includes/languages/.php problem). Upgrading to 2.3.4 (either step by step or migrating your database to a fresh install) should solve all these problems.

Share this post


Link to post
Share on other sites

Thank you all for your help and suggestions. It is very much appreciated.

 

And of course as my luck would have it, as soon as I try to implement anything now I get a 500 error as soon as I try to navigate to my store at all. Looks like I'm just going to have to cut my losses and do a clean install and relist my store from scratch.

 

 

Quick question though, is there any way to pull out my settings and store data from the back end?

Share this post


Link to post
Share on other sites

In case your browser has cached an older page, do a Ctrl+F5 when you get a 500 error, to make sure you're working with a fresh page.

 

I'm a bit leery about advising you to take shortcuts in transferring data from the old store to the reinstallation. It's possible that you messed up something in the configuration database. Without knowing exactly step by step what you did (and where you started from), it could be almost anything happening "as soon as I try to implement anything".

Share this post


Link to post
Share on other sites

Yeah, it's not so much shortcuts that I'm looking for. At this point I think the store is lost. I just want to be able to retrieve my data so I can use it to populate the new store. If I'm not able to that's fine, I'll just have to start from scratch. Which I was trying to avoid.

Share this post


Link to post
Share on other sites

You will never know until you try install a 2.3.4 with a new database in a directory called development and make x 2 new  databases

 

One is to copy your original 2.3.1 so you do not lose anything if you make a mistake so database_copy and database_new_2.3.4

 

Then see post #14 here http://forums.oscommerce.com/topic/398138-customer-log-in-issue/

 

Then go to php my admin and run the x 3 query's on database copy

 

(no guarantee but I think that is all you can check here yourself http://library.oscommerce.com/Online&en&oscom_2_3&release_notes)

 

now adjust your new 2.3.4 install includes/configure.php and admin/includes/configure.php  to reflect the new database (database_copy)

  define('DB_SERVER_USERNAME', '');
  define('DB_SERVER_PASSWORD', '');
  define('DB_DATABASE', 'osCommerce'); 

Now upload  your images and redo your addons and design changes now the jquery has changed(upgraded) so getting back your old theme and design is a bit fiddly you will first have the standard blue redmond theme but lets get to that later also not so difficult

 

Most important is getting the basic shop up and running again

 

You may have to uninstall and reinstall certain modules in admin but again meet that if it comes

 

Regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

×