<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:series="http://unfoldingneurons.com/"
><channel><title>Larry Ullman &#187; apache</title> <atom:link href="http://www.larryullman.com/tag/apache/feed/" rel="self" type="application/rss+xml" /><link>http://www.larryullman.com</link> <description>Translating Geek Into English</description> <lastBuildDate>Mon, 21 May 2012 11:03:07 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>&#8220;PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)&#8221; Rough Table of Contents</title><link>http://www.larryullman.com/2011/03/31/php-and-mysql-for-dynamic-web-sites-visual-quickpro-guide-4th-edition-rough-table-of-contents/</link> <comments>http://www.larryullman.com/2011/03/31/php-and-mysql-for-dynamic-web-sites-visual-quickpro-guide-4th-edition-rough-table-of-contents/#comments</comments> <pubDate>Thu, 31 Mar 2011 17:33:17 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[JavaScript]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[book]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[phpmysql4]]></category> <category><![CDATA[server]]></category> <category><![CDATA[toc]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2456</guid> <description><![CDATA[I&#8217;m just about finished with Chapter 7 of the fourth edition of my &#8220;PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide&#8221;. I thought I&#8217;d take this time to finally share the rough version of the Table of Contents (this is actually version 2, as the first version was changed while working on the [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m just about finished with Chapter 7 of the fourth edition of my &#8220;PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide&#8221;. I thought I&#8217;d take this time to finally share the rough version of the Table of Contents (this is actually version 2, as the first version was changed while working on the SQL and MySQL chapters).</p><p>In my <a
href="http://www.larryullman.com/2011/02/25/what-is-larry-thinking-37-becoming-a-better-programmer-part-2/#you">newsletter</a>, I had presented some of my thoughts as to changes for the fourth edition, and I received a ton of very useful replies. Before showing the TOC, I want to discuss the feedback and how that impacted my plan.<span
id="more-2456"></span></p><p>Many people wanted to see more on the Web server (customizing its behavior, using it for extra security, and so forth), which I think is warranted. The best place to put that content is in Appendix A, &#8220;Installation.&#8221; Not everyone will have the ability or need to tweak the Web server, so the material should&#8217;t go in a chapter, and Appendix A discusses server-related stuff in general as is. I&#8217;ll try to cover the most important Apache know-how in about 10 pages or so.</p><p>People also wanted to see more on databases, JOINs, and complex SQL, which is natural. The previous version of the book had three dedicated chapters on these subjects: Intro to MySQL, Intro to SQL, and Advanced SQL and MySQL. I&#8217;m creating a fourth chapter in this edition, in order to expand this area. The Intro to MySQL and Intro to SQL chapters are similar to the previous edition, teaching the basics while using a single table. The new Chapter 6, &#8220;Database Design,&#8221; covers not just normalization but MySQL-related issues to design: indexes, storage engines, character sets and collations, and foreign key constraints. Some of this is moved from other chapters and some is entirely new to this edition. In the chapter, two normalized, multi-table databases are designed, including one new one. The revamped Chapter 7, &#8220;Advanced SQL and MySQL,&#8221; takes some of the existing content on JOINs, groupings, FULLTEXT searches, and the like, and adds more on JOINs, a discussion of EXPLAIN, more sophisticated selections (CASE(), COALESCE(), IF(), etc.) plus transactions, database encryption, and so forth. The creation of a second example database in Chapter 6 means I can create more examples, especially of the complex stuff, in Chapter 7.</p><p>There was an appropriately mixed reaction to including some Object-Oriented Programming and JavaScript. Both topics are logical ways to expand the book, but both really require oodles of pages to be covered appropriately. Unless you take shortcuts, that is&#8230;</p><p>The great thing about OOP is that you can reasonably use it without mastering it. The complexity of OOP is in the design process: creating classes of code with methods, attributes, inheritance, access control, etc. The ease of OOP is in using already defined classes. What I’ve decided to do is show how one <em>uses</em> OOP in PHP. Doing so will provide an introduction to OOP without overwhelming the reader or distracting from the other content. And, there are plenty of good OOP classes built into PHP that I can use as examples. One will be the <a
href="http://www.php.net/mysqli">MySQL Improved extension</a>, which the book already demonstrates procedurally (so the OOP coverage will provide a nice comparison). Other candidates include the <a
href="http://www.php.net/manual/en/class.datetime.php">DateTime class</a>, the <a
href="http://www.php.net/manual/en/book.intl.php">Internationalization libraries</a>, and the <a
href="http://www.php.net/manual/en/book.spl.php">Standard PHP Library</a>. From this list of candidates, I should be able to put together a nice chapter that both demonstrates how to use OOP, as well as introduces newer features of PHP 5.3 (in fact, some of these classes replicate functionality that was intended for PHP 6, so I can reuse some of the PHP 6 content in a new way).</p><p>By comparison, the great, and bad, thing about JavaScript is that people often use it without really knowing it. There&#8217;s no way to effectively teach JavaScript in this book, but I can, similar to how I handle OOP, show how to use the <a
href="http://www.jquery.com/">jQuery</a> framework. So I&#8217;m hoping I can get a chapter in the book on jQuery, probably using it to add dynamic functionality to some of the book&#8217;s existing scripts (e.g., form validation inline, Ajax, etc.).</p><p>Depending upon space, I may also create a new appendix that discusses &#8220;best practices&#8221;.</p><p>That&#8217;s what I&#8217;m thinking thus far. These things are always prone to change, even on the fourth edition. Below is the current version of the table of contents. As always, any and all feedback is welcome. And thanks again to those who have already provided some thoughts.</p><ul><li>Chapter      1: Introduction to PHP<ul><li>Basic       Syntax</li><li>Sending       Data to the Web Browser</li><li>Writing       Comments</li><li>What       Are Variables?</li><li>Introducing       Strings</li><li>Concatenating       Strings</li><li>Introducing       Numbers</li><li>Introducing       Constants</li><li>Single       vs Double Quotation Marks</li></ul></li><li>Chapter      2: Programming with PHP<ul><li>Creating       an HTML Form</li><li>Handling       an HTML Form</li><li>Conditionals       and Operators</li><li>Validating       Form Data</li><li>Introducing       Arrays</li><li>For       and While Loops</li></ul></li><li>Chapter      3: Creating Dynamic Web Sites<ul><li>Including       Multiple Files</li><li>Handling       HTML Forms, Revisited</li><li>Making       Sticky Forms</li><li>Creating       Your Own Functions</li></ul></li><li>Chapter      4: Introduction to MySQL<ul><li>Naming       Database Elements</li><li>Choosing       Your Column Types</li><li>Choosing       Other Column Properties</li><li>Accessing       MySQL</li></ul></li><li>Chapter      5: Introduction to SQL<ul><li>Creating       Databases and Tables</li><li>Inserting       Records</li><li>Selecting       Data</li><li>Using       Conditionals</li><li>Using       LIKE and NOT LIKE</li><li>Sorting       Query Results</li><li>Limiting       Query Results</li><li>Updating       Data</li><li>Deleting       Data</li><li>Using       Functions</li></ul></li><li>Chapter      6: Database Design<ul><li>Normalization</li><li>Creating       Indexes</li><li>Using       Different Table Types</li><li>Languages and MySQL</li><li>Time Zones and MySQL</li><li>Foreign Key Constraints</li></ul></li><li>Chapter      7: Advanced SQL and MySQL<ul><li>Performing       Joins</li><li>Grouping       Selected Results</li><li>Advanced Selections</li><li>Performing       FULLTEXT Searches</li><li>Performing       Transactions</li><li>Database Encryption</li></ul></li><li>Chapter      8: Error Handling and Debugging<ul><li>Error       Types and Basic Debugging</li><li>Displaying       PHP Errors</li><li>Adjusting       Error Reporting in PHP</li><li>Creating       Custom Error Handlers</li><li>PHP       Debugging Techniques</li><li>SQL       and MySQL Debugging Techniques</li></ul></li><li>Chapter      9: Using PHP with MySQL<ul><li>Modifying       the Template</li><li>Connecting       to MySQL</li><li>Executing       Simple Queries</li><li>Retrieving       Query Results</li><li>Ensuring       Secure SQL</li><li>Counting       Returned Records</li><li>Updating       Records with PHP</li></ul></li><li>Chapter      10: Common Programming Techniques<ul><li>Sending       Values to a Script</li><li>Using       Hidden Form Inputs</li><li>Editing       Existing Records</li><li>Paginating       Query Results</li><li>Making       Sortable Displays</li></ul></li><li>Chapter      11: Web Application Development<ul><li>Sending       Email</li><li>Date       and Time Functions</li><li>Handling       File Uploads</li><li>PHP       and JavaScript</li><li>Understanding       HTTP Headers</li></ul></li><li>Chapter      12: Cookies and Sessions<ul><li>Making       a Login Page</li><li>Defining       the Login Functions</li><li>Using       Cookies</li><li>Using       Sessions</li><li>Improving       Session Security</li></ul></li><li>Chapter      13: Security Approaches<ul><li>Preventing       Spam</li><li>Validating       Data by Type</li><li>Validating Files by Type</li><li>Preventing       XSS Attacks</li><li>Preventing       SQL Injection Attacks</li></ul></li><li>Chapter      14: Perl-compatible Regular Expressions<ul><li>Creating       a Test Script</li><li>Defining       Simple Patterns</li><li>Using       Quantifiers</li><li>Using       Character Classes</li><li>Finding       All Matches</li><li>Using       Modifiers</li><li>Matching       and Replacing Patterns</li></ul></li><li>Chapter      15: Introducing jQuery<ul><li>What is jQuery?</li><li>Incorporating jQuery</li><li>Selecting Page Elements</li><li>Event Handling</li><li>jQuery Effects</li><li>DOM Manipulation</li><li>Using Ajax</li><li>jQuery Plug-Ins</li></ul></li><li>Chapter      16: An OOP Primer<ul><li>Fundamentals of OOP</li><li>Working with MySQL</li><li>The DateTime Class</li><li>The Standard PHP Library</li><li>Applying Internationalization</li></ul></li><li>Chapter      17: Example—Message Board<ul><li>Making       the Database</li><li>Writing       the Templates</li><li>Creating       the Index Page</li><li>Creating       the Forum Page</li><li>Creating       the Thread Page</li><li>Posting       Messages</li></ul></li><li>Chapter      18: Example—User Registration<ul><li>Creating       the Templates</li><li>Writing       the Configuration Scripts</li><li>Creating       the Home Page</li><li>Registration</li><li>Activating       an Account</li><li>Logging       In and Logging Out</li><li>Password       Management</li></ul></li><li>Chapter      19: Example—E-Commerce<ul><li>Creating       the Database</li><li>The       Administrative Side</li><li>Creating       the Public Template</li><li>The       Product Catalog</li><li>The       Shopping Cart</li><li>Recording       the Orders</li></ul></li><li>Appendix      A: Installation<ul><li>Installation       on Windows</li><li>Installation       on Mac OS X</li><li>MySQL       Permissions</li><li>Testing       Your Installation</li><li>Configuring       PHP</li><li>Server Configuration</li></ul></li><li>Appendix      B: Best Practices<ul><li>Comments</li><li>Optimization</li></ul></li></ul> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/03/31/php-and-mysql-for-dynamic-web-sites-visual-quickpro-guide-4th-edition-rough-table-of-contents/feed/</wfw:commentRss> <slash:comments>13</slash:comments> </item> <item><title>Enabling SSL on Mac OS X Leopard</title><link>http://www.larryullman.com/2009/03/06/enabling-ssl-on-mac-os-x-leopard/</link> <comments>http://www.larryullman.com/2009/03/06/enabling-ssl-on-mac-os-x-leopard/#comments</comments> <pubDate>Fri, 06 Mar 2009 15:08:35 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Mac OS X]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[apache]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=326</guid> <description><![CDATA[Sometime ago I was asked by someone in the forums if I could assist in setting up SSL on Mac OS X Leopard to enable HTTPS connections. The good news is that after a huge delay, I was able to get this to work, without that much effort. The bad news is that I accomplished [...]]]></description> <content:encoded><![CDATA[<p>Sometime ago I was asked by someone in the <a
href="http://www.larryullman.com/forum/">forums</a> if I could assist in setting up SSL on Mac OS X Leopard to enable HTTPS connections. The good news is that after a huge delay, I was able to get this to work, without that much effort. The bad news is that I accomplished this over two different attempts, so my notes may not be foolproof. And, um, I&#8217;ve already slightly reconfigured my Apache, so that might come into play. Anyway&#8230;</p><p>So follow these instructions to make this work. If you have any questions or problems, you can post a comment at the end of this article. In order to pull this off, you will need an administrative password for your computer, a text editor, and the Terminal application. If the Terminal scares you, you probably shouldn&#8217;t do this.<span
id="more-326"></span></p><p>I will also say in advance, though, that if you want the easiest, most reliable way to get HTTPS working on Mac OS X Leopard, the answer is either <a
href="http://www.mamp.info/en/index.html">MAMP</a> or <a
href="http://www.apachefriends.org/en/xampp-macosx.html">XAMPP</a>, both of which are all-in-one <strong>M</strong>ac OS X, <strong>A</strong>pache, <strong>P</strong>HP, and <strong>M</strong>ySQL packages (aka <em>MAMP</em>). Both are excellent, supremely easy to install, and work without issue (that I know of). To be absolutely clear about my recommendation here, I now personally use either MAMP or XAMPP for all of my Web installs on Mac OS X Leopard and I&#8217;m quite capable of installing this stuff from the source code.</p><p>If you want a little background on this, part of the problem is that Leopard includes both 32-bit and 64-bit versions of Apache. If you have a Mac Book Pro, then you have a 64-bit Intel processor, meaning Apache is running in 64-bit mode. Which means that everything must be compiled in 64-bit mode, which can be extremely problematic. (This may apply to other Macs; I don&#8217;t know off the top of my head which ones are using 64-bit Intel processors and which aren&#8217;t.) All that being said, here&#8217;s what I did&#8230;</p><p>Using my Mac Book Pro running Mac OS X Leopard 10.5.6, I started by generating the certificate keys. To do so, I followed the <a
href="http://developer.apple.com/internet/serverside/modssl.html">instructions found on Apple&#8217;s Web site</a>. Follow those instructions exactly, up to this line:</p><pre class="brush: bash; title: ; notranslate">sudo apachectl stop</pre><p>You should not execute that line, although it really doesn&#8217;t matter (it just stops the Apache Web server). At this point, in the <strong>/etc/apache2/ssl.key</strong> folder you should have a bunch of files, which are the keys and certificates and other junk created using those instructions.</p><p>Next, you&#8217;ll need to open <strong>/etc/apache2/httpd.conf</strong> in a text editor or IDE. In the Terminal, you can start by making a backup copy:</p><pre class="brush: bash; title: ; notranslate">cd /etc/apache2
sudo cp httpd.conf httpd.conf.backup</pre><p>Then you can open the file using a Terminal text editor like <em>pico</em> (although I prefer <em>vi</em>):</p><pre class="brush: bash; title: ; notranslate">sudo pico httpd.conf</pre><p>Of course you&#8217;ll need to enter the administrator&#8217;s password after the first time you use <em>sudo</em> (and after some minutes of inactivity).</p><p>To edit the file in a GUI text editor like <a
href="http://www.barebones.com">BBEdit</a>, <a
href="http://www.barebones.com">TextWrangler</a>, or <a
href="http://www.macromates.com">TextMate</a>, you can open the folder in the Finder by choosing <em>Go &gt; Go to Folder</em> and entering <em>/etc/apache2</em> in the prompt. This will open that folder in a Finder window, then you can drag the <strong>httpd.conf</strong> file onto the text editor to open it. (There are command line and other ways to open the file in a graphical app, but I&#8217;m trying to keep this relatively simple.)</p><p>In the httpd.conf file, find the line that says</p><pre class="brush: plain; title: ; notranslate">LoadModule ssl_module libexec/apache2/mod_ssl.so</pre><p>and make sure it does not have a <strong>#</strong> at the front of it. If it does, that means the line is commented-out, making that module inactive.</p><p>Go a little bit further down and remove the # from in front of:</p><pre class="brush: plain; title: ; notranslate">Include /private/etc/apache2/extra/httpd-ssl.conf&lt;</pre><p>That line includes the SSL configuration file. You can now save <strong>httpd.conf</strong> (you&#8217;ll likely need to enter the admin password at the prompt).</p><p>Next, open <strong>httpd-ssl.conf</strong>, found in the <strong>/etc/apache2/extra</strong> folder. (By the way, <strong>/etc/apache2</strong> and <strong>/private/etc/apache2</strong> are two references to the same thing.)</p><p>In the <strong>httpd-ssl.conf</strong> file, you need to edit two lines, indicating the location of the certficate and key. These two lines are a few lines apart.</p><pre class="brush: plain; title: ; notranslate">SSLCertificateFile /private/etc/apache2/ssl.key/server.crt</pre><pre class="brush: plain; title: ; notranslate">SSLCertificateKeyFile &quot;/private/etc/apache2/ssl.key/server.key&quot;</pre><p>If you followed the instructions on Apple&#8217;s Web site, then you use exactly those values. If you used different names for the certificate or the key, or stored them in a different directory, you&#8217;ll need to change these values accordingly.</p><p>That&#8217;s it there. Now save <strong>httpd-ssl.conf</strong> and close it (again, you&#8217;ll likely need to enter the admin&#8217;s password).</p><p>Now you can test how it worked. To do so, go to the Terminal and type:</p><pre class="brush: bash; title: ; notranslate">sudo apachectl configtest</pre><p>If it says <em>Syntax OK</em>, you&#8217;re good to go. If it gives an error, make a note of what it is and search the Web or post a question here.</p><p>If you got the <em>Syntax OK</em> message, you just need to restart Apache to make the changes take effect. If Apache is running, you can enter this at the Terminal:</p><pre class="brush: bash; title: ; notranslate">sudo apachectl graceful</pre><p>If Apache isn&#8217;t running, enter</p><pre class="brush: bash; title: ; notranslate">sudo apachectl stop</pre><p>Or you can use the System Preferences &gt; Sharing pane to start and stop Web Sharing.</p><p>Next, open your Web browser and go to <strong>https://localhost</strong> (note the &#8220;S&#8221; after <em>http</em>). Depending upon your browser, you&#8217;re most likely going to get an error message indicating that it&#8217;s not a real, valid, or secure certificate. That&#8217;s fine. You just need to tell the browser to trust that certificate. On Firefox 3.0.7, I clicked the link that said <em>Or you can add an exception</em>. Then I clicked <em>Add Exception&#8230;</em> Then clicked Get Certificate and Confirm Security Exception. The first two figures show steps 2 and 4. On Safari 3.2.1, I clicked <em>Show Certificate</em> then checked <em>Always trust</em>&#8230; and clicked <em>Continue</em> in the next prompt (see the last two figures).</p><a
href='http://www.larryullman.com/2009/03/06/enabling-ssl-on-mac-os-x-leopard/ssl2/' title='ssl2'><img
width="150" height="150" src="http://cloudfront.larryullman.com/wp-content/uploads/2009/03/ssl2-150x150.png" class="attachment-thumbnail" alt="ssl2" title="ssl2" /></a> <a
href='http://www.larryullman.com/2009/03/06/enabling-ssl-on-mac-os-x-leopard/ssl4/' title='ssl4'><img
width="150" height="150" src="http://cloudfront.larryullman.com/wp-content/uploads/2009/03/ssl4-150x150.png" class="attachment-thumbnail" alt="ssl4" title="ssl4" /></a> <a
href='http://www.larryullman.com/2009/03/06/enabling-ssl-on-mac-os-x-leopard/ssl5/' title='ssl5'><img
width="150" height="150" src="http://cloudfront.larryullman.com/wp-content/uploads/2009/03/ssl5-150x150.png" class="attachment-thumbnail" alt="ssl5" title="ssl5" /></a> <a
href='http://www.larryullman.com/2009/03/06/enabling-ssl-on-mac-os-x-leopard/ssl7/' title='ssl7'><img
width="150" height="150" src="http://cloudfront.larryullman.com/wp-content/uploads/2009/03/ssl7-150x150.png" class="attachment-thumbnail" alt="ssl7" title="ssl7" /></a><p>So that&#8217;s what worked for me. Hopefully this will work for you, should you decide to go this route.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2009/03/06/enabling-ssl-on-mac-os-x-leopard/feed/</wfw:commentRss> <slash:comments>16</slash:comments> </item> </channel> </rss>
<!-- Served from: www.larryullman.com @ 2012-05-21 14:26:02 by W3 Total Cache -->
