Today I continued my intensive work on PHP web development. I spent about 3 hours studying PHP’s many methods of encrypting data. There are a variety of encryption algorithms that you can use including MD5, SHA-1, DES etc so it took me awhile to explore them all.
This evening I spent way too much time struggling to get CakePHP working on my iBook. I suppose it was worthwhile because it forced me to spend much more time exploring the system. I now know where the php.ini file is and found the apache error log file as well.
The first struggle was to get a database connection. The mysql.lock is not where CakePHP expects it to be so I had to edit my php.ini file to specify its location for my MAMP MySQL Server. I would probably have less problems if I was not trying to use it for everything but I don’t want to manage two database servers on one laptop.
I had to change permissions on many files. I’ve begun to use Komodo Edit rather than emacs to edit my configuration files. It is a lot easier to use although I wish it would show line numbers by default.
So after I get the database connection working I still had to fix mod_rewrite. The key to getting this to work was to edit the special user version of the httpd.conf file which was located in /etc/httpd/users/admin.conf for the admin user. Then I got a Forbidden error “You don’t have permission to access /posts/index on this server.” which required another edit of /etc/httpd/users/admin.conf to add FollowSymLinks to the Options.
1: <Directory "/Users/admin/Sites/">
2: Options All FollowSymLinks Indexes MultiViews
3: AllowOverride All
4: Order allow,deny
5: Allow from all
6: </Directory>
After all that I found my posts table did not have any records so I had to go back and run the INSERT SQL statements again. I was up until 2:00 AM in the morning working through all those problems!
Pingback: Bookmarks about Emacs