Something you might want to consider turning on query caching in MySQL. I’m not sure if this is what you are getting at, but MySQL has can be configured to cache query results in memory. That way, if you use the same query over and over again, it can feed the answer to it’s clients without accessing disk.
Month: May 2005
Howto install Apache with ModSSL and PHP from source
Code:
# choose a source dir:
cd /usr/local/src
# there are lots of mirrors, get apach_1.3.33.tar.gz from one of them
# you can get a random mirror at http://httpd.apache.org/download.cgi
# here is one for your convenience:
Read moreHowto install Apache with ModSSL and PHP from source
Bookmark a page that auto-posts your login
The idea is this: I am tired of logging into the same site over and over again. This is a simple GET to POST converter. The page helps you create a URL that you can bookmark. When you use this link, your data to POST is sent to your server in the form of GET. Your webserver then translates the GET parameters into a form and POSTS to the server you’re trying to login to. So, the sensative data is kept on your computer in the bookmark (the URL). Since you don’t want anybody to be able to just read your username and password, this script will encrypt the data in the URL so your bookmark contains nothing but encrypted data.
What PHP accelerator works well with PHP?
I know that the Zend Accelerator works well, but it’s expensive. Turke MMCache is the best freeware PHP accelerator for PHP4, but has some problems with PHP5. Any thoughts?
Best Freeware Available, I think, is E Accelerator (this site uses this with PHP5):
http://eaccelerator.net/HomeUk?lg=uk
Best Payware, Zend:
http://www.zend.com/
Couple others:
– PHP Accelerator (http://www.php-accelerator.co.uk/)
– Alternative PHP Cache (http://pecl.php.net/package/APC)
– AfterBurner Cache (http://bwcache.bware.it/)
PHP5 Autoload classes
This is really handy for medium to large size projects. You don’t have to remember to put a set of require_once functions in every file. I usually put this in a config file that’s loaded early and on every page.
<?php
function __autoload($class_name) {
require_once $class_name . ‘.php’;
}
$obj = new MyClass1();
$obj2 = new MyClass2();
?>
See http://us2.php.net/manual/en/language.oop5.autoload.php for more information.