While on the subject of logging with PHP I felt it would be wise to focus discuss some methods of enhancing Apache logging. As anyone who has run an Apache server knows the httpd-access log is pretty much always active which means that if you would like to rotate your log file before it becomes too large for sane processing then you need to stop the http daemon backup and clear the file before relaunching the service. This can be a tedious process and if done manually a royal pain in the backside.
TechnoBabel
Tweaking Apache & PHP with .htaccess
Earlier this evening I decided to turn up the PHP error logging on some of my vhosts. I tried simple things like adjusting the timezone. As well as turning on E_STRICT logging and saving these errors to a specific log file unique to that vhost.
Unfortunately; I kept receiving a 500 Internal Server Error. After examining the actually Apache error logs I noticed the following message:
.htaccess: php_value not allowed here
Sharing selected photos using GooglePlus
In the previous article I discussed turning off the photo auto backup feature of GooglePlus. Obviously it wouldn’t be very handy if that inhibited you from ever sharing photos so let’s take a look at how to choose the photos you actually wish to share. Obviously the first step is to launch the app on your phone.
At the bottom of the home stream page you should see the four relatively self explanatory buttons. Your screen should look similar to the one in the following image, if not try sliding the stream up and down a bit to expose the buttons.
Simply select the blue camera button and you will be taken to your current photo catalog. Similar to the one in the next screen shot.
If you do not have any images in the catalog that you like you can select the greyed out camera icon on the far right to switch to your camera app. In this case we shall select a couple of images in the library to work with. In the follow screen shot I selected two images that I like by tapping on the checks.
Notice the blue next button in the upper right reminds me of how many images I have checked. Since I am satisfied I will hit the next button.
In this screen I have the opportunity to add some commentary about the photos that I have selected this is similar to any other basic update. Obviously when I have finished I tapped the green done button and proceed to the photo sharing review page.
I call this the photo sharing review page because this is really your last chance to double check spelling and modify the circles you wish to share this content to. Seriously, if this is a sketchy photo of your spring break that may resurface to haunt you at some point like that all important job interview in the future then it really is your last chance to cancel. If everything is kosher then hit share and wait for the Google magick to happen.
When it is done you will see your new post appear at the top of your GooglePlus stream similar to the following;
Thank about wraps things up. I hope that you found these two posts useful. Please leave some comments about other content you would like to see covered.
If we’re not connected on GooglePlus then please drop by and say, ‘Hello.’
Related articles
How to turn off auto photo backups in GooglePlus
Recently a the number of friends and associates that have become fed up with the shenanigans on Facebook, has increased and many are trying alternatives like Google Plus. A few have asked me how to do ‘X’ or ‘Y’ so I’ve decided to throw together this quick help document.
I fully expect Google to change the way things are done as soon as this is published…
At this point whether you are new to GooglePlus or a long time user I highly recommend that you consider turning off the photo ‘Auto Backup’ feature. If you do not then every photo you take with the camera will be uploaded to Google. This is bad because it is a gross waste of bandwidth and may prove detrimental to your personal security. I know that the photos are not available to the general public unless you actually share them but my personal feeling is that if you have any doubt about the public accessibility of your content then do not upload it in the first place. I live by this simple mantra;
Nothing is private the moment you upload it!
In light of these security concerns let’s shut down that feature. Launch the GooglePlus app and go to the home menu and tap the gear next to your photo.
On the settings page select Camera and Photos.
In the camera and photos settings menu turn off ‘Auto Backup.’
That about does it you will not have to worry about Google Plus skagging your photos without your explicit permission. One word of caution I have had a few updates to the app since the first time I performed this and have had to shut the feature off twice. I highly recommending taking a peek at the settings after each update just to ensure things stay secure the way you like it.
Related articles
Removing index.php form WordPress permalink structure on Mac OS X Server
For a long time I have wanted to modify the permalink structure but every time I deviated from the custom format below I end up receiving a rather nasty 404 error page.Granted I wrote the nasty 404 error page so it’s message does not bother me especially. It is more the fact that WordPress just was not playing nice with my installation.
/index.php/%year%/%monthnum%/%day%/%postname%/
After many years of playing around and tweaking things I finally stumbled upon the answer. The remaining issue was to fix my permalinks such that I could abandon the year/month/day format in addition to the whole index.php file. In other words I really wanted my timeless content to shine without loosing any of the link juice that 6 plus years of blogging can yield.
So the first issue was to modify the rewrite rules in my .htaccess to expedite the 301 redirection of the old post structure to the new streamlined domain name/post name structure. The following is an excerpt of the .htaccess rule I used to accomplish this.
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RedirectMatch 301 ^/index.php/({4})/({2})/({2})/([^/]+)/$ https://www.jafdip.net/$4 RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
At this point I still had not fixed the 404 error page rendering onĀ redirection. I discovered that because I run a self hosted instance of WordPress on Mac OS X Server and by default the http.conf has the AllowOverride directive set to None. Some sites I found during my search several individuals claimed to have fixed it by simple changing AllowOverride to All and chmoding the permission on .htaccess to 777 which is really kind of STUPID.
Honestly I can not think of any reason you would want to chmod anything in your web tree to be writable by the entire world let alone why you’d want to do this to such a critical system file for your website. On top of that setting your AllowingOverride directive to all is akin to turning off the security provided by your web server. It is really a bad practice and I just can not recommend you do it with out really understanding what you are doing.
<Directory "/Path/To/Your/Site"> AllowOverride FileInfo </Directory
In this case I set my AllowOverride to FileInfo which is still more secure than allowing everything. Once I did this I have to restart Apache in order to reload the config file. One thing to keep in mind is that rather than change that setting on all site across the system I am only changing it in the appropriate vhost configuration file.
I hope that this post helps someone some day avoid the frustration of trying to put the remove index.php & rewriterules of .htaccess together. I realize that if you are not hosting your site on Mac OS X Server you will not likely encounter this phenomenon unless your site’s administrator is very strict about hardening your WordPress installation. I would be very keen to know if you encounter this on other operating systems especially if it’s a stock installation.