Ian Posted February 3, 2003 Share Posted February 3, 2003 I thought a new topic was warranted seeing as I seem to have found the fix for this. The problem is obviously related to some problem/bug/misconfiguration with 4.3.0. Hiowever the problem is caused by just one line in my GV code. The line is in includes/classes/order_total.php in the collect_posts function $GLOBALS[$post_var] = $HTTP_POST_VARS[$post_var]; what appears to be happening is that if $HTTP_POST_VARS[$post_var] is null then the $GLOBALS array becomes corrupted. The fix is to change the line to if ($HTTP_POST_VARS[$post_var]) $GLOBALS[$post_var] = $HTTP_POST_VARS[$post_var]; make the change and hey - Bob's your Uncle 8) Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
orangechicken Posted February 3, 2003 Share Posted February 3, 2003 I have verified that this *does* fix the bug! HOOOOOORAY FOR IAN! though I'll rib you a little bit for not using if( !empty( <post_var> )) from the beginning <big big big big grin> -chicken Quote Link to comment Share on other sites More sharing options...
orangechicken Posted February 3, 2003 Share Posted February 3, 2003 Now, what can we point to as the issue in PHP? Because like Ian said, there's obviously something wrong with PHP 4.3.0. I'm not certain if that patch for PHP (like others have mentioned) fixes the problem outright. -chicken ps. I'm mostly posted another comment because I forgot to check 'Notify me...' Quote Link to comment Share on other sites More sharing options...
Ian Posted February 3, 2003 Author Share Posted February 3, 2003 The fact that that one line of codethat has never caused problems before, and only emerged as a problem in 4.3.0 suggests strongly that their is a problem with 4.3.0. Whether this will manifest itself elswhere is anyones guess. BTW I would like to say thanks to Ryan Walker, who gave me unrestricted access to his server. Without that we could have been looking at this probblem for who knows how long. Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
lap Posted February 4, 2003 Share Posted February 4, 2003 Would that address the problem of Directory error too ? http://www.oscommerce.com/forums/viewtopic.php?t=33325 Quote Link to comment Share on other sites More sharing options...
orangechicken Posted February 4, 2003 Share Posted February 4, 2003 lap, not at all the same issue. Sorry bud. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2003 Share Posted February 5, 2003 yeah it fixed the problem and everythings allright... but the strange part was: no problem with the apache on linux but problem occured with apache on win2000 with same php version.... Quote Link to comment Share on other sites More sharing options...
orangechicken Posted February 5, 2003 Share Posted February 5, 2003 What do you mean 'no problem with the apache on linux'? My issues with the GV code and PHP4.3.0 was on linux not win2k. -chicken Quote Link to comment Share on other sites More sharing options...
toolcrazy Posted February 5, 2003 Share Posted February 5, 2003 You need to make this post "Sticky"!! Quote Steve ------------------------- Link to comment Share on other sites More sharing options...
Guest Posted February 9, 2003 Share Posted February 9, 2003 Have you found any other problems with PHP 4.3 I cannot get osC to work using PHP 4.3 No products displayed in Admin or Catalog. Quote Link to comment Share on other sites More sharing options...
freddycodes Posted February 10, 2003 Share Posted February 10, 2003 I had to change define('DB_SERVER', $HTTP_ENV_VARS['localhost'); to define('DB_SERVER', "localhost"); Because $HTTP_ENV_VARS was breaking my configuration in 4.3.0 Quote Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2003 Share Posted February 11, 2003 what file did you change those settings to? my configure.php already is set that way Quote Link to comment Share on other sites More sharing options...
aperfecthost Posted February 11, 2003 Share Posted February 11, 2003 glad to have found this posting. I just assumed I did something wrong. I'm on PHP 4.3 also and this fixed my problem! Great going IAN! Do you take $$ contributions for all your help? can't afford much, but every bit helps, right? Quote Link to comment Share on other sites More sharing options...
Larskovitch Posted February 11, 2003 Share Posted February 11, 2003 **Also posted in General Chat** My fully functional shop suddenly comes with error messages since my ISP upgraded php to 4.3.0. In the catalog/default-section (storefront) header, i suddenly got an eror message reading: ---------------------- Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/www/htdocs/consumax/) in /www/htdocs/consumax/catalog/includes/header.php on line 30 Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created. ---------------------- I could make this invisible by changing "true" to "false" in catalog/includes/ header.php : // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'false') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { tep_output_warning(WARNING_SESSION_DIRECTORY_NON_EXISTENT); } elseif (!is_writeable(tep_session_save_path())) { tep_output_warning(WARNING_SESSION_DIRECTORY_NOT_WRITEABLE); } } } ------------------------------------------------------------------------- In the admin section i get the following header: Warning: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead. in /www/htdocs/consumax/admin/includes/languages/dutch.php on line 12 This error however results in more errors as soon as i try to update a product..... for example: Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/consumax/admin/includes/languages/dutch.php:12) in /www/htdocs/consumax/admin/includes/functions/general.php on line 18 ------------------------------- Does anybody have similar experiences, or does anybody know how to fix those errors? Thnx in advance! Larskovitch Quote Life is good...... but not for me ;-) Al Bundy Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2003 Share Posted February 11, 2003 Hi Lars, I have exactly the some error, because whe are with our shop on the some server by DEHEEG.NL My error: When I add or update a new_product I get the next error: (admin) Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/domain/shop/admin/includes/languages/dutch.php:12) in /www/htdocs/domain/shop/admin/includes/functions/general.php on line 18 It must have something to do with this PhP version upgrade.!! So far as I see, it's onlt the admin section that gives errors. Quote Link to comment Share on other sites More sharing options...
toolcrazy Posted February 11, 2003 Share Posted February 11, 2003 As I said in the other post. Try both suggestions and see what happends. It is worth a try. You'll never know unless you try. Quote Steve ------------------------- Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2003 Share Posted February 11, 2003 I am already trying...!! I let you known if it's helps..!! it not.. I'l BE BACK (Swarzenegger) Greetings JJ Quote Link to comment Share on other sites More sharing options...
toolcrazy Posted February 11, 2003 Share Posted February 11, 2003 Here is another post to try on the "Header already sent" http://www.oscommerce.com/forums/viewtopic.php...der=asc&start=0 Quote Steve ------------------------- Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2003 Share Posted February 11, 2003 You guys are having different problems than me. My problem is osCommerce does not display any products in either the admin or the catalog. I have checked, they are in the database. Anyone else run into this? Mike Quote Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2003 Share Posted February 12, 2003 Hi l3ackdraft, Wat is the url of your website?? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2003 Share Posted February 12, 2003 Hi toolcrazy, Thanks...read that topic already, I am still investigate and try some things. But still no solution If there is progress I report it right away JJ Quote Link to comment Share on other sites More sharing options...
sojomy Posted February 12, 2003 Share Posted February 12, 2003 I thought a new topic was warranted seeing as I seem to have found the fix for this. The problem is obviously related to some problem/bug/misconfiguration with 4.3.0. Hiowever the problem is caused by just one line in my GV code. The line is in includes/classes/order_total.php in the collect_posts function $GLOBALS[$post_var] = $HTTP_POST_VARS[$post_var]; what appears to be happening is that if $HTTP_POST_VARS[$post_var] is null then the $GLOBALS array becomes corrupted. The fix is to change the line to if ($HTTP_POST_VARS[$post_var]) $GLOBALS[$post_var] = $HTTP_POST_VARS[$post_var]; make the change and hey - Bob's your Uncle 8) Ok, now I'm confused. I DL'd the newest snapshot, and the includes/classes/order_total.php file doesn't have that line anywhere in it. So I look at the CVS repository here : http://cvs.sourceforge.net/cgi-bin/viewcvs...order_total.php and none of them have that line. I DL'd Ian's "Loaded 4" and that file has that line. So did Ian write that code? I'm confused because Ians version of that file says v 1.1.1.1 2002/11/28 But there is no v1.1.1.1 listed in the repository. The only versions there are v1.1 2002/04/03 v1.2 2002/04/08 v1.3 2002/11/23 v1.4 2003/02/11 So how is Ians version v1.1.1.1 and has a date AFTER the CVS v1.3? Does this bug only affect Ian's Loaded version? Quote Link to comment Share on other sites More sharing options...
Ian Posted February 12, 2003 Author Share Posted February 12, 2003 order_total.php will only include that line if you have installed the Credit Class/GV contribution onto an osCommerce snapshot. It's not part of a clean osCommerce snapshot. Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
sojomy Posted February 12, 2003 Share Posted February 12, 2003 Ahhhh, thank you. I thought something was fishy. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2003 Share Posted February 12, 2003 I posted a other error on this forum, it was about: Warning: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead. in /www/htdocs/domain/shop/admin/includes/languages/dutch.php on line 12 dutch/php line 12 setlocale('LC_TIME', 'nl_NL.ISO_8859-1'); Remove the quotes (a least the ones around LC_TIME,) After I removed the qoutes both problems are fixed...??? Many Thx to all who has contribute to fix my problem. Greetings John2b Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.