{"id":281,"date":"2008-08-22T00:48:48","date_gmt":"2008-08-22T05:48:48","guid":{"rendered":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=281"},"modified":"2008-08-22T00:52:55","modified_gmt":"2008-08-22T05:52:55","slug":"php-encryption-and-cakephp-on-the-ibook","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=281","title":{"rendered":"PHP Encryption And CakePHP On The iBook"},"content":{"rendered":"<p>Today I continued my intensive work on PHP web development. I spent about 3 hours studying PHP&#8217;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.<\/p>\n<p>This evening I spent way too much time struggling to get <a href=\"http:\/\/cakephp.org\/\" target=\"_blank\">CakePHP<\/a> 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 <strong>php.ini<\/strong> file is and found the apache error log file as well. <\/p>\n<p>The first struggle was to get a database connection. The <strong>mysql.lock<\/strong> is not where CakePHP expects it to be so I had to edit my php.ini file to specify its location for my <a href=\"http:\/\/www.mamp.info\/en\/index.php\" target=\"_blank\">MAMP<\/a> MySQL Server. I would probably have less problems if I was not trying to use it for everything but I don&#8217;t want to manage two database servers on one laptop.&nbsp;&nbsp; <\/p>\n<p>I had to change permissions on many files. I&#8217;ve begun to use <a href=\"http:\/\/www.openkomodo.com\/\" target=\"_blank\">Komodo Edit<\/a> 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.<\/p>\n<p>So after I get the database connection working I still had to fix <strong>mod_rewrite<\/strong>. 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 <em>&#8220;You don&#8217;t have permission to access \/posts\/index on this server.&#8221;<\/em> which required another edit of \/etc\/httpd\/users\/admin.conf to add FollowSymLinks to the Options.<\/p>\n<div style=\"border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4\">\n<div style=\"padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none\">\n<pre style=\"padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none\"><span style=\"color: #606060\">   1:<\/span> <span style=\"color: #0000ff\">&lt;<\/span><span style=\"color: #800000\">Directory<\/span> <span style=\"color: #0000ff\">\"\/Users\/admin\/Sites\/\"<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/pre>\n<pre style=\"padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none\"><span style=\"color: #606060\">   2:<\/span>     Options All FollowSymLinks Indexes MultiViews<\/pre>\n<pre style=\"padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none\"><span style=\"color: #606060\">   3:<\/span>     AllowOverride All<\/pre>\n<pre style=\"padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none\"><span style=\"color: #606060\">   4:<\/span>     Order allow,deny<\/pre>\n<pre style=\"padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none\"><span style=\"color: #606060\">   5:<\/span>     Allow from all<\/pre>\n<pre style=\"padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none\"><span style=\"color: #606060\">   6:<\/span> <span style=\"color: #0000ff\">&lt;\/<\/span><span style=\"color: #800000\">Directory<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/pre>\n<\/div>\n<\/div>\n<p>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! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I continued my intensive work on PHP web development. I spent about 3 hours studying PHP&#8217;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 &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=281\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,6,11],"tags":[110,63,1149,1145],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/281"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=281"}],"version-history":[{"count":1,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/281\/revisions"}],"predecessor-version":[{"id":282,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/281\/revisions\/282"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=281"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}