{"id":30401,"date":"2017-07-26T03:01:05","date_gmt":"2017-07-25T17:01:05","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=30401"},"modified":"2022-11-16T13:09:28","modified_gmt":"2022-11-16T03:09:28","slug":"apachephpmysql-linux-language-considerations-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/apachephpmysql-linux-language-considerations-primer-tutorial\/","title":{"rendered":"Apache\/PHP\/MySql Linux Language Considerations Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/mamp_language.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Apache\/PHP\/MySql Linux Language Considerations Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/mamp_language.jpg\" title=\"Apache\/PHP\/MySql Linux Language Considerations Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Apache\/PHP\/MySql Linux Language Considerations Primer Tutorial<\/p><\/div>\n<p>The recent <a target=_blank title='CSS Style Javascript DOM Override Onload Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css-style-javascript-dom-override-onload-primer-tutorial\/'>CSS Style Javascript DOM Override Onload Primer Tutorial<\/a> &#8220;proof of concept&#8221; web application ended up with the name &#8230;<\/p>\n<p><code><br \/>\n<a target=_blank title='are_you_happy_with_my_or_do_you_think_my_derriere_needs_work.html' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/are_you_happy_with_my_or_do_you_think_my_derriere_needs_work.html'>are_you_happy_with_my_or_do_you_think_my_derriere_needs_work.html<\/a><br \/>\n<\/code><\/p>\n<p> &#8230; but along the way we wanted to call it &#8230;<\/p>\n<p><code><br \/>\nare_you_happy_with_my_or_do_you_think_my_derri\u00e8re_needs_work.html<br \/>\n<\/code><\/p>\n<p> &#8230; but this didn&#8217;t work as an RJM Programming website filename.  Rather than make it work, we compromised, and called it (the final)  are_you_happy_with_my_or_do_you_think_my_derriere_needs_work.html it ended up as.  But this didn&#8217;t stop us wondering about all this language and the relationship of these language characters and where and how you can or can&#8217;t use those characters outside those usual US-keyboard type characters.<\/p>\n<p>And that brings us to the great <a target=_blank title='MAMP local Apache\/PHP\/MySQL' href='http:\/\/mamp.info'>MAMP<\/a> local Apache\/PHP\/MySql web server product, as a place to experiment, comforted in the knowledge that the Mac OS X Terminal application &#8230;<\/p>\n<p><code><br \/>\nls -li<br \/>\n<\/code><\/p>\n<p> &#8230; and knowledge of inodes (all the way to their &#8220;extreme case Linux system file removal talents) you can read about at <a target=_blank title='Linux Inode File Removal Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/linux-inode-file-removal-tutorial\/'>Linux Inode File Removal Tutorial<\/a> would probably protect me from home grown stupidities.<\/p>\n<p>So what followed for me was a quick look at MAMP&#8217;s relevant php.ini file and its httpd.conf configuration files to see that the web server default &#8220;goto look for&#8221; file list for the web server directory can be altered by a change of &#8230;<\/p>\n<p><code><br \/>\nDirectoryIndex index.html index.php<br \/>\n<\/code><\/p>\n<p> &#8230; to something else in httpd.conf Apache configuration file.  But nothing to easily reinvent the US-keyboard feeling file extensions .htm and .html and .php that was apparent to me.  And noting to change that &#8230;<\/p>\n<p><code><br \/>\n[protocol]:\/\/localhost:[localHostPortNumber]\/<br \/>\n<\/code><\/p>\n<p> &#8230; US-keyboard feeling prefix to a URL, such as our http:\/\/localhost:8888\/ prefix to a MAMP local Apache\/PHP\/MySql URL we created a Simplified Chinese character set &#8220;Hello World&#8221; folder scenario (and thank <a target=_blank title='Google Translate' href='http:\/\/translate.google.com'>Google Translate<\/a> for translation help today) &#8230;<\/p>\n<p><code><font color=black>ht<\/font>tp:\/\/localhost:8888\/\u4f60\u597d\/\u4e16\u754c\/<\/code><\/p>\n<p>index.html as per &#8230;<\/p>\n<p><code><br \/>\n&lt;!doctype html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;title&gt;RJM\u7f16\u7a0b\u7740\u9646\u9875&lt;\/title&gt;<br \/>\n&lt;meta charset=\"UTF-8\"&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;h1&gt;\u6b22\u8fce\u6765\u5230-RJM\u7f16\u7a0b\u7f51\u7ad9&lt;\/h1&gt;&lt;br&gt;<br \/>\n&lt;a target=_blank title='RJM\u7f16\u7a0b\u7740\u9646\u9875' href='https:\/\/translate.google.com\/translate?sl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=%2F%2Fwww.rjmprogramming.com.au%2Findex.html&tl=zh-CN'&gt;RJM\u7f16\u7a0b\u7740\u9646\u9875&lt;\/a&gt;<br \/>\n&lt;\/body&gt;&lt;\/html&gt;<br \/>\n<\/code><\/p>\n<p>Within the php.ini configuration file we found interesting, in particular &#8230;<\/p>\n<p><code><br \/>\n; Automatically add files before or after any PHP document.<br \/>\nauto_prepend_file =<br \/>\nauto_append_file =<br \/>\n<b><\/b><br \/>\n; PHP's built-in default is text\/html<br \/>\ndefault_mimetype = \"text\/html\"<br \/>\n<b><\/b><br \/>\n; Whether to allow the treatment of URLs (like http:\/\/ or ftp:\/\/) as files.<br \/>\nallow_url_fopen = On<br \/>\n<\/code><\/p>\n<p> &#8230; the last of which, if set to <i>Off<\/i> could set up for the scenario of setting up a web server full of index.html and index.php code in web server folders that could include non US-keyboard characters, and so you could have within the code of &#8230;<\/p>\n<p><code><font color=black>ht<\/font>tp:\/\/localhost:8888\/\u4f60\u597d\/<\/code><\/p>\n<p> index.html a relative URL such as &#8230;<\/p>\n<p><code>&lt;a target=_blank title='\u4f60\u597d \u4e16\u754c' href='\u4e16\u754c'&gt;\u4f60\u597d \u4e16\u754c&lt;\/a&gt;<\/code><\/p>\n<p> &#8230; taking you off to today&#8217;s (URL) starting place.<\/p>\n<p>Am sure you can feel yourself, there is so much more to explore in this topic area, and we&#8217;ll be returning soon to this neck of the woods soon, we hope.  In the meantime, take a look at our <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/mamp_language.jpg\" title='Click picture'>tutorial picture<\/a> for a bit of what we did on MAMP with some of these concepts not changing any configuration files at all.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d30401' onclick='var dv=document.getElementById(\"d30401\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/mamp\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d30401' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The recent CSS Style Javascript DOM Override Onload Primer Tutorial &#8220;proof of concept&#8221; web application ended up with the name &#8230; are_you_happy_with_my_or_do_you_think_my_derriere_needs_work.html &#8230; but along the way we wanted to call it &#8230; are_you_happy_with_my_or_do_you_think_my_derri\u00e8re_needs_work.html &#8230; but this didn&#8217;t work as &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/apachephpmysql-linux-language-considerations-primer-tutorial\/\">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":[12,29,37],"tags":[85,1627,234,249,418,532,558,1515,605,1752,1560,707,714,725,744,827,932,2119,1252,2213,1345,1411],"class_list":["post-30401","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-apache","tag-characters","tag-command-line","tag-configuration","tag-file","tag-google-translate","tag-hello-world","tag-httpd-conf","tag-index-html","tag-inode","tag-language","tag-linux","tag-local-web-server","tag-mac-os-x","tag-mamp","tag-mysql","tag-php","tag-php-ini","tag-terminal","tag-tutotial","tag-url","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30401"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=30401"}],"version-history":[{"count":15,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30401\/revisions"}],"predecessor-version":[{"id":57498,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30401\/revisions\/57498"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=30401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=30401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=30401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}