SolarPHP on Mosso

May 18, 2009, 7:47pm
0 comments


I use mosso for this site as well as a couple others and recently I wanted to use SolarPHP for one of them. Solar uses some symlinks near the base to reach deeper into the directory structure of Solar and your app to make things a little easier. Since mosso doesn't support symlinks I had to tweak Solar a bit. Here is what I did.


copy the main solar directories to web/ except for the docroot directory.

put solar/docroot contents in web/content

modify the .htaccess file in the web/content directory and add RewriteBase /  (needed for mod-rewrite with mosso)

make sure to chmod 777 -R on web/sqlite and web/tmp

in web/content/index.php change

set_include_path("$system/include");
TO
set_include_path($system);

AND

require_once "Solar.php";
TO
require_once "$system/source/solar/Solar.php";


change web/source/solar/Solar/Class/Stack.php _run() method from

include func_get_arg(0);
       
TO
       
$file = Solar_File::exists(func_get_arg(0));
include $file;


in web/source/solar/Solar/Path/Stack.php find() method

add

$spec = Solar_File::exists($spec); 

BEFORE

return $spec;


In web/source/solar/Solar/File exists() method

add

if ($file[0] !== '/') {
    $first = strtolower(substr($file, 0, strpos($file, '/')));
    $file = 'source' . DIRECTORY_SEPARATOR . $first . DIRECTORY_SEPARATOR .  $file;
} else {
    $file = str_ireplace(Solar_Config::get('Solar', 'system') . '/source/', 'source/', $file);
}

AFTER

// no file requested?
$file = trim($file);
if (! $file) {
    return false;
}

Then for web/content/public instead of having the Solar and/or whatever
your vendor name is be a symlink to web/source/solar/Solar/App/Public

delete it and create a folder named Solar (or whatever your vendor name is) and put your images, scripts, etc folders within it.


That's it. You should now have a working Solar setup in mosso.


Tags: PHP, SolarPHP

Ubuntu 9.04 font rendering and the ZCE Exam

May 8, 2009, 10:10pm
0 comments


Wednesday night I got around to installing Ubuntu 9.04 on my home laptop. I use a triple booted macbook pro at work, where I am using Ubuntu intrepid almost exclusively. It has really grown on me and I've become addicted to the small, but very nice visual effects. Needless to say, I was looking forward to see how my home laptop would run Jaunty Jackalope. I was pleasantly surprised by two things in particular. The boot speed is much quicker, which granted, I don't notice that often as my laptop rarely gets shut down. Secondly, the improved font rendering looks great. One thing I always have to give the mac fans credit for is the way type is rendered. Now, I feel like I am no longer lacking in that department. The difference is amazing, and I am really considering upgrading my work laptop just for the font rendering, even though I don't have the best record with my update manager, less strain on my eyes will be worth the effort. Plus, I notice the lack of awesome font rendering that much more now on XP and Ubuntu intrepid.


I also recently took the Zend Certified Engineer (PHP5) exam and passed! Woo! I didn't think it was that difficult to be honest. I bought the study guide and the ten practice tests. I passed the first practice test and then excellent on the subsequent three. The actual exam did have a few odd, trick-like questions...but nothing extremely difficult. I do need to learn more about stream and SimpleXML functions as I haven't really done too much with them and I'm sure I missed a couple of those questions. I do think I have learned a lot in the last year, having been able to work on many different kinds of projects and needing to quickly learn new things has definitely helped. I'd like to thank all the guys at the OmniTI office that I constantly badger with questions for their help. :D