Allan Brown

October 15, 2009

include_path setting can cause problems in Magento

Filed under: Magento — Tags: , , , , , — Allan Brown @ 1:24 am

I had a small problem today with the Magento connect application. All other Magento functions were working, but when I tried to access Connect (http://sitedomain.com/index.php/admin/extensions_local/), a load of errors were being displayed saying:

Warning: include_once(Maged/Model.php) [function.include-once]: failed to open stream: No such file or directory in /var/www/web1/html/downloader/Maged/Controller.php on line 21

Warning: include_once() [function.include]: Failed opening ‘Maged/Model.php’ for inclusion (include_path=’/usr/share/pear:/usr/share/php’) in /var/www/web1/html/downloader/Maged/Controller.php on line 21

Warning: include_once(Maged/View.php) [function.include-once]: failed to open stream: No such file or directory in /var/www/web1/html/downloader/Maged/Controller.php on line 22

Warning: include_once() [function.include]: Failed opening ‘Maged/View.php’ for inclusion (include_path=’/usr/share/pear:/usr/share/php’) in /var/www/web1/html/downloader/Maged/Controller.php on line 22

Warning: include_once(Maged/Exception.php) [function.include-once]: failed to open stream: No such file or directory in /var/www/web1/html/downloader/Maged/Controller.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web1/html/downloader/Maged/Controller.php:21) in /var/www/web1/html/downloader/Maged/Controller.php on line 311

After much searching, I discovered that it was due to an incorrectly set ‘include_path’ in the apache php.ini file. We are using some advanced caching on the server to speed things up, and the setting it was changed to was slightly out.

So, we changed it from

/opt/coolstack/php5/lib/php/

to

.:/opt/coolstack/php5/lib/php/

However in most cases, it would be:

on Linux: include_path = “.:/php/includes”
on Windows: include_path = “.;c:\php\includes”

A quick Apache restart and all is well again. Easy fix!

October 13, 2009

Magento and me

Filed under: Magento — Tags: , , — Allan Brown @ 5:55 pm

In Summer 2009 I started on a large project at work which was to be a music download site based on an existing e-commerce system.  After much deliberation it was decided that we would use Magento.

For the past 2 months now I have been trawling through the innerworkings of this e-commerce platform learning it as I go and this blog will cover the experiences I am having.  Topics covered will include development advice, strange bugs and hopefully some invaluble hints for those using Magento as a base for their website.

The project I am undertaking will cover core Magento code changes, custom module development, 3rd party API integration, multiple payment-gateway integration, development of custom themes and templates, integrating to Amazon S3 and EC2 and any other areas as small as adding a youtube video to as large as creating a whole new product type.

If I am able and if there is demand, the work I am doing will be provided as public (or possibly commercial) addons.  If not however, hopefully I will be able to save some of you some time in your own projects.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Powered by WordPress