4

I'm trying to create a local development website on a WampServer installation.

I've imported the .SQL into PHPMyAdmin, and copied the files to D:\wamp\www\website, created a vhost.conf entry, and a hosts file entry.

When I load the website, I receive the following error:

( ! ) Fatal error: Call to a member function extend() on a non-object in D:\wamp\www\axis\lib\Varien\Simplexml\Config.php on line 600

From this Q&A, I might need to double check the permissions are set properly, but how do I do this in Windows 7 / WampServer?

  • 1
    Windows don't have any permission concept like Unix, normally in Wamp you wouldn't face permission related issues, it would be better to use the second alternate method (Else another alternative is Reinstall Magento and do following steps: ...) – Rahul Kumar Das Nov 18 '15 at 7:39
1

Double check your configuration files .xml as one of them is most likely malformed and is being unable to be read by SimpleXML.

You should modify Varien_Simplexml_Config::loadString() method (temporarily mind you as this is a core file):

public function loadString($string)
{
    if (is_string($string)) {
        // Enable internal errors
        libxml_use_internal_errors(true);
        $xml = simplexml_load_string($string, $this->_elementClass);
        if (false === $xml) {
            // Put breakpoint or debug here
            $errors = libxml_get_errors();
            zend_debug::dump($errors); // output errors to screen
        }
        if ($xml instanceof Varien_Simplexml_Element) {
            $this->_xml = $xml;
            return true;
        }
    } else {
        Mage::logException(new Exception('"$string" parameter for simplexml_load_string is not a string'));
    }
    return false;
}

References:


* EDIT *

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

Reference:

  • I checked D:\wamp\www\website\app\etc\config.xml & D:\wamp\www\website\app\etc\local.xml and they're not malformed. – Steve Nov 22 '15 at 8:04
  • I modified D:\wamp\www\website\lib\Varien\Simplexml\config.php's public function loadString($string) as above, and I see some different errors, but they don't tell me the file: public 'file' => string '' – Steve Nov 22 '15 at 8:08
  • You may want to consider using a Bitnami VM: bitnami.com/stack/magento/installer – B00MER Nov 22 '15 at 8:10
  • Thanks. Production server runs 1.9.1, and I want to mirror that on the local development server, so I know I can apply some patches okay. Bitnami VM runs Magento 1.9.2* – Steve Nov 22 '15 at 9:25
  • It's fairly easy to copy your files and database into the Bitnami VM. Its really the fact it is easier to manage the WAMP stack via some services and other Windows based settings you may be missing, causing the underlying issues. – B00MER Nov 22 '15 at 21:01
0

The Magento folder should be owned by the WAMPserveur user (you, if you mannully launch the server).

Maybe you can change your permission and owner using this "howto" : http://answers.microsoft.com/en-us/windows/forum/windows_vista-files/how-do-i-change-folder-and-file-permissions/465f2b42-63dd-4486-8dd1-c870290efeed?auth=1

Here are the steps to modify ownership and permissions of folders and files:

  1. Right-click the file or folder, click Properties, and then click the Security tab.
  2. Click Advanced, and then click the Owner tab.
  3. Click Edit, and then do one of the following: To change the owner to a user or group that is not listed, click Other users and groups and, in Enter the object name to select (examples), type the name of the user or group, and then click OK. · To change the owner to a user or group that is listed, in the Change owner to box, click the new owner.
  4. If you want to take ownership of the contents of the folder, select the Replace owner on sub containers and objects check box.
  5. Click OK, and then click Yes when you receive the following message: You do not have permission to read the contents of directory folder name. Do you want to replace the directory permissions with permissions granting you Full Control? All permissions will be replaced if you click Yes.

Note folder name is the name of the folder that you want to take ownership of. 6. Click OK, and then reapply the permissions and security settings that you want for the folder and its contents.

Additional considerations

· An administrator can take ownership of any file on the computer. · Assigning ownership of a file or a folder might require you to elevate your permissions using User Access Control.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.