How to install XenForo locally to your PC using XAMPP

How to install XenForo locally to your PC using XAMPP

Ranger375

Well-known member
#61
How do you install an addon while in local mode? Where do the files have to be located? I tried putting them in the xenforo folder in my C:// but it didnt fly...
 

arms

Active member
#65
If developing on localhost (windows) watch out for case.

I'd had referenced Xenforo in my files but Folder was XenForo.

Took me 2 hours to work out why my extended classes were not being found when I installed this on live Linux webserver.

:oops:
 
Last edited:

ibaker

Well-known member
#66
When I am trying to import a backup into xampp I get a script time out error as the import file is very large like 600mb. To fix this I did this:

By default, phpMyAdmin set script execution timeout value to 300. You can change this value to any higher value you want, change it to 0 will tell phpMyAdmin to disable script timeout.

To change the value, do these steps:

1. Open file \phpmyadmin\libraries\config.default.php

2. Change the variable

$cfg['ExecTimeLimit'] = 300;

to

$cfg['ExecTimeLimit'] = 0;

Hope this helps anyone with a large XF database
 

Ludachris

Well-known member
#67
Trying to get a copy of XF set up on my local machine using this guide. I have everything all set up just as it is on the server and am using a "clean" copy of the db that I had used for the vB3 import, the base copy that I was able to use for test imports. It's installed in the root directory just like the live server. When I access http://localhost in a browser I get this error:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\library\Zend\Cache.php on line 29

What should I do for this?
 

Brogan

XenForo moderator
Staff member
#68
As it states in the resource:
Increasing Limits
You may need to increase some of the php or SQL limits, depending on the size and configuration of the database you are importing.
You can do that by editing the php.ini file as follows:
memory_limit = 512M
post_max_size = 512M
upload_max_filesize = 512M

Also, the my.ini file as follows:
[mysqld]
max_allowed_packet = 512M
[mysqldump]
max_allowed_packet = 512M
Other settings may need to be changed, in your case the max execution time.
 

Ludachris

Well-known member
#70
As it states in the resource:


Other settings may need to be changed, in your case the max execution time.
I increased the max execution time and now get this error, which is strange since I don't have caching set up on the live server:

HTML:
An exception occurred: cache_dir must be a directory in C:\xampp\htdocs\library\Zend\Cache.php on line 209

[*]Zend_Cache::throwException() in Zend/Cache/Backend/File.php at line 154
[*]Zend_Cache_Backend_File->setCacheDir() in Zend/Cache/Backend/File.php at line 121
[*]Zend_Cache_Backend_File->__construct() in Zend/Cache.php at line 153
[*]Zend_Cache::_makeBackend() in Zend/Cache.php at line 94
[*]Zend_Cache::factory() in XenCentral/Framework/Model/Cache.php at line 46
[*]XenCentral_Framework_Model_Cache->__construct() in XenForo/Model.php at line 195
[*]XenForo_Model::create() in XenCentral/Framework/Hooks.php at line 226
[*]XenCentral_Framework_Hooks::_getModel() in XenCentral/Framework/Hooks.php at line 203
[*]XenCentral_Framework_Hooks::_getCacheModel() in XenCentral/Framework/Hooks.php at line 133
[*]XenCentral_Framework_Hooks::getProductCopyright() in XenCentral/Trade/Hooks.php at line 332
[*]XenCentral_Trade_Hooks::executeTemplateHooks()
[*]call_user_func_array() in XenForo/CodeEvent.php at line 58
[*]XenForo_CodeEvent::fire() in XenForo/Template/Abstract.php at line 285
[*]XenForo_Template_Abstract->callTemplateHook() in XenForo/Template/Abstract.php(265) : eval()'d code at line 6491
[*]eval() in XenForo/Template/Abstract.php at line 265
[*]XenForo_Template_Abstract->_renderInternal() in XenForo/Template/Abstract.php at line 191
[*]XenForo_Template_Abstract->render() in XenForo/Template/Public.php at line 110
[*]XenForo_Template_Public->render() in XenForo/ViewRenderer/HtmlPublic.php at line 139
[*]XenForo_ViewRenderer_HtmlPublic->renderContainer() in XenForo/FrontController.php at line 614
[*]XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
[*]XenForo_FrontController->run() in C:/xampp/htdocs/index.php at line 13
[*]
 

Brogan

XenForo moderator
Staff member
#72
Try replacing null with an actual path in Zend/Cache/Backend/File.php for the cache directory.


PHP:
    protected $_options = array(
        'cache_dir' => path/to/cache/dir,
        'file_locking' => true,
        'read_control' => true,
        'read_control_type' => 'crc32',
        'hashed_directory_level' => 0,
        'hashed_directory_umask' => 0700,
        'file_name_prefix' => 'zend_cache',
        'cache_file_umask' => 0600,
        'metadatas_array_max_size' => 100
    );
 

Mian Shahid

Well-known member
#73
@Brogan! Such a nice and handy little guide for even peoples who have no great knowledge of these things, like me :)

1. How can i import data from my live site.

2. Any advise for below message found in phpMyAdmin
2014-08-27_194847.gif
 

51463

Well-known member
#74
Can someone tell me how they are importing the database?

I have a 2GB database i want to import. I am trying to do it via the Xampp Shell. But i keep getting these errors depending on which command i put in.

Access is denied
or
Error 1044 <42000>: Access denied for user ''@'localhost'to database 'xentest'
or
Error 1045 <28000>: Access denied for user ''@'localhost' <using password:NO>


Does anyone know exactly the right command for Shell? I've tried 3 things:

C:\xampp\mysql\bin>mysql -u root -p xentest < C:/xampp/htdocs/forum_xenforo_13.09.14.sql

mysql -h localhost -u root xentest < C:/xampp/htdocs/forum_xenforo_13.09.14.sql

C:\xampp\mysql\bin>mysql -u root -p xentest < C:/xampp/htdocs/forum_xenforo_13.09.14.sql



I'm not sure what i'm doing wrong. But i can't import anything.

database name: xentest
username: root
data trying to import: forum_xenforo_13.09.14.sql
 

51463

Well-known member
#75
I figured it out. This one worked for me.

mysql -h localhost -u root xentest < C:/xampp/htdocs/forum_xenforo_13.09.14.sql

after that it asked me for a password. I put it in and it started to work.


I am having another problem. How long does it usually take to upload? It's been almost an hour.

I checked inside phpmyadmin during the past hour and i could see the tables importing more and more. But now it's either stuck or still working on:

xf_post

I checked my live phpmyadmin and there is alot of tables still missing.

I haven't seen any new tables. How do i know when it's done?
 

51463

Well-known member
#76
wow it worked! I didn't touch it for 2 or 3 hours and i finally have a working copy of my forum running on xampp.

And Shell let me know it finished by writing:

mine@Desktop c:\xampp
#


Congrats to me
 

Brogan

XenForo moderator
Staff member
#78
Looks like there's something wrong with your installation.

It should look like this:
upload_2015-4-23_14-34-4.png

You may want to post on the xampp forum for help.
 

Deceptive

Active member
#80
Okay, I finally got the security part to display properly.

What value do I need to change for the debug part to last?
I mean, I enable debug mode, make a style property, then when I go to the index and click on a link my site will crash. I know it has something to do with debug mode.
 
Top