Joomla/Mambo Troubleshooting

Is your Joomla! installation having problems?

Diagnosis
The first step in pinning down a problem with any software program is to make sure you have the latest version installed. If you do not, please go to the Joomla website, download the latest version, and follow the program's instructions on how to upgrade. Also check for security patches and releases. Many high load situations are due to hackers using a vulnerable script to execute high-load commands on the server, or to send out thousands of spam email messages. This taxes the shared servers.

The '''Joomla! documentation''' is at http://help.joomla.org/. Read that, of course. Also, take a look at the '''Joomla! Forums''', http://forum.joomla.org/. There's a lot of other users who have already posted questions and answers, and the Joomla! developers often speak up with answers. Anyone can search and read, but you must register in order to post.

Performance impact of SEF URLs
As of this writing, there has been a heated debate in the Joomla forums on SEF (Search Engine Friendly URLs) core and .htaccess in Joomla. Trying disabling SEF and waiting a day or two to see how that affects your usage. SEF core is disabled in Joomla by default, so if you are unsure whether it is enabled, it more than likely is not since you need to enable it. If you do not remember how it is enabled, set $mosConfig_sef= "0" in configuration.php and rename htaccess.txt to .htaccess. It is also recommended that you watch your logs for bots and block any that seem to be hitting your site too hard.

If Joomla is still using a lot of resources, it could be that your website has become very popular. While our shared hosting servers are very good at handling quite a bit of traffic from our customers, there does come a point sometimes where a site will outgrow shared hosting and need to move onto the next step - a shiny new VPS (Virtual Private server)!

Register Globals
When installing Joomla!, at the pre-installation check page, the setting "Register Globals:" is listed as expected to be "OFF:", but it may be "ON". This is not an actual problem, but perhaps it's a potential problem and worth correcting. Here is some backgroud on this issue.
 * FAQ: How to change register globals to OFF, from Joomla! Forum, advises: "Just open your .htaccess file and add this line in the end of it: php_flag register_globals off." There is further discussion, explanation, and alternative approaches in this article.
 * What does Register Globals mean? The article http://en.wikibooks.org/wiki/Programming:PHP:Register_Globals sums it up, but "You gotta have a little understanding of PHP", per user MystaMax in the Register Globals FAQ item above.
 * Register Globals article in Joomla! forums has further discussion and suggestions. "Registering Globals is not a Joomla! security issue but a potential (!!) PHP security issue. 'Potential' because properly written code shouldn't have a security issue at all with globals on. However, there's plenty of code available from not so good coders (who write fine code otherwise, no FUD about that) which overlook the security issue posed with globals on. Now, what security issue is there? The best answer can be found on the PHP site itself: http://uk2.php.net/register_globals . No need to repeat it here; too long a story." (by user jdg).

Symptom: "Template File Not Found! Looking for template:"
User:JimDeLaHunt writes: on the evening of my first day using Joomla!, I came to the main page of my site, and found a page that was blank except for the words Template File Not Found! Looking for template: in green letters. I went to the Admin logon page, and it looked normal, but when I tried to log in as [http://help.joomla.org/content/view/228/153/ Joomla! SuperAdministrator], I got an error message: You cannot login. There are no administrators set up. [OK]

Here are some postings from the Joomla! forums that seemed relevant to my situation. Note, though, that they had text after the message "Looking for template:", while I had no text there.
 * Topic: please help Template File Not Found! Looking for template:rt_showcar
 * Topic: Template File Not Found! Looking for template:rhuk_solarflare_ii

Following a tip in MySQL, I checked that status of my MySQL database, using the section of the panel. It showed 0.004MB of data in the database. This seemed small. Then I noticed that the physical computer hosting that MySQL server had failed, and data was backed up to after I had created the database, but before I had completed the Browser Installation. Thus my MySQL database was essentially empty. It didn't have any of the user IDs, sample data, or any of the early changes I made to my site!

Here's how I fixed the problem: This was successful. Note: the resulting configuration.php was identical to my earlier version, except for a different value in the line $mosConfig_secret = .... The values were both 16-character alphanumeric data strings, so I'm guessing they were supposed to be different.
 * I restored the installation/* directory that was deleted in step 17 of the installation instructions. (I had saved a copy.)
 * I renamed the file configuration.php, so that Joomla! would think it wasn't there.
 * I opened the root page of my site. The pre-installation check page appeared.  This put me back to step 10 of the installation process, following the link in the "installation email".
 * I re-did the installation instructions from "11. Pre-installation check" through "18. Return to the step 4 page...".

Symptom: text corrupted in PDF files generated from non-Latin script text
The built-in PDF generator in Joomla 1.0.x apparently doesn't work with text encoded in any character encoding different from ISO-8859-1. This means that text using a script different from Latin script, e.g. languages outside of Western Europe such as Greek, Russion, Chinese, Japanese, will have corrupted or missing text in PDF files which Joomla! generates from that text.

patch to use invision-graphics.comj for PDF generation is one work-around.

[http://forum.joomla.org/index.php?topic=64413.0 Joomla! Forum "greek fonts on pdf pop up"] refers to the patch to use invision-graphics.com.

''[Note: as of this writing these patches haven't been tested. If you test them, please update this article with your findings.]''

Symptom: 503 errors
It looks like Joomla and mod_security don't always go together. It you're experiencing 503 errors wen using Joomla on your site (even the latest version), try unchecking the Extra Web Security option for the domain and its mirror sites. You can find that by editing the domain's Web Hosting in the panel under Manage Domains A known example for this Joomla working with Virtuemart.

"302 Found and Error 500" when using Joomla and SEF
If you use Joomla! and a SEF extension (e.g. 404SEFx) on your Dreamhost domain, then the wrong choice in the Domains Control Panel for "www" handling can cause a problem. Take Symptoms are (using example.com as the domain): 302 Found Found The document has moved here. [where "here" is a link to http://www.example.com ] Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
 * Go to  http://example.com/  (no "www."), and site works fine
 * Go to  http://www.example.com/  (with "www."), and site throws this error:
 * turn SEF off using its control panel. Go to  http://www.example.com/  (with "www."). Now site works fine!

Web searches will turn up many others who had this problem. It is a problem with the .htaccess file which controls the Apache web server. However, the solution is host-dependent.

For Dreamhost, the solution is to go to the Domains Control Panel, and change the setting How do you like the www in your URL? My domain was set to "respond either with www. or without", and I saw the problem. I change the setting to "respond to www. only", saved changes, and waited for the change to take effect. This fixed the problem.

Now you go to  http://www.example.com/  (with "www."), and the site should work fine.

Suppressing Unwanted PHP Error and Warning Output
Other areas of the wiki have recommended running a customized PHP-CGI binary, or wrapping a DreamHost PHP-CGI binary so you can manage your own custom php.ini file, but this turned out to be a royal pain when I tried it. If you really just want to suppress the errors and warnings quick-n-dirty and only in Joomla, you can do so by editing two files in the Joomla install. (Note: Tested with Joomla 1.0.15 only so far.)

Insert the following lines into the two files /home/username/example.com/index.php</tt> and /home/username/example.com/administrator/index2.php</tt> directly after the <PHP tag at the start of the file (and of course, edit the /username/example.com/</tt> bit of the "error_log" path as appropriate for your site): ini_set('display_errors', 'off'); ini_set('display_startup_errors', 'off'); ini_set('html_errors', 'off'); ini_set('log_errors', 'on'); ini_set('error_log', '/home/username/example.com/php_errors.log');

This will turn off all onscreen display of errors and instead log them to php_errors.log, which may be good enough for most people's purposes.

Don't forget to make a backup copy of the lines somewhere, as future security patches may well overwrite the index files!