Engine23

Magento Ecommerce Strategy, Design & Development

Mysql - File not found

If you have a mac and have upgraded to the latest operating system 10.10, you may find that mysql is not able to connect.

The fix is pretty easy, its an update to the php.ini

What we need to do is tell mysql to connect through localhost instead of 127.0.0.1

First locate the php.ini you can use the following command in terminal

locate php.ini

Look for something like /private/etc/php.ini

This is an example of what may come back

/Users/engine23/php.ini
/private/etc/php.ini-5.2-previous
/private/etc/php.ini.default
/private/etc/php.ini.default-5.2-previous

You may have may of them and if you dont have one called /private/etc/php.ini it may be named /private/etc/php.ini.default, if so copy that and rename it to just php.ini.

sudo cp /private/etc/php.ini.default /private/etc/php.ini

Now you know what file to edit, using terminal edit that file

sudo vim /private/etc/php.ini

Read more

Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server

mysql> CREATE USER 'edreamery_prod'@'localhost' IDENTIFIED BY 'edreamery_prod'; Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'edreamery_prod'@'localhost' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec) mysql> CREATE USER 'edreamery_prod'@'%' IDENTIFIED BY 'edreamery_prod';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'edreamery_prod'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec)

Magento - SOAP Fatal Error unable to connect

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://dev.magento19.com/index.php/api/soap/index/?wsdl=1' : Extra content at the end of the document in /Users/engine23/Sites/local.magento18.com/test.php:5 Stack trace: #0 /Users/engine23/Sites/local.magento18.com/test.php(5): SoapClient->__call('login', Array) #1 /Users/engine23/Sites/local.magento18.com/test.php(5): SoapClient->login('rjalbin', 'peanut') #2 {main} thrown in /Users/engine23/Sites/local.magento18.com/test.php on line 5

So, basically it boils down to bad URL in the request.


	login('rjalbin', 'peanut');
// View all customers
var_dump($proxy->call($sessionId, 'customer.list', array('filters', '*')));
?>

Read more

Magento - getChildrenWrapClass

I just wasted 3 hours of my life trying to set this value in xml.

Normally you think that in a Block when you see $this->getChildrenWrapClass() that the value for that would come from xml or in an observer where that value is being set by $block->setChildrenWrapClass(), however for this you would be totally mistaken.

<reference name="catalog.topnav.renderer">
<action method="setData"><name>setChildrenWrapClass</name><value>abc123</value></action>
<action method="setData"><name>children_wrap_class</name><value>321cba</value></action>
<action method="setChildrenWrapClass"><value>ecreameryTest</value></action>
</reference>

That was all the different types of xml I was trying to use to get that value set!

Well, it turns out this is actually a parameter that is passed into getHtml()

Sigh

Read more

Centos 6.5 - eth0 is not present

How to fix this issue when you move a virtual machine from one computer to another.

The mac is set in the config and needs to be updated on the VMWare.

First ssh into the server and get the information from /etc/sysconfig/network-scripts/ifcfg-eth0

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0C:29:48:56:52
#IPV6INIT=yes
IPV6_AUTOCONF="yes"
#NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
#USERCTL=no
#PEERDNS=yes

Read more

Centos 6.5 Samba user

One thing that seems to be lacking in some documentation is to create the samba user.

This is here because there is lots of instructions on how to setup the samba configuration /etc/samba/smb.conf and I dont need to duplicate that here.  This is helpful when your configuration is setup and you can connect but your username/password is being rejected...and your sure that the username and password your using is correct.

Even though you have the configuration set to communicate with the Samba server, if your user cannot log in, it is because you never gave samba the user information.

The following is for creating a new user, you can skip if you already have a linux user on the system.

$ useradd ralbin 
$ passwd ralbiin

Read more