links for 2010-02-26




links for 2010-02-25




links for 2010-02-20




links for 2010-02-17


links for 2010-02-15




links for 2009-09-12




Installing/Setting Up/mod_rewrite Cake PHP


Hi, I have been using and learning CakePHP. I faced some problems while installing it and I some how rectified it. When I googled for solutions, I found there were not many people who are talking abouthte problems I had. But, Im sure there are many out ther who are having the same problems.

My CakePHP version is :cake_1.2.4.8284 and Since, I’m on mac, Im using Mac. The xampp version that I’m using is XAMPP 1.7.2. So basically that is my set up environment.

My Document root directory is : /Applications/XAMPP/xamppfiles/htdocs

My Cake installation directory was : /Applications/XAMPP/xamppfiles/htdocs/cake

App Folder: /Applications/XAMPP/xamppfiles/htdocs/cake/app

Web root folder : /Applications/XAMPP/xamppfiles/htdocs/cake/app/webroot

So, I think Now you can relate to you installation.

Problems that I faced are:

CakePHP CSS not applied to the page.

I solved this by including the AllowOverride All to the webroot folder (i.e /Applications/XAMPP/xamppfiles/htdocs/cake/app/webroot) in httpd.conf.

The code sample is:

Alias /cake /Applications/XAMPP/xamppfiles/htdocs/cake/app/webroot
<Directory “/Applications/XAMPP/xamppfiles/htdocs/cake/app/webroot”>
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Restart the server, to let the changes take effect.

The second problem that I faced was, mod_rewrite not working or Internal Server Error in Cake PHP. The mod_rewrite is extensive and I’m not a pro in it, So it took a while. If you can understand mod_rewrite then it will be easier for you the sort the problem.

Basically, I followed the blog tutorial on the cakePHP site and when I was trying to view the page using http://localhost/cake/post (i.e Nice URL), it was throwing a Internal Server Error.

After, Some googling I found that the problem was with the .htaccess file. There are basically 3 .htaccess files that comes with the cake and they have to be configured correctly, the 3 .htaccess files are located in the following directory,

/Applications/XAMPP/xamppfiles/htdocs/cake,

<IfModule rewrite_module>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /cake
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>

/Applications/XAMPP/xamppfiles/htdocs/cake/app,

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /cake
RewriteRule    ^$    webroot/    [L]
RewriteRule    (.*) webroot/$1    [L]
</IfModule>

/Applications/XAMPP/xamppfiles/htdocs/cake/app/webroot

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /cake
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

For your convenience I have posted the code here.  The line of code that I added in all three .htaccess file to make it work was the RewriteBase /cake (Line 3). Rest, remains as it came from the installation of Cake PHP.

I have not given much explanation about, how things work here, but, I feel there are people out there who are looking for the same.



Deals Site from Tech Twin


Hi All,.

There has been a Deals site that has been added to Tech Twin. This part of tech twin will work hard to get the best deals available for you online. Don’t spend a lot of money buying from shops. You can get the same products for less price. So here is deals site from Tech Twin http://www.deals.eatoutbuddy.com.



links for 2009-08-13




links for 2009-08-03