Installing Joomla! With XAMPP

62 篇文章 0 订阅


My First Try


The first time I install Joomla! into my notebook, with Window XP. I was using XAMPP for server functionality, and the profile as:


###### ApacheFriends XAMPP (Basispaket) version 1.7.4 ######

  + Apache 2.2.17
  + MySQL 5.5.8 (Community Server)
  + PHP 5.3.5 (VC6 X86 32bit) + PEAR 
  + XAMPP Control Version 2.5 from www.nat32.com
  + XAMPP Security
  + SQLite 2.8.15
  + OpenSSL 0.9.8o
  + phpMyAdmin 3.3.9
  + ADOdb 5.11
  + Mercury Mail Transport System v4.62
  + FileZilla FTP Server 0.9.37
  + Webalizer 2.01-10
  + Zend Optimizer 3.3.0 
  + Perl 5.10.1
  + Mod_perl 2.0.4
  + Tomcat 7.0.3 

--------------------------------------------------------------- 


Duaring the installation process, when I clicked 'Import Sample Data', I got a popup window saying: 

Error: the XML response that was returned from the server is invalid.


I searched and got one solution on that, but it didn't work for my case.

My Second Try


I just removed the database, and whole web folder, and do that again from zero. I still can't install sample data, just with the same error prompt. But I remember that I follow one solution inthis thread on Jommla! forum:


I got the same error on two installations last week, one on my local test server and one on the live server.

Thought I would try and replicate the error today while I had some time to look into it but murphy's law applied and it didn't happen!

Only different thing I done was start the install and when the choose language page appeared, uploaded a blank configuration.php file to the root and chmod to 777

Clicked on next to the pre-installation check with everything showing green but then deleted the blank configuration.php file from root (previous install when I got the error, I let it there) and it let me proceed to the end with a normal install and the installer wrote a new configuration.php file.

Edit: Just as an after thought I wonder if it would work if you didn't have a writeable configuration.php file there from the start and ignored the warning in the pre-installation check. As long as the installation folder was writeable, then the installer should create a config file.

Then I rename the installation fold's name to silent it. And go to web browser to view the joomla home page, I got massive errores:


Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\Joomla\libraries\joomla\import.php on line 29

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\Joomla\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\Joomla\libraries\joomla\import.php on line 32

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\Joomla\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\Joomla\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\Joomla\libraries\loader.php on line 138

Strict Standards: Non-static method JRequest::clean() should not be called statically in C:\xampp\htdocs\Joomla\libraries\joomla\import.php on line 33

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\Joomla\libraries\joomla\environment\request.php on line 463

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\Joomla\libraries\joomla\environment\request.php on line 464

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\Joomla\libraries\joomla\environment\request.php on line 465

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\Joomla\libraries\joomla\environment\request.php on line 466

.......

and so on

that is really distrubing, follow the solution posted here:


You have "Strict Standards: Non-static method" errors, this is because of the error reporting settings in your Xampp php.ini file. In the php.ini file make these changes and then restart Apache;

error_reporting = E_ALL & ~E_NOTICE

display_errors = Off

then, restart Apache. Got new error:


JError Unable to load Database Driver:

After looking at the configuration.php I discovered that for some reasone the Database settings were left completely blank, so I filled them in:

/* Database Settings */
var $dbtype = 'mysql'; 
var $host = 'localhost';
var $user = 'joomlaadmin';
var $password = 'joomla!';
var $db = 'joomladatabase';
var $dbprefix = 'jos_';

and it works finally...


But not finished yet, I could not log in as admin, check the doc about that: by inspecting the data table, the table of users was empty, so executed the sql  query provided in the page:


INSERT INTO `jos_users`
   (`id`, `name`, `username`, `password`, `usertype`, `gid`, `params`)
VALUES (LAST_INSERT_ID(), 'Administrator2', 'admin2',
    'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199',
    'Super Administrator', 25, '');
INSERT INTO `jos_core_acl_aro`
VALUES (NULL, 'users', LAST_INSERT_ID(), 0, 'Administrator2', 0);
INSERT INTO `jos_core_acl_groups_aro_map`
VALUES (25, '', LAST_INSERT_ID());

And then I can log in with user admin and password secret.



joomla-default



My Third Try


This try was just to clearify something of how Joomla! works. And I install it on my desktop pc, which running WinXP, but Apache PHP and MySQL were installed seperately, the info:


PHP: 5.2.6

Apache: 2.2.11

MySQL: 5.1


Since I have no phpMyAdmin installed, I have to use MySQL Workbench to to database job: creating database, and creating user and granting privileges to the user. And I found that:


  1. the configuration.php was created juring installation, what is why the strings are replaced in right language;

 

And miraclely, installation of sample data went successfully! The whole installation just went smoothly.



Using phpMyAdmin to learn SQL statement:


Some times, that is a good method to learn some complex SQL query's syntax, and the motive for that is I found the GUI MySQL admin tool(MySQL Workbench) provided by Oracle can't manage database users. The installation instruction of Joomla!(as well as Wordpress) tells that to create a decidated database and a user with all privileges on that database for preparation, and they all demostrate the process in phpMyAdmin:


privilege


and in the next panel:


creating-user


please note that the option 'Grant all privileges on database "wordpress"' is selected.


ctrateuser-sql


So, we got the SQL for creating user and granting privileges:


CREATE USER 'wordpress'@'localhost' IDENTIFIED BY '***'; 
   
GRANT USAGE ON * . * TO 'wordpress'@'localhost' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; 
   
GRANT ALL PRIVILEGES ON `wordpress` . * TO 'wordpress'@'localhost';

But if you just paste it into MySQL Workbench and execute it, it will fail with errors. By checking the syntax on MySQL document:

12.4.1.1. CREATE USER Syntax
12.4.1.3. GRANT Syntax

The correct writing should be:


CREATE USER 'joomlaadmin'@'localhost' IDENTIFIED BY 'joomla!'; 

GRANT USAGE ON *.* TO 'joomlaadmin'@'localhost' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

GRANT ALL PRIVILEGES ON joomladatabase.* TO 'joomlaadmin'@'localhost';

The quoated string following 'IDENTIFIED BY' is password.


















  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值