Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP 4.3.0 and GV problems


Ian

Recommended Posts

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)

Trust me, I'm an Accountant.

Link to comment
Share on other sites

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...'

Link to comment
Share on other sites

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.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

**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

Life is good...... but not for me ;-)

Al Bundy

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...