Apr 04

Is XOOPS the Cause of my Headache?

I have a headache and I am upgrading a website from XOOPS 2.2 to 2.5.4.  This  website is also being moved from my own server to a shared web hosting account on another web host and for 2 days I was sure that this was the reason for my headache.  No longer can I tail -f access_log or error_log to see what is going on because those files are not available to my userid.  Also, I cannot modify httpd.conf to change the website home but I must use .htaccess instead.  I am convinced this is a reason for my pain.

Or is it….

XOOPS (xXtensible Object Oriented Portal System) is written in PHP and uses MySQL and what was once merely a portal system in the earlier versions is not on the way to becoming a powerful content management system.  It is flexible and lightweight with the extreme ease of adding, modifying, or disabling modules.

As I am moving this website I am learning more about this application. Some of the issues I am discovering are listed below (and my lack of knowledge of these I am sure was the cause of my headache) :

1.  A blank page in the website can mean that the module being used is not compatible with the newest version of the software.  Try deactivating each module one by one until the blank page is gone.

2. A blank page can also mean that you are on a PHP 5 web host and the module was written for PHP4.  Again try deactivating each module until you determine the culprit.  Then you can either find a compatible version or change the module yourself for PHP 5.

3. In the preferences section of the control panel it is possible to set debugging “on”.  There are 3 levels of debugging that are possible.   These are very useful in helping to track down any problems in modules and in the behavior of the website.

Stay tuned for more tips as I discover them.

 

Jan 27

Web Tidbit 8 – Jupdate Headaches

I updated a Joomla 1.5 website to Joomla 1.7 using the suggested method, i.e. Jupdate.  All was find and the website worked with no problems.   However, when it was time to upgrade to 1.7.3, I found that all was not as well as I had thought with the website. Joomla 1.7 includes automatic update capability for future enhancements and changes and naturally I used this method.

When I attempted to update the website, an error with this message occurred: Invalid extension update

Pressed for time, I uploaded the upgrade and installed it the old fashioned way.  The website worked fine with no problems again.  When it was time to update to Joomla 2.5, this error again showed up.

This time, I compared database files and the files from each update with the complete version of the package.  I found that the file /administrator/components/com_installer/models/update.php was different on my website.  I replaced the file with the one from the complete package and the automatic update worked.

I do not know if this is fixed yet, so if upgrading Joomla 1.5 to 2.5, be aware that this file may need to be replaced.

 

Jan 10

Web Tidbit 6 – Lost Joomla 1.6 or later Super Administrator Password?

Have you lost this password?  Are you attempting to reset it using the lost password feature on the front-end?  If you have tried this and are perplexed because it is not working then you are not losing your mind.

In the Joomla 1.6 and later this method of regaining the password for the Super Administrator will not work.  There are several methods that you can use to restore functionality.  Check out this page for the detail on each method and choose the way that you find best for your situation.

The method that seemed easiest to me was to add another Super Administrator user by modifying the database.  Using this method I ran the following query on my database.

INSERT INTO `jos_users` (`id`,`name`, `username`, `password`, `params`) VALUES (LAST_INSERT_ID(),’Administrator2′, ‘admin2′, ‘d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199′, ”); INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (LAST_INSERT_ID(),’8′);

The password is a MD5, salted hashed password.

Dec 04

Windows 7 – Tidbit 1

When I purchased my new laptop from Acer, (a TravelMate 7750G) I wanted to change the desktop background.  It wasn’t a bad background, (just the picture of the laptop) however I naturally wanted to personalize it.  I tried everything and for some reason the background would not change.

I found that a file called TranscodedWallpaper.jpg was the culprit and the reason it could not be changed.  I deleted this file and then the desktop background could be changed.  This file is automatically created and if it becomes corrupt, it will prevent the background from changing.  

Oct 13

Web Tidbit 2 – Web Host Apache httpd.conf Configuration Options

If you have you have your own web server you can configure apache in a very secure fashion to make sure that your applications are running with the exact set of options that they need to operate properly.  Using the configuration options, you can have a very secure and efficient web server.  This is not possible when you are configuring a shared web server for a hosting company as that sever is meant to be shared by the hosting customers.   Your customers will want and demand exceptions to most security limits and it will be impossible to stay in business.

For example, the directive Allowoverride specifies the types of over-riding directives allowed in the .htaccess files in individual website directories.  In a secure hosting environment, the directive is set to: Allowoverride None which disables .htaccess configurations.  However in a shared hosting environment, the directive would be set to: Allowoverride All so that the hosting company does not have to customize the configuration files for each user.

By allowing Allowoverride All,  a feature such as server side includes via the .htaccess file. This creates a situation where by using the “exec cmd” element, any SSI enabled files can execute any CGI script or program under the permissions of the user and the group Apache is configured to use, as defined in httpd.conf.  This is NOT an environment for a secure application.

In addition, SSI-enabled files increase the load on the server in ways that can create a significant problem in a shared  server environment.  Each SSI-enabled file has to be parsed by Apache regardless of whether there are any actually SSI directives in the file.

Bottom line is to beware of shared server environments if you are basing your company and livelihood on a website.  If you can, get your own private server and hire an administrator to configure it for you.  Or, hire me to configure your server and provide you with ongoing support.  You want your website data to be secure and you don’t want to wake up someday to find that your entire site has been replaced by something else as a result of a hacker.  (And yes, I have seen this happen!! More than once!!)

 

Sep 20

Web Tidbit 3 – Installing Phpwebsite

I have a website that is using phpwebsite version 1.6.3 on a linux server.  I am moving this website to a different linux server and at the same time upgrading to the latest version that is 2.7.2.  I have decided to do a complete install of 2.7.2 and then move over the content separately.   These are the steps that I followed and what I have learned from this project.

1. I uploaded the .gz to the new server and unzipped it.

2. Create an empty database with a user and password.

3. Run the /setup/index.php script and enter the information that you are asked for.

Additional:
By default, the directory that is created will be one with phpwebsite followed by the version number, such as phpwebsite_2_7_2.  That is not a very attractive directory name so if you change the name of the directory later on, you need to change it in /config/core/config.php.

Sep 20

Web Tidbit 1 – Root Directory

When doing the website creation in a directory underneath public_html but in a different directory makes the URL require adding the directory following the domain name.  However, to cause only the domain name to be necessary to access the website, make modifications to .htaccess as follows (I am using the website domain review-a-book as an example:

RewriteEngine on
#main domain is review-a-book.com
RewriteCond %{HTTP_HOST} ^(www.)?review-a-book.com$
#subdirectory is bookreviews
RewriteCond %{REQUEST_URI} !^/bookreviews/

RewriteRule ^(.*)$ /bookreviews/$1

#uncomment these if I want to be able to get to
#stuff in public_html – I don’t then leave it
#commented
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d

#redirect the root folder
RewriteCond %{HTTP_HOST} ^(www.)?review-a-book.com$
RewriteRule ^(/)?$ /bookreviews/index.php [L]

#RewriteCond %{HTTP_HOST} ^internetsite\.org$ [OR]
#RewriteCond %{HTTP_HOST} ^www\.internetsite\.org$
#RewriteRule ^/?$ “http\:\/\/internetsite\.com\/” [R=301,L]

#RewriteCond %{HTTP_HOST} ^internetsite\.com$ [OR]
#RewriteCond %{HTTP_HOST} ^www\.internetsite\.com$
#RewriteRule ^/?$ “http\:\/\/www\.internetsite\.com\/jupgrade” [R=301,L]

# -FrontPage-

#IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName review-a-book.com
AuthUserFile /home/reviewab/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/reviewab/public_html/_vti_pvt/service.grp

RewriteCond %{HTTP_HOST} ^review-a-book.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.review-a-book.com$
RewriteRule ^/?$ “http\:\/\/review\-a\-book\.com\/bookreviews” [R=301,L]

RewriteCond %{HTTP_HOST} ^review\-a\-book\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.review\-a\-book\.net$
RewriteRule ^/?$ “http\:\/\/review\-a\-book\.com” [R=301,L]

RewriteCond %{HTTP_HOST} ^review\-a\-book\.org$ [OR]
RewriteCond %{HTTP_HOST} ^www\.review\-a\-book\.org$
RewriteRule ^/?$ “http\:\/\/review\-a\-book\.com” [R=301,L]

Sep 06

Web Tidbit 4 – Backing up MySql with phpMyAdmin

Almost all websites these days contain at least some form of data obtained from a database.  This added functionality requires that a back up of the website includes backing up the database.  With phpMyAdmin, this task is made simple and technical knowledge is not necessary.  The following is how to back up a database with phpMyAdmin.

  1. Access phpMyAdmin and select the database that you wish to back up.
  2. Select Export
  3. Select your entire database.  This will usually be more than 1 table.  They will appear under the database name.
  4. Select SQL for the output format
  5. Make sure that Structure is checked
  6. Make sure that Add AUTO_INCREMENT is checked
  7. Select  Enclose table and field name with backquotes
  8. Select DATA
  9. Select hexadecimal for binary field
  10. Set Export type to INSERT
  11. Select

Aug 30

Linux Tidbit 2 – Booting without fsck

I put an fsckoptions file in / of my filesystem on a web server running RedHat Enterprise Linux 4 so that when it reboots on it’s own and needs to do a file system check,  it does not just stay down until someone physically hits the return key at the console.  This system has a problem in doing this (that is a whole other tidbit).  However, I did not put the proper information in the file so every time I rebooted the machine, it would not come up without go to fsck as a result of this file.  The file systems were mounted read-only which made it impossible to remove, rename, or edit the file. So I learned the about “fastboot”.

To boot a linux system and skip any fsck checking, simply put fastboot at the end of the grub command for the kernel you are booting.

Jul 13

Linux Tidbit 3 – RPM Notes and Examples

RPM is a very powerful utility on Linux.  There are some commands that I always need to use and I am tired to looking them up each time.  I continue to need them but I use them infrequently enough that I forget each time.  (old age moments?) So I am putting them here so help me.  Maybe they will help you too.  This list will grow as need to look up commands.

  • rpm -qf /sbin/ldconfig   – To find out which package owns a file

Older posts «