Latest News: (loading..)

dr_lucas

Members
  • Content count

    330
  • Joined

  • Last visited

  • Days Won

    7

dr_lucas last won the day on July 22

dr_lucas had the most liked content!

5 Followers

About dr_lucas

Profile Information

  • Real Name
    Michaela
  • Gender
    Female
  • Website

Recent Profile Visitors

19,090 profile views
  1. You can easily fix it. Read this: http://stackoverflow.com/questions/35128323/php-extended-class
  2. PHP 7 has already been released @ Nov-Dec 2015, and yes, it does have an excellent performance improvement.
  3. As far as I remember, check list for upgrading to PHP 7 (I got my osc RC2a working perfectly on PHP7 this way): - mysqli compatibility (back port both database.php function files from the latest osC release) - go through all your code to make sure there are no mysql_ functions. If there are any - modify them to their tep_db_ equivalent, some will require syntax modifications (as I wrote in my post above) - convert all php files to UTF-8 (Without BOM!) - convert your database tables to UTF-8 using my script: http://forums.oscommerce.com/topic/408961-script-converting-the-entire-database-to-utf-8-including-tables-and-columns/ - ensure there are no white-spaces before the opening <?php and closing ?> tags. For safety, I recommend completely removing all closing tags from the end of all php files where that tag is the last thing in the file - change all classes to have a constructor, as I explained here: http://forums.oscommerce.com/topic/408220-php-7/ - Click Like on this post if it helped you :P
  4. "PHP Warning: mysqli_query() expects parameter 1 to be mysqli, null given" is probably NOT harmless and must never appear if your shop code is properly written. You really should backport includes/functions/database.php and includes/admin/functions/database.php from the latest osC release. It is fully mysqli compatible. Search all your files, except for these database.php files, for the term mysql_ This is a great tool to do that on windows: http://www.nirsoft.net/utils/search_my_files.html If you find any occurrences, check them to see if they are part of mysql function and if so - they must be properly converted to the matching tep_db function code and structure, which will then correctly use mysqli. As for the "unexpected end of file", you may have setup your new PHP 5.6 with short_open_tag flag turned off (in your php.ini). You must turn it on or fix your code to make sure it doesn't use any short open tags (ie. all <? must be <?php) http://fr.php.net/manual/en/ini.core.php#ini.short-open-tag This error is not exclusive for PHP 5.6 by the way. If you have this flag turned off on 5.4 - you will get the same "unexpected end of file" you got.
  5. Yeah, @@MrPhil, sorry for being a bit too vulgar, happens sometimes...I'll try to be a good girl :rolleyes: I really like what mega.nz do when being accessed with browsers like IE9: https://mega.nz/update.html By the way, I am not sure about legal issues, but I have never heard of site owners getting sued for using captcha's. Have you? :mellow:
  6. No offence and nothing personal, mate, but I stand behind my words, with all due respect. It's really more like 1% and I personally don't know of any modern eCommerce framework or large eCommerce website (with the exception of Amazon maybe. Ebay requires js) or modern eCommerce template that is usable with JS turned off. People who prefer to stay in the dark ages will stay there. I don't mind losing them for the competition and I don't feel bad even not one bit. Really. (although again - none of my competitors use a system that will work with JS disabled, at least in my industry).
  7. Yeah, a bit off topic, but I don't even bother optimizing my site for users of IE <10, which are also only around 1% of the web... It's 2016 now, around 98% of web users are using modern browsers and the vast majority of them with latest versions: http://www.w3schools.com/browsers/browsers_stats.asp Microsoft so aggressively pushing Windows 10 is helping those stats get even better every day :)
  8. Around 99% of the web users have JS enabled. I'd happily ignore the 1% loons. I think sacrificing functionality for 99% of users to accommodate 1% is insane.
  9. Actually the specific modification example I gave is not so good, because this infoBoxHeading class extends tableBox class and in this case it would be correct to modify tableBox class first from: class tableBox{ function tableBox{ // some code } // more code } TO: class tableBox{ function __construct(){ //leave it empty } function tableBox{ // some code } // more code } and then on the extended class, do this: class infoBoxHeading extends tableBox { function __construct($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { global $infobox_header_text, $infobox_header_link; parent::__construct(); //calling the parent constructor, as tableBox method is being used here in this class if (SKIN_INFOBOX_ACTIVE == 'true'){ $infobox_header_text = $contents[0]['text']; $infobox_header_link = $right_arrow; } else { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="20" class="infoBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="20" class="infoBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } } Note that we don't only modify the method name here from infoBoxHeading to __construct, but we are also calling the parent construct via parent::__construct();
  10. I think it has something to do with mouse movement and might be more criterias
  11. Yes, you will need to modify classes to use __construct classes to prevent DEPRECATED errros, but other than that - it should work just fine when switching from code already compatible with 5.5 (ie. working stable without any deprecated errors on php 5.5, supports UTF-8 and mysqli) to php 7. So, for example, code like this: class infoBoxHeading extends tableBox { function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { global $infobox_header_text, $infobox_header_link; if (SKIN_INFOBOX_ACTIVE == 'true'){ $infobox_header_text = $contents[0]['text']; $infobox_header_link = $right_arrow; } else { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="20" class="infoBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="20" class="infoBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } } Must be changed to this: class infoBoxHeading extends tableBox { function __construct($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { global $infobox_header_text, $infobox_header_link; if (SKIN_INFOBOX_ACTIVE == 'true'){ $infobox_header_text = $contents[0]['text']; $infobox_header_link = $right_arrow; } else { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="20" class="infoBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="20" class="infoBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } } As you can see, the only modification was: function infoBoxHeading changed to function __construct I highly recommend switching to php 7, if you can.
  12. Right. Recaptcha-2 is super easy to implement. If you don't know how to do it yourself, there is another simple option - get a hired dev to do it for you. Sites like upworks.com, freelancer.com and others have many gifted developers who will gladly (and quickly) do the job for quite attractive prices.
  13. No response, so I assume that's all that is needed. Funny, but testing the site on PHP 7 now, seems to be working fine too after upgrading it for 5.6 Always good to run the code through the compatibility checker (https://github.com/sstalle/php7cc), will do so shortly...
  14. And also had to add dual charset support, due to UTF-8 encoding: http://www.oscommerce-addons.com/download.php?Type=Package&PackageID=39
  15. @@stefan21 Thank You! Exactly what I was looking for... :)