This is a discussion on php5 question+oscmax rc3 within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Debugging the problem code... return session_is_registered($variable); what does that "return"? if it is not a "true" or "false" the the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#11
| |||
| |||
| Debugging the problem code... return session_is_registered($variable); what does that "return"? if it is not a "true" or "false" the the replacement code is returning something totally different Where is tep_session_is_registered called? What is the expected return value from where it is called?
__________________ so endith the lesson<think>sometimes I just sit's and thinks</think> "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB |
|
#12
| |||
| |||
| I totally get your answer in off topic chit chat on the wife but have tried to figure out the above but it seems I am only running 8 bit today. |
|
#13
| |||
| |||
| function tep_session_is_registered($variable) { if(isset($_SESSION[$variable])) { return true; } else { return false; } } looks to be a kluge to get around the register globals directive set to "off". The change in the function should be unnecessary if you have register globals set "on".
__________________ so endith the lesson<think>sometimes I just sit's and thinks</think> "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB |
| The Following User Says Thank You to met00 For This Useful Post: | ||
bkpie (02-27-2008) | ||
|
#14
| |||
| |||
| You are right it is to get around the change to php5 by the host coming next week. I know I can probably get around it using the .htaccess using php_flag register_globals on but this mod makes it work reg globals on or off php 4 or 5. Ironically just not changing that piece of code we talked about I tested this mod with php 4 and 5 reg globals on and off and it works so far. So I am not sure what problems could arise not changing that one section. I did read that If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered() and session_unregister(). because it is not supposed to work with register globals off but it works so far for me. I am still going to hunt for the offending mod. so I can use all the code. Since the only thing missing is the saved cart when a customer logs in it and it still pulls previous orders etc from the database I am thinking it has something to do with how my customer groups are set up. We know from Michaels post it works on oscmax so it has to be one of my settings or mods. I have gone thru most and could not see what would cause that. I am not a great debugging things. It takes me awhile. |
|
#15
| |||
| |||
| I've been running PhP 5.25 and MySql 5.045 with RC3 for a few months now without problems but I still have register globals enabled. I'm planning on working on that change this week.
__________________ John |
|
#16
| |||
| |||
| Well the SEO version didn't work very well for me and I had a lot of session problems with it. I also found it slowed the site down some especially with Firefox.
__________________ John |
|
#17
| |||
| |||
| What type of session problems? |
|
#18
| |||
| |||
| Sorry, it was late and I was pretty tired when I wrote that, but I later found a problem in my test site that was unrelated to this mod. I had shopping cart problems as you did but I'm going to try again from scratch. I determined after I posted that I had a glitch in my Admin files when I set up the test site last night so that was causing some problems. However, UPS XML worked perfectly and the only problem I hit on the catalog side was related to saving and retrieving the shopping cart so far. After I'm sure the test site is working correctly I'll try this again and post the results.
__________________ John |
|
#19
| |||
| |||
| Ok John I put my changed files on the live site switched the server to php5.2 from 4 using AddHandler application/x-httpd-php5 .php in the .htaccess file. All works wonderfully so far on php 5 however it also ran fine on php 4 with the exception of breaking the attribute manager mod(only on php 4). It gives a session not regeistered error on your product edit page. I will stay on php5 but if you have attribute manager and want to run php4 then you can go to admin/attributemanager/atributemanager.php and comment out this line stopDirectAccess::checkAuthorisation(AM_SESSION_VA LID_INCLUDE); I will put instructions the way I did it the rest here. I know it is in another thread but trying to keep all here. |
|
#20
| |||
| |||
| I ran into another snag. I tested all on php 5 but with the combination of php5 and mysql 5 I have a problem with any of the shipping modules. If I turn on any shipping module I get these errors when I go to checkout. Warning: reset() [function.reset]: Passed variable is not an array or object in C:\Program Files\xampp\catalog\includes\classes\shipping.php on line 57 Warning: Variable passed to each() is not an array or object in C:\Program Files\xampp\htdocs\includes\classes\shipping.php on line 68 Here is Line 55-57 $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1))); } else { reset($this->modules); THIS IS OFFENDING LINE TO LEFT Line 57 Here is line 68-69 while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); Line 68 here I have searched and searched but have not found the solution. Anyone here??? |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can not run oscmax install script on php5 - here is the fix | rabbit79 | osCMax v2 Installation issues | 7 | 07-26-2008 09:11 AM |
| Will oscMax work with php5 and MySQL5 ? (All featueres) | ryankan1 | osCMax v2 Installation issues | 3 | 10-16-2007 06:31 PM |
| osCMax 2.0 RC3 upgrade | jpf | osCMax v2 Announcements | 1 | 12-15-2006 07:16 PM |
| Layaway Option for OSCMAX RC3 | ALElder | osCMax v2 Customization/Mods | 2 | 11-04-2006 09:27 PM |
| osCMAx 2.0 RC3 Released Today | michael_s | osCMax v2 Announcements | 0 | 08-04-2006 12:00 PM |