Feb/080
Mysql SQL_NO_CACHE Benchmark Problem
I have been trying to benchmark the sql calls to mysql from an application without success. Even when I set the SELECT statement to SQL_NO_CACHE, the results seemed to be still cached. Apparently, Linux does its own caching of disk reads also. That was giving me incorrect benchmark results if I hit the same data twice.
For those using Linux kernel 2.6.16 or higher, you can clear Linux cache with the following command.
echo 3 > /proc/sys/vm/drop_caches
Unfortunately for me, I am stuck on 2.5.xx and will have to figure out another method.
Feb/080
zen cart Warning: session_start() No such file or directory (2) in /dir/public_html/includes/functions/sessions.php on line 102
The error comes up when trying to use file based session storage instead of database. Apparently, the configuration for what directory to store the session is not in the configuration files but in the database table “configuration”.
If you upgrade your php to version 5.2.1, the database session storage breaks. Therefore, I had to switch to file system based storage. But the catch was that I no longer could log into admin as the session could not start. The configuration.php files did not have this constant.
The way to fix this is to log into your database and update the session directory record.
“UPDATE configuration SET configuration_value=’/your/new/direcotory/’ WHERE configuration_title=’session directory’;”
System Specs:
php.5.2.1
zencart 1.3.5
apache 1.3.37
MySQL 5.0.45
Jan/070
Apache SSL IfDefine – Error
Just encountered a problem that was painful to deal with while configuring SSL on apache for linux. The httpd.conf had a tag,
$ service httpd -D SSL -k start
Also, I found that restart does not always take new changes to my conf files.
$ service httpd -D SSL -k restart
Instead, use the stop then the start command to be sure.
$service httpd -D SSL -k stop
$service httpd -D SSL -k start
That was a source of much pain while working on this particular server.