Skip to content


How to set up Magento on XAMPP with php 5.3 +

Magento still doesn’t support PHP 5.3 (current default PHP env on XAMPP ), therefore this is what I had to do:

First be sure that you have the required setting:

http://www.magentocommerce.com/wiki/general/installing_on_windows_with_xampp_and_wamp

Change in file /lib/Varien/Object.php on line ~ 484

  public function ___toString(array $arrAttributes = array(), $valueSeparator=',')

To this (change ___toString to __invoke

 public function __invoke(array $arrAttributes = array(), $valueSeparator=',')

In file /app/code/core/Mage/Core/Controller/Request/Http.php on line ~ 274

  $host = split(':', $_SERVER['HTTP_HOST']);

to

$host = explode(':', $_SERVER['HTTP_HOST']);

And all split() deprecated warnings change it with explode()

If you can’t login try this:

-Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

-Find the code,

session_set_cookie_params(
           $this->getCookie()->getLifetime(),
           $this->getCookie()->getPath(),
           $this->getCookie()->getDomain(),
           $this->getCookie()->isSecure(),
           $this->getCookie()->getHttponly()
       );

-Replace above code by,

session_set_cookie_params(
           $this->getCookie()->getLifetime(),
           $this->getCookie()->getPath()
           //$this->getCookie()->getDomain(),
           //$this->getCookie()->isSecure(),
           //$this->getCookie()->getHttponly()
       );

-Save it and try to login to your magento admin panel.
It would work. :)

If you want to add the sample data:
Download the “media” and SQL dump from here:
http://www.magentocommerce.com/download/noregister

  • Normally web install
  • delete the database, and create new one
  • copy the sample_media_files to magento’s media folder
  • import the sample_sql to your database
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Posted in PHP.

Tagged with , .


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Continuing the Discussion

  1. How to set up Magento on XAMPP with php 5.3 + – jpablobr.com | Magento News linked to this post on November 20, 2009

    [...] How to set up Magento on XAMPP with php 5.3 + – jpablobr.com [...]



Some HTML is OK

or, reply to this post via trackback.

Notify me of follow-up comments via email.


Fork me on GitHub