I've upgraded to Leopard finally and I've ran into some problems upon running php PEAR and Smarty so i will list them and also their solutions.
1. Apache 2 user web site permission or access issue
This basically was the default configuration issue on leopard & apache 2.
Unlike tiger systems, you have to add username.conf or local.conf to gain access to user account on the web server.
It's is confusing that apple does this. but don't trust those words and ip addresses you see on the web sharing page on SystemPreference app.
and then add those Directory deny etc etc thing you do
after that for php you'll have to edit httpd.conf
just remove sharp from the line on php5 module.
2. PEAR
go-pear.php tutorial you see when you search for leopard pear installation works but bit wrong.
It tells you to include usr/share/pear even though the author is installing on some other directory...
well let PEAR installer handle all those directory (because it asks you if you want to change the include_path)
if you've installed PEAR on whatever directory that's the directory you need as the include path. You'll see capital PEAR folder somewhere and inside you'll see HTML, DB and things like that. that's the directory you need to include.
3 Smarty
download file from the website includes all documents. what you need to "cp" are inside the lib folder inside Smarty folder. don't follow direction as is.
4 PHP include_path
It's sometimes better to keep them as global include and when you want to do this would you install it on PEAR directory? you probably wouldn't want to do that. Then what you can do is to set multiple include_path directory.
private/etc/php.ini is the file you want to edit and look for include_path
when you want multiple include_path on mac system you cannot do : and another directory
instead do :: (two colons) between two directories.
for example,
usr/local/::usr/bin
all these you might need root level access to your system.
that's probably enough to remind myself of what to do next time I install so I won't have to waste couple hours struggling with it. hope this helps.
Thursday, January 08, 2009
php installation on leopard PEAR Smarty
Posted by
SONARHYTHM Logic Pro School
at
12:20 AM
0
comments
Labels: PHP, programming, Web 2.0, WebDesign
Monday, January 28, 2008
AJAX tutorial 1
I finally started looking at AJAX and it seems pretty easy (well if you know html, javascript, already) it makes your learning curve even less steep if you knew actionscript 2.0 because there are many similar elements.
anyways, keys to understanding is XMLHttpRequest and DOM
DOM is basically way of knowing each elements location/names by browser.
1. window is window
2. document is what's inside the window
3. your a object will be like document.object
so document.getElementById('idOfTheObject') will give you access to that object. if you know css yes it's that same id you use. instead of # before the id name you use document.getElementById to access the object.
XMLHttpRequest is something that browser does with server. browsers are communicating with server and this is just and object that tracks that communication.
and you have methods to access that communication like onreadystatechange
this is used like xhr.onreadystatechange = function () {} or xhr.onreadystatechange = functionName; when xhr is the XMLHttpRequest you've created.
so how do you create XMLHttpRequest object? so that i can get info on what the page is doing with the server..
simple..
xhr = new XMLHttpRequest();
like you would any other object...
Only thing you need to keep track of is if the browser know what XMLHttpRequest object is
since this is relatively new technology you wouldn't be able to find one if somebody is using a computer from 10 years ago without updating.
so you just check
if (window.XMLHttpRequest)
very simple. and then in that if {} you are going to create XHR object.
var xhr = false;
if (window.XMLHttpRequest)
{
xhr = new XMLHttpRequest();
}
that will create the object and you can get ready for the next step.
Posted by
SONARHYTHM Logic Pro School
at
10:59 PM
0
comments
Labels: AJAX, programming, Web 2.0, WebDesign
Web 2.0 Design Tips (by SitePoint.com)
i've just looked at web 2.0 design tips by sitepoint.com
Image discussing
everyone know about drop shadows by now but there are more to design and i think this is one of simple yet effective way of presenting.
You see diagonal lines there on the background and why do you think that this is there? what is it that the designer wanted to achieve? yes, she wanted that sun (or star or however you want to call it) to catch your eye.
generally when you want to make things pop you could..
create drastic color/contrast/hue difference between background and foreground.(like using opposite colors from color wheel)
for example..
1. draw borders
2. drop shaddow, glow and similar effects made available by photoshop, fireworks and other graphics software.
3. just pick colors..
well this one was combination of all of them actually but one that caught my eyes was that use of pattern to make the color look darker, which kept the color but now the back ground is more like a background than if you had just a solid or simple gradation.
she created more distinct separation by putting something without any pattern on something with pattern.
back in the days when you could only do black and white probably this technique was the only way but nowadays you just don't see this often. So i thought it's worth mentioning.
but you do want to think when to use, and when not to.. like if that was behind some texts, it will make texts hard to read.
The article itself
sitepoint.com has been publishing nice books and tutorials so check them out when you have time.
Posted by
SONARHYTHM Logic Pro School
at
9:30 PM
0
comments
