eCommerce construction > Fresh Installation

Unable to Add Product


I get this when trying to add a new product.

Fatal error: Call to undefined function strptime() in C:\Inetpub\vhosts\\httpdocs\ShopAbante\core\helper\utils.php on line 340

The software does not reside in my C:drive and does not need to, so why is it looking there for information that is on the web site?

And now I can't even get into the Admin function - it just brings up the store front !

This issue related to Windows platform. This function is not implemented on Windows platforms.

At the end of the file ...\core\helper\utils.php add below code:

--- Code: ---
function strptime($date, $format) {
    $masks = array(
      '%d' => '(?P<d>[0-9]{2})',
      '%m' => '(?P<m>[0-9]{2})',
      '%Y' => '(?P<Y>[0-9]{4})',
      '%H' => '(?P<H>[0-9]{2})',
      '%M' => '(?P<M>[0-9]{2})',
      '%S' => '(?P<S>[0-9]{2})',
     // usw..

    $rexep = "#".strtr(preg_quote($format), $masks)."#";
    if(!preg_match($rexep, $date, $out))
      return false;

    $ret = array(
      "tm_sec"  => (int) $out['S'],
      "tm_min"  => (int) $out['M'],
      "tm_hour" => (int) $out['H'],
      "tm_mday" => (int) $out['d'],
      "tm_mon"  => $out['m']?$out['m']-1:0,
      "tm_year" => $out['Y'] > 1900 ? $out['Y'] - 1900 : 0,
    return $ret;

--- End code ---

Thank you for that. Code added and add products now accessible.

Noticed that start of utils.php carries a warning:
   Do not edit or add to this file if you wish to upgrade AbanteCart to newer
   versions in the future. If you wish to customize AbanteCart for your
   needs please refer to [your website] for more information.  (I would have quoted completely but you have set your forum up to reject links - even to yourselves !)

Does this mean that any upgrade installed in the future will lose this amendment?

Are there any other problems affecting use on a Windows server that aren't mentioned in the install instructions?

We will add this fix to the core and you will not loose this in upgrade.

Regarding Windows support.

Although we know that AbanteCart works on Windows platform (aside of this issue), we can not officially state we support it 100%. 
We do not have capacity to run all the tests on all different platforms. We recommend apache and linux/unix.

Feel free to help with testing problems on Windows.

On you web site you state "AbanteCart runs on most server configurations, Windows or Linux based servers that utilize different PHP configurations." The server I am using complies with the PHP specification that appears above that statement.

I am left wondering how many more problems will appear before I have a properly working version on a windows platform.

I have already found another problem - see separate subject.


[0] Message Index

Go to full version
Powered by SMFPacks Social Login Mod