8

I am a fresh installation of Joomla 3.1 running on my home computer. My environment is Ubuntu 12.10 with apache server, php 5.4.6 installed. Since installing the system, no I am just trying to install more languages through the language manager: enter image description here

As you can see, the 2 additional languages that I wanted show up in the list, but after selecting each language, and clicking "Install", I was led to a page with this message:

DateTime::__construct(): Failed to parse time string (jerror) at position 0 (j): The timezone could not be found in the database

With a button to just go back to the control panel. I was suprised to see these languages show up in the list.

I also saw this message when I tried (and failed) to install my first component - it was a component to embed google maps in articles.

Anyway, I haven't been able to find a solution for this problem online, I was wondering if anyone out there knows what the problem is. Any help is greatly appreciated!

Thanks!

EDIT

The problem in my case turned out to be that some on my directories where un-writable. I went to the "directory permissions" tab under "System Information", and tried to make sure that all the directories were writable. When i first opened it, all the directories in the "administrator" directory were not writable, and we changed them to be writable through the shell in linux, then i was able to install the new languages without the error message above.

enter image description here

jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160

7 Answers7

18

This is the most stupid bug in Joomla 3. I wasted 2 days trying to solve this out and I found that the problem was that the log and tmp paths were not set correctly on the configuration.php

Don't worry there's nothing wrong with your Date/Time/Timezone/Localization settings. It's just a stupid silly message that doesn't relate to the actual problem.

To save your time I recommend you get the full path using this script:

<?php
$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
?>

Create a PHP file and upload it to Joomla root. It will get you the path correctly

My path looked exactly the same except that there was an uppercase letter screwing everything up.

Note that this error could happen if the folders doesn't have the correct permission (not writable)

Ahmad Alfy
  • 13,107
  • 6
  • 65
  • 99
  • Thanks Ahmad, I checked my `configuration.php` and the logs and tmp paths are correct already... Not sure if maybe it is another problem with my config file. – jeffery_the_wind May 19 '13 at 08:25
  • Yes I just did, and it path is exactly the same, except there is a `$` character on the end of the output from `dirname(__FILE__)`, but I think that is just a problem with my shell. SO yes the pathname is already correct. – jeffery_the_wind May 19 '13 at 08:31
  • OK can you check the update and added? Also try adding this `$` I think it is the problem. – Ahmad Alfy May 19 '13 at 08:32
  • I am not sure about that `$` ... PHP isn't suppose to echo it I think – Ahmad Alfy May 19 '13 at 08:34
  • I checked system info, and the log and tmp files are writable, but I see that the language/overrides is not writable, and all the administrator folders are not writable... Do you think it could have something to do with the fact that my session handler is `database`? The error says coundn't find timezone in database. – jeffery_the_wind May 19 '13 at 08:39
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/30203/discussion-between-ahmad-alfy-and-jeffery-the-wind) – Ahmad Alfy May 19 '13 at 08:55
  • As a start I would say fix the permission issues. I don't think it's related to the timezone or the database to be honest – Ahmad Alfy May 19 '13 at 09:27
  • 1
    I changed all the permissions so that the folders were writable, and that solved the problem! – jeffery_the_wind May 19 '13 at 09:50
  • Perfect, it isn't a faulty write permission issue then. My case was wrong path and yours is un-writable directories. I will file a bug – Ahmad Alfy May 19 '13 at 09:55
  • just been cloning a J3 site from one server to another and ran into this issue... it was the tmp and log paths in the config file that I had neglected to change. It looks like you saved me days of work! Thanks. – Doug Jul 12 '13 at 11:02
5

I have a successful answer for this problem in joomla 3x

DateTime::__construct(): Failed to parse time string (jerror) at position 0 (j): The timezone could not be found in the database

  1. Set the correct path to your joomla site tmp folder

    Log in to joomla administrator Panal System -> global Configuration -> Server

    and give the correct path ("Path To Tmp Folder")

    EX: http://www.yourDomain.com/tmp

  2. Path to Sloving PHP file

    libraries/joomla/filesystem/folder.php

    Change Online 260 with this code

__METHOD__ . ': ' . JText::_('JLIB_FILESYSTEM_ERROR_COULD_NOT_CREATE_DIRECTORY'). 'Path: ' . $path, JLog::WARNING, 'jerror'

Eashan
  • 438
  • 4
  • 16
  • 1
    What if you get the error when trying to login to the admin panel? I keep getting the error and the login credentials are correct. – twan Dec 08 '16 at 08:54
2

Ok just had the same problem, was helping a friend who couldnt get his new joomla 3 site to install a new template. Every thing looked good in system infomation, all writeable but on looking further I found although plugins/ was marked as writeable I had to change all the permissions for each folder in plugins/ and it worked straight away. Hope this helps.

Red Dog
  • 21
  • 1
2

I was able to fix this by creating /tmp and /log directories one level above the website root and making them writable.

Example:
/home/sitename/log
/home/sitename/tmp
2

this problem cause of changing the host of your joomla and the address of /tmp and /log directory in configuration.php file need correction with new address

1

This issue can be fixed easily.

go to plugins/system/yt/includes/libs/yt-minify.php

go to this line :

$this->optimizeFolder  = $app->getTemplate(true)->params->get('optimizeFolder', 'yt-assets');

and change it to :

$this->optimizeFolder = $app->getTemplate(true)->params->get('optimizeFolder', 'yt-assets');
$this->optimizeFolder = JPATH_ROOT.'/'.$this->optimizeFolder;

hope it works!

Hoang Pham
  • 11
  • 1
0

If you are using Admin Tools it can cause this to appear when you use the wrong password when trying to login as admin (because it locks directories). Also, it'll give you a heart attack.

bombcar
  • 153
  • 1
  • 4