No database table is created

Need help installing Joomla! 3.x? For all Joomla! 3.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
albertjoom
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Oct 20, 2012 9:03 pm

No database table is created

Post by albertjoom » Sat Oct 20, 2012 9:26 pm

I installed XAMPP 1.8.1 (php 5.4.7, MySQL 5.5.27, Apache 2.4) and tried to install Joomla 3.0, but the install process hangs after creating the database ( the database is created - I can see it using phpMyAdmin ), but no table is created. If I stop my browser and start again the install process and choose to remove existing database, it comes to step 3, where I choose "Default english sample data". But then I can see shortly 2 progress bars (one for creating database and one for creating tables) but there is still no table created in the database and the page come back to the step 3. The install process does not display any errors. I looked in all logs (MySql, apache log, Windows Event Log), but I see no error. As the database is created, this is not an access problem to MySql and phpMyAdmin works perfectly.

I had this problem with 3.0.0 and I still have the same problem with 3.0.1.

I tried several times ( removing the whole folder with joomla 3.0 files - installed in a directory "xampp\htdocs\joomla3" ), but I always have the same problem. I have in another directory "xamp\htdocs\joomla2" joomla 2.5.7 and it works without any problem. Apache is configured to run several virtual hosts. One of them is for joomla 2.0 and the other for joomla 3.0.

Thank you in advance for your help

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: No database table is created

Post by humvee » Sun Oct 21, 2012 9:07 am

I have used the XAMPP 1.8 for repeated successful installations of 3.x.x without any such issues.
Apache is configured to run several virtual hosts. One of them is for joomla 2.0 and the other for joomla 3.0.
Are you stating that you are modifying the XAMPP installation itself and/or using it for public hosting?

albertjoom
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Oct 20, 2012 9:03 pm

Re: No database table is created

Post by albertjoom » Sun Oct 21, 2012 10:43 pm

I used XAMPP for development purpose. My problem is on my dev machine, where I'm testing new sites. I modified the apache file xampp\apache\conf\extra\httpd-vhosts.conf as follow (XAMPP is installed on D:\Data\xampp):

<VirtualHost 127.0.0.1>
ServerAdmin [email protected]
DocumentRoot "D:/Data/xampp/htdocs/jootest2"
ServerName jootest2.dev
ServerAlias www.jootest2.dev
ErrorLog "logs/jootest2-error.log"
CustomLog "logs/jootest2-access.log" combined
<Directory "D:/Data/xampp/htdocs/jootest2">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerAdmin [email protected]
DocumentRoot "D:/Data/xampp/htdocs/jootest3"
ServerName jootest3.dev
ServerAlias www.jootest3.dev
ErrorLog "logs/jootest3-error.log"
CustomLog "logs/jootest3-access.log" combined
<Directory "D:/Data/xampp/htdocs/jootest3">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

I have try on another machine (virtual machine with Windows 7) to install XAMPP 1.8.1 and then directly install Joomla 3.0.1 as main site (in c:\xampp\htdocs) and it works. So the problem seems to be because of the Apache Virtual Host setting.

I will be very pleased if you have any advice how I could debug my issue on my dev machine. I have Eclipse installed, but as I'm a beginner with Eclipse, I could not find where Joomla has the problem.

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: No database table is created

Post by humvee » Tue Oct 23, 2012 8:24 am

Joomla does not have the problem it is, as you say, the fact that you are changing the Apache settings that the problem arises.
Therefore it is this that you ought to be researching and sorting out and I would suggest you do so either on the XAMPP forums or other more specialist server administration forum rather than here on Joomla forums which are intended to resolve specific issues with Joomla itself.

albertjoom
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Oct 20, 2012 9:03 pm

Re: No database table is created

Post by albertjoom » Tue Oct 23, 2012 9:01 am

Thank you for your answer.

But why does it works with Joomla 2.5.7 and not with Joomla 3.0.1? The installation process of Joomla 3.0.1 seems not to understand something that Joomla 2.5.7 could handle.
Could you give me some tips how I could log the installation process so that I can find exactly where the problem is? When looking in the Joomla files, the creation of the tables seems to be done in the file \installation\helpers\database.php. But how can I debug it or log the installation process?

I'm sure if I'm writing on a XAMPP forum as you propose, they will say it's a Joomla problem as Apache/mySQL work correctly (otherwise Joomla 2.5.7 will not work) and the Joomla installation page displays correctly.

Thank you in advance for any help

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: No database table is created

Post by humvee » Tue Oct 23, 2012 9:06 am

Please run the Forum Post Assistant to provide the information to help us try and resolve the issue.
Please follow the instructions in the post and the program pack closely.

albertjoom
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Oct 20, 2012 9:03 pm

Re: No database table is created

Post by albertjoom » Tue Oct 23, 2012 1:13 pm

Ok I think I found the problem. The problem is that the method getAlterDbCharacterSet($dbName) in libraries\joomla\database\driver.php is protected, instead of public. See the report below.

Thank you to give this further for investigation from a specialist...

Problem Description :: Forum Post Assistant (v1.2.3) : 23rd October 2012 wrote:Joomla 3.0: Installation Problem (database tables not created)
Log/Error Message :: Forum Post Assistant (v1.2.3) : 23rd October 2012 wrote:PHP RuntimeException: SQL= in D:\Data\xampp\htdocs\jootest3\libraries\joomla\database\driver\mysql.php on line 309
Last PHP Error(s) Reported :: Forum Post Assistant (v1.2.3) : 23rd October 2012 wrote:[23-Oct-2012 12:17:24 UTC] PHP 8. JDatabaseDriverMysql->execute() D:\Data\xampp\htdocs\jootest3\installation\models\database.php:788
Actions Taken To Resolve by Forum Post Assistant (v1.2.3) 23rd October 2012 wrote:File: installation\models\database.php

After some investigations I discovered that no error message was set in the below method, so I added $this->setError($e->getMessage()); . After this and when debugging with Eclipse I saw that the SQL query was empty. I added the query as it is done in Joomla 2.5.7 and I could install Joomla successfully :=)

[code] /**
* Method to set the database character set to UTF-8.
*
* @param JDatabaseDriver $db JDatabaseDriver object.
* @param string $name Name of the database to process.
*
* @return boolean True on success.
*
* @since 3.0
*/
public function setDatabaseCharset($db, $name)
{
// Run the create database query.
$db->setQuery($db->getAlterDbCharacterSet($name));
/*'ALTER DATABASE '.$db->quoteName($name).' CHARACTER' .
' SET `utf8`'
);*/

$db->setQuery(
'ALTER DATABASE '.$db->quoteName($name).' CHARACTER' .
' SET `utf8`'
);

try
{
$db->execute();
}
catch (RuntimeException $e)
{
$this->setError($e->getMessage());
return false;
}

return true;
}
[/code]

After some more analysis I think the problem is that the function getAlterDbCharacterSet($dbName) in libraries\joomla\database\driver.php is protected and when debugging the above method setDatabaseCharset($db, $name), the function method getAlterDbCharacterSet() is not called but instead the function __call($method, $args), which does nothing and the resulting sql query string is empty.

[code] /**
* Return the query string to alter the database character set.
*
* @param string $dbName The database name
*
* @return string The query that alter the database query string
*
* @since 12.2
*/
protected function getAlterDbCharacterSet($dbName)
{
$query = 'ALTER DATABASE ' . $this->quoteName($dbName) . ' CHARACTER SET `utf8`';

return $query;
}
[/code]

Forum Post Assistant (v1.2.3) : 23rd October 2012 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 3.0.1-Stable (Ember) 09-October-2012
Joomla! Platform :: Joomla Platform 12.2.0-Stable (Neil Armstrong) 21-September-2012
Joomla! Configured :: Yes | Writable (666) | Owner: 0 (uid: /gid: ) | Group: 0 (gid: ) | Valid For: 3.0
Configuration Options :: Offline: 0 | SEF: 1 | SEF Suffix: 0 | SEF ReWrite: 0 | .htaccess/web.config: No | GZip: 0 | Cache: 0 | FTP Layer: | SSL: N/A | Error Reporting: default | Site Debug: 0 | Language Debug: 0 | Default Access: 1 | Unicode Slugs: 0 | Database Credentials Present: Yes

Host Configuration :: OS: Windows NT | OS Version: 6.1 | Technology: i586 | Web Server: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 | Encoding: gzip, deflate | Doc Root: D:/Data/xampp/htdocs/jootest3 | System TMP Writable: Yes

PHP Configuration :: Version: 5.4.7 | PHP API: apache2handler | Session Path Writable: Unknown | Display Errors: 1 | Error Reporting: 32767 | Log Errors To: D:\Data\xampp\php\logs\php_error_log | Last Known Error: 23rd October 2012 14:17:24. | Register Globals: | Magic Quotes: | Safe Mode: | Open Base: | Uploads: 1 | Max. Upload Size: 128M | Max. POST Size: 8M | Max. Input Time: 60 | Max. Execution Time: 30 | Memory Limit: 128M

MySQL Configuration :: Version: 5.5.27 (Client:mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $) | Host: --protected-- (--protected--) | Collation: utf8_general_ci (Character Set: utf8) | Database Size: 3.20 MiB | #of Tables: 60
Detailed Environment :: wrote:PHP Extensions :: Core (5.4.7) | bcmath () | calendar () | ctype () | date (5.4.7) | ereg () | filter (0.11.0) | ftp () | hash (1.0) | iconv () | json (1.2.1) | mcrypt () | SPL (0.2) | odbc (1.0) | pcre () | Reflection ($Id: 7c9981924ded1ad2023fb1d5c3d1a8f290632f5c $) | session () | standard (5.4.7) | mysqlnd (mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $) | tokenizer (0.1) | zip (1.11.0) | zlib (2.0) | libxml () | dom (20031129) | PDO (1.0.4dev) | bz2 () | SimpleXML (0.1) | wddx () | xml () | xmlreader (0.1) | xmlwriter (0.1) | apache2handler () | Phar (2.0.1) | curl () | mbstring () | exif (1.4 $Id$) | gd () | gettext () | imap () | mysql (1.0) | mysqli (0.1) | pdo_mysql (1.0.2) | PDO_ODBC (1.0.1) | pdo_sqlite (1.0.1) | soap () | sockets () | sqlite3 (0.7) | xmlrpc (0.51) | mhash () | xdebug (2.2.1) | Zend Engine (2.4.0) |
Potential Missing Extensions :: openssl | suhosin |

Switch User Environment (Experimental) :: PHP CGI: No | Server SU: No | PHP SU: No | Custom SU (LiteSpeed/Cloud/Grid): Yes
Potential Ownership Issues: No

Apache Modules :: core | mod_win32 | mpm_winnt | http_core | mod_so | mod_access_compat | mod_actions | mod_alias | mod_allowmethods | mod_asis | mod_auth_basic | mod_authn_core | mod_authn_file | mod_authz_core | mod_authz_groupfile | mod_authz_host | mod_authz_user | mod_autoindex | mod_cgi | mod_dav_lock | mod_dir | mod_env | mod_headers | mod_include | mod_info | mod_isapi | mod_log_config | mod_cache_disk | mod_mime | mod_negotiation | mod_proxy | mod_proxy_ajp | mod_rewrite | mod_setenvif | mod_ssl | mod_status | mod_php5 | Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 |
Potential Missing Modules :: mod_expires | mod_deflate | mod_security | mod_evasive | mod_dosevasive | mod_qos | mod_userdir |
Folder Permissions :: wrote:Core Folders :: images/ (777) | components/ (777) | modules/ (777) | plugins/ (777) | language/ (777) | templates/ (777) | cache/ (777) | logs/ (777) | tmp/ (777) | administrator/components/ (777) | administrator/modules/ (777) | administrator/language/ (777) | administrator/templates/ (777) |

Elevated Permissions (First 10) :: administrator/ (777) | administrator/cache/ (777) | administrator/components/ (777) | administrator/components/com_admin/ (777) | administrator/components/com_admin/controllers/ (777) | administrator/components/com_admin/helpers/ (777) | administrator/components/com_admin/helpers/html/ (777) | administrator/components/com_admin/models/ (777) | administrator/components/com_admin/models/forms/ (777) | administrator/components/com_admin/sql/ (777) |
Extensions Discovered :: wrote:Components :: SITE :: com_mailto (3.0.0) | com_wrapper (3.0.0) |
Components :: ADMIN :: com_admin (3.0.0) | com_banners (3.0.0) | com_cache (3.0.0) | com_categories (3.0.0) | com_checkin (3.0.0) | com_config (3.0.0) | com_content (3.0.0) | com_cpanel (3.0.0) | com_finder (3.0.0) | com_installer (3.0.0) | com_joomlaupdate (3.0.0) | com_languages (3.0.0) | com_login (3.0.0) | com_media (3.0.0) | com_menus (3.0.0) | com_messages (3.0.0) | com_modules (3.0.0) | com_newsfeeds (3.0.0) | com_plugins (3.0.0) | com_redirect (3.0.0) | com_search (3.0.0) | com_templates (3.0.0) | com_users (3.0.0) | com_weblinks (3.0.0) |

Modules :: SITE :: mod_articles_archive (3.0.0) | mod_articles_categories (3.0.0) | mod_articles_category (3.0.0) | mod_articles_latest (3.0.0) | mod_articles_news (3.0.0) | mod_articles_popular (3.0.0) | mod_banners (3.0.0) | mod_breadcrumbs (3.0.0) | mod_custom (3.0.0) | mod_feed (3.0.0) | mod_finder (3.0.0) | mod_footer (3.0.0) | mod_languages (3.0.0) | mod_login (3.0.0) | mod_menu (3.0.0) | mod_random_image (3.0.0) | mod_related_items (3.0.0) | mod_search (3.0.0) | mod_stats (3.0.0) | mod_syndicate (3.0.0) | mod_users_latest (3.0.0) | mod_weblinks (3.0.0) | mod_whosonline (3.0.0) | mod_wrapper (3.0.0) |
Modules :: ADMIN :: mod_custom (3.0.0) | mod_feed (3.0.0) | mod_latest (3.0.0) | mod_logged (3.0.0) | mod_login (3.0.0) | mod_menu (3.0.0) | mod_multilangstatus (3.0.0) | mod_popular (3.0.0) | mod_quickicon (3.0.0) | mod_stats_admin (3.0.0) | mod_status (3.0.0) | mod_submenu (3.0.0) | mod_title (3.0.0) | mod_toolbar (3.0.0) | mod_version (3.0.0) |

Plugins :: SITE :: plg_authentication_gmail (3.0.0) | plg_authentication_joomla (3.0.0) | plg_authentication_ldap (3.0.0) | plg_captcha_recaptcha (3.0.0) | plg_content_emailcloak (3.0.0) | plg_content_finder (3.0.0) | plg_content_geshi (3.0.0) | plg_content_joomla (3.0.0) | plg_content_loadmodule (3.0.0) | plg_content_pagebreak (3.0.0) | plg_content_pagenavigation (3.0.0) | plg_content_vote (3.0.0) | plg_editors_codemirror (1.0) | plg_editors_tinymce (3.5.6) | plg_editors-xtd_article (3.0.0) | plg_editors-xtd_image (3.0.0) | plg_editors-xtd_pagebreak (3.0.0) | plg_editors-xtd_readmore (3.0.0) | plg_extension_joomla (3.0.0) | plg_finder_categories (3.0.0) | plg_finder_contacts (3.0.0) | plg_finder_content (3.0.0) | plg_finder_newsfeeds (3.0.0) | plg_finder_weblinks (3.0.0) | plg_quickicon_extensionupdate (3.0.0) | plg_quickicon_joomlaupdate (3.0.0) | plg_search_categories (3.0.0) | plg_search_contacts (3.0.0) | plg_search_content (3.0.0) | plg_search_newsfeeds (3.0.0) | plg_search_weblinks (3.0.0) | plg_system_cache (3.0.0) | plg_system_debug (3.0.0) | plg_system_highlight (3.0.0) | plg_system_languagecode (3.0.0) | plg_system_languagefilter (3.0.0) | plg_system_log (3.0.0) | plg_system_logout (3.0.0) | plg_system_p3p (3.0.0) | plg_system_redirect (3.0.0) | plg_system_remember (3.0.0) | plg_system_sef (3.0.0) | plg_user_contactcreator (3.0.0) | plg_user_joomla (3.0.0) | plg_user_profile (3.0.0) |
Templates Discovered :: wrote:Templates :: SITE :: beez3 (3.0.0) | protostar (1.0) |
Templates :: ADMIN :: hathor (3.0.0) | isis (1.0) |
You do not have the required permissions to view the files attached to this post.


Locked

Return to “Installation Joomla! 3.x”