Fix php not able to connect to remote servers

0

This is an annoying one. In this case running Centos 6.3 Generally you will find that php will run fix but any time a call is made to an external sites  the connection cannot be made. Interestingly this seems to affect php running as fastgci but not mod_php.

Symptoms include:

WordPress plugin page

 ”An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.”

Magento Cant connect to external Payment Gateways

 

In this case the culprit was SELinix

The answer is to run:

setsebool -P httpd_can_network_connect=1

This allows Apache to open ports to remote servers.

 

 

mystique

Hide title in mystique theme

0

We love the mystique theme for wordpress. It is a great base upon which to build a site. There a a whole host of useful features build right into the template including a nice switch that looks for a Custom field “hide_title”  like so:

mystique

mysql ghost tables, Schrödinger’s table, Table ‘xxx’ doesn’t exist but Table ‘xxx’ already exists

0

There are a number of cases where mysql databases crash during an operation which leaves damaged tables behind.

 

Typical symptoms include:

Cant dump the database using mysqldump as you get LOCK errors

Cant delate the table as it does not exist

Cant create the table as table already exists

You will also generally see a lot of errors in my mysql error log.

Your INNODB table file may be severely bloated to 2 – 3 x the total space of your database.

 

In order to fix you will need to locate the actual files that make up your database typically /var/lib/mysql/databasename

 

For the broken table only.. remove all files associated with that table name. Note that a healthy INNODB table should have two entries.  In the case of ghost tables there will probably only be 1.  As soon as you have deleted the file use mysqldump to copy the database.

mysqldump -u box -p databasename > databsename.sql

 

Now reimport the database to a new Database.  Now you can recreate your table. Remove the old database as it will still be causing issues.  You may have to delete all files within the database folder and then issue the drop command.

mysql -u box -p newdatabase < databsename.sql

 

Plesk fastcgi Premature end of script headers: cgi_wrapper

0

Looks like some versions of plesk (or perhaps a micro-update) have an issue when you set the site to run as fastcgi.  Typical symptoms include all php generated files will throw a 500 error.  If you look in error_log you wil see something like: (more…)

sql to clear out all products (Reset / Delete magento category / products by SQL for magento version 1.7)

0

Should you ever need a nuclear option for clearing out product data..

Check out imranul hoque’s blog at :http://www.imranulhoque.com/magento/reset-delete-magento-category-products-by-sql-for-magento-version-1-7/comment-page-1/#comment-5826

Very useful if you are testing import scripts.

PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Serialization of ‘Mage_Core_Model_Config_Element’ is not allowed’ in [no active file]

0

PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Serialization of ‘Mage_Core_Model_Config_Element’ is not allowed’ in [no active file]:0\nStack trace:\n#0 {main}\n thrown in [no active file] on line 0, referer:

There are quite a few references to this but no answers.  In the case of this one store the issue was due to the cache being diabled while APC cache was in place.  Switching the caches back on cleared the error.. Hope this helps

 

magento-logo

Magento fix: while trying to access connect Fatal error: Class Exception not found in Frontend.php on line 90

0

Essentially you need to edit the level of error reporting to supress php from throwing this error.

so..

index.php

change

error_reporting(E_ALL | E_STRICT);

to

 error_reporting(E_ALL & E_STRICT & ~E_DEPRECATED);

In

lib/Varien/Pear.php

error_reporting(E_ALL & ~E_NOTICE);

to

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

4> downloader/Maged/Pear.php

error_reporting(E_ALL & ~E_NOTICE);

to

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
magento hosting benchmarks

Notes on Magento benchmarking..

0

We all know that Magento is a lot more demanding than most e-commerce solutions. Providing a Magento specific hosting environment at a reasonable price is the key to our business.

Like other hosts we use a couple of benchmarking sites to help show our hosting prowess. The two key sites are:
http://www.magespeedtest.com/
http://magebenchmark.sonassi.com/

Both are useful for different reasons.

Mage speed test.

Created by the rather talented Ashley Schroder mage speed test is essentially a managed Seige benchmark interface. It will take the standard magento sitemap as the input and run tests against random pages within the site.  One of the most useful features is the ability for anyone to test their own setup.  It is very useful for testing in real time, changes to server configs.

The idea was that end users would get a representative idea of what their host could offer. Dx3webs was the second host to join this site and we added a couple of our packages. Shortly after we were noticing that other hosting companies were coming in with load times that could only be achieved with reverse proxy servers. Eventually we decided to add a Varnish enabled option to the list and currently we are neck and neck with two other hosts offering their own cached versions. We are currently using Cache Extension powered by Varnish which is a free extension. There is also PageCache powered by Varnish which was previously a paid for extension but has recently gone free. We will be testing this in the near future.

magento hosting benchmarks

We know form speaking to Ashley that he is keen to ensure that his tests are an accurate reflection of real world tests and that each store needs to be functional to the end user. With the use of these Varnish extensions you can have insanely fast stores AND dynamic content.

One final comment on Mage speed test. Each of the hosts that post on there are highly reputable and enjoy a strong reputation and are active participants in the Magento community. Any of the packages listed on there will be plenty fast to run most magento stores and I don’t believe most shoppers would spot the difference between a store delivering 15 transactions per second and 30 transactions per second.  At Dx3webs we aim to offer the best possible home for your magento store.  This means not only being able to provide a fast hosting environment but also best possible up time, excellent support and buckets of advice and guidance.

The key thing to recognise is that Magento is demanding, you will need a host who cares about performance and you will have to pay a slight premium for the privilege.

Oh and did you notice that the fastest result in the table is also the cheapest and the only one based in the UK.

Magento Benchmark

The original Magento benchmark site has been around for a long time now and is run by Manchester magento developers Sonassi.  Whilst it is not as handy as Mage speed test and aimed exclusively at hosts it goes a long way to give a much better picture of actual server performance that simple Seige tests.  ”Based on levels of 1, 2, 5, 10, 20 and 30 concurrent connections, there will be two tests. Both tests are custom written and have been designed to reflect real-world load not artificial testing such as siege/ab.”  Full details of the test can be read here.

As you can see from the table, Dx3webs offers excellent value for money on our entry level package.. again, we not only offer the cheapest package but also a generous disk allocation, unlimited traffic and no limits on the domains you can run from your store for less than £15 per month.  Top this off with a free two week trial…

Fatal error: Undefined class constant ‘COUPON_TYPE_NO_COUPON’ in mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php

0

if you are seeing

Fatal error: Undefined class constant ‘COUPON_TYPE_NO_COUPON’ in /var/www/html/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php

edit

/var/www/html/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php

change

'smallint unsigned NOT NULL DEFAULT "' . Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON . '"'

to

'smallint unsigned NOT NULL DEFAULT "' . 1 . '"'

and

coupon_type = '" . Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC . "';

to

coupon_type = '" . 2 . "';

run the upgrade then change the code back agian… real pain!!

Magetno fix : Cant add products to admin create order

0

There appears to be a bug in magento 1.5x where by manually creating an order and trying to add a product does not work.  It appears to be an issue with ext-tree.js which is called unnecessarily on this page.

To fix edit app/design/adminhtml/default/default/layout/sales.xml

 

and add


<action method="removeItem"><type>js</type><name>extjs/ext-tree.js</name></action>

like so:


<adminhtml_sales_order_create_index>
<reference name="left">
<action method="setIsCollapsed"><value>true</value></action>
</reference>
<reference name="head">
<action method="removeItem"><type>js</type><name>extjs/ext-tree.js</name></action>
<action method="addJs"><file>mage/adminhtml/sales.js</file></action>

 

Go to Top