今天终于把 HP LaserJet 1010 装在了 Fedora 14 上。 我从 Fedora 11 升级到 Feora 14 已有几周,但一直无法在 Fedora 14 下使用 HP LaserJet 1010 打印机。期间我一有空就想解决这个问题,直到今天才成功,好累。想当初在 Fedora 11 上安装这台打印机很顺利,我估计根本原因是 HP 驱动在 Fedora 14 上多少有点问题。回溯几个迂回的片段: 首先从 HP Linux imaging and printing 的网站上下载了 hplib 3.10.9,运行其中的 hplip-3.10.9.run,被提示没有 gcc。我用 仍说没有 gcc。我只好再试 这下 gcc 这一关过去了,但仍缺少一堆依赖包,为了求简单,我没有细究我的系统是否需要,按 google 来的建议一股脑地装了很多 packages。 这下 hplip-3.10.9.run 似乎成功运行完毕,在系统托盘上添加了 HP Device Manager… Continue reading Install HP printer in Fedora 14
Month: December 2010
I decide to follow html5 from now
关于 html5 的消息时有耳闻,今天看到的 contenteditable 属性让我兴奋不已,所以我决定开始关注 html5。 看看,有了 contenteditable = “true”,以后接受用户输入有了更灵活的方式。 本文就是 contenteditable。
yum install php-5.3-curl-zend-server
我快被 zend server 搞疯了。不过说到底是我自己不好——新装了一台 Fedora 14,添了 zend.repo 以后忘了运行 过了几天开始用它来调试 Magento。貌似 zend server php 替换了原有的 fedora php,因为 php.ini 是来自 /usr/local/zend/etc。这给我很大程度上一个误导,以为 zend server 已经装好了。 结果 Magento 跑不起来,第一个错误是没有 pdo,我略有纳闷,zend server 怎么不代我完成 pdo 安装?不过没细想,用 解决问题。(不过回想起来,也没搞清楚这到底装了哪个版本的 pdo) 随后发现进不了后台,第二个错误是没有 curl,这下折腾了两个小时,用 说已安装(fedora 把 php-curl 包含在 php-common)。然后我用 当然无济于事。试遍各种可能的命令都不成功,两小时后发觉 zend server 没装过,于是一装 zend server,顺利启动 Magento。 最后说一下,如果非要单独装 zend server 版的 php curl,可以用
Mage_Adminhtml_Controller_action
今天发现,我的所有的 admin controller 都写成了 extends Mage_Adminhtml_Controller_action。虽然不影响使用,我还是想把它改规范的驼峰式 Mage_Adminhtml_Controller_Action。 于是搜索了整个硬盘到底哪些文件里包含 Mage_Adminhtml_Controller_action,结果发现这个笔误还不少。而且不光我写的 modules 里有,Aheadworks, J2t, Plieninger 的代码里也有,最后发现源头是 koukou1985 的 Magento module creator。 看来 Magento module creator 流传甚广。
Magento attribute’s attribute frontend_class
Magento EAV framework is very promising, but not easy to understand. When the code is mixed with typos, it becomes even more confusing. Mage_Catalog_Model_Resource_Eav_Mysql4_Setup provides a template for setting up an attribute. However, ‘class’ is wrong. It should be ‘frontend_class’. It refers to DOM class attribute assigned to this entity attribute output html. It can… Continue reading Magento attribute’s attribute frontend_class
Run httpd with SELinux
我实在不理解 SELinux,以前为了求简单,都是直接 disable SELinux。我也知道这样不好,可以没办法。 最近重装系统,第一次选 Web Server 来装,我想这样搭配出来的 SELinux 最接近我的要求。可是,但我添加了 zend.repo 以后,发现 httpd 无法启动,错误信息为: 我按论坛上的建议,执行了 错误仍在。然后按 SELinux 的建议,执行了 呵,成了。因为我不会 undo # find /usr/local/zend/lib/ -name “*.so*” -exec semanage fcontext -a -t textrel_shlib_t {} \; 所以我不知道此命令是否必要。