Tag Archives: PHP

Word Wrapped Preformatted text in DokuWiki

12 Feb

I am using DokuWiki quite extensively lately to keep documentation of various things. Using wiki is quite useful in general and some people opt for using local wiki such as WikiPad but for my needs, I opted for online wiki since I often times need to access it from various places. Maybe in the future I will post why I chose DokuWiki and some of my (objective) thoughts about comparison to other wikis and some of my likes and hates about DokuWiki (although there are much more “likes” than “hates” :) ). This post would be short and not about it.

Several times I just wanted to put a plain (preformatted) text into the wiki for whatever reasons but I ran into a problem that DokuWiki isn’t really ready to support this. One option is to use <code> but then the lines are not word wrapped and for text it looks just weird. So at those various occasions I tried to search for a solution with little success until I just took xterm plugin and modified it slightly (mostly the style CSS file) which took me about 5 minutes to do  (and took me about 30 minutes to write this post, and the corresponding DokuWiki Plugin page and test the browsers) and now we have a wpre plugin for DokuWiki for word wrapped preformatted text which seem to work on all recent major browsers. You can dowload it from here wpre plugin for DokuWiki (the page on DokuWiki references this file)

Supported browsers:

(I just tested whatever I had installed on my machine and all are pretty recent. I suspect many much older versions should be supported as well)

  • FireFox 3.5.7
  • Safari 4.0.4 for Windows
  • Opera 10.10
  • Internet Explorer 8.0
  • Chrome 4.0

Some web server administration tips on CentOS and cPanel (but not only)

26 Jan

This is more of a personal notes for myself but I am sure others will find it useful.

Apache:

/usr/local/apache/logs/error_log

All exceptions caught by httpd, along with standard error output form CGI applications are logged here.  The first place you should look when httpd crashes, or you incur errors when accessing a website.

/usr/local/apache/logs/suexec_log

Contains auditing information reported by suexec each time a CGI applicaiton is executed.  If you receive an internal server error, with no relevant information being reported to the Apache error_log, check here for potential suexec policy violations.

Domain specific access logs are located here:

/usr/local/apache/domlogs/

PHP

To find out which php.ini is used for PHP configuration (to save you frustration of editing a non active php.ini) find it with the following simple command:
php -i | grep php.ini

where -i switch is used to give you PHP information (obviously). To see other useful switches run

php -h

to locate where php is use:

which php

(but you already knew this – right ? :)   )

*** Some of these tips are applicable not only to CentOS and cPanel configuration.