User Login    
 + Register
  • Main navigation
Login
Username:

Password:


Lost Password?

Register now!
Documentation
Who's Online
122 user(s) are online (6 user(s) are browsing XoopsWiki)

Members: 6
Guests: 116

bonsig, raymia, damaster, korafa, urbanspacema, lr130cc, more...
[Main Page]

Dev:Shared Xoops for Multiple User

From XOOPS Project

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy
Category: Development

Let's say that you have uploaded all xoops files to /var/html/www, and want all other users to share these files.

First, for each of the virtual domains, create mainfile.php in which following constants are defined: XOOPS_CACHE_PATH, XOOPS_UPLOAD_PATH, XOOPS_THEME_PATH", XOOPS_COMPILE_PATH, XOOPS_THEME_URL, XOOPS_UPLOAD_URL

For example, mainfile.php of 'hogehoge' user will be something like below:

    define("XOOPS_CACHE_PATH", "/home/hogehoge/xoops/cache");
    define("XOOPS_UPLOAD_PATH", "/home/hogehoge/public_html/uploads");
    define("XOOPS_THEME_PATH", "/home/hogehoge/public_html/themes");
    define("XOOPS_COMPILE_PATH", "/home/hogehoge/xoops/templates_c");
    define("XOOPS_URL", "http://www.hogehoge.com/xoops");
    define("XOOPS_THEME_URL", "http://www.hogehoge.com/themes");
    define("XOOPS_UPLOAD_URL", "http://www.hogehoge.com/uploads");
    define('XOOPS_DB_PREFIX', 'xoops');
    define('XOOPS_DB_USER', 'hogehoge_xoops');
    define('XOOPS_DB_PASS', 'hogehoge');
    define('XOOPS_DB_NAME', 'hogehoge_xoops');

and the directory structure of the user will be like below:

   /home/hogehoge/xoops/mainfile.php
   /home/hogehoge/xoops/cache/ (chmod 777)
   /home/hogehoge/xoops/templates_c/ (chmod 777)
   /home/hogehoge/public_html/uploads/ (chmod 777)
   /home/hogehoge/public_html/themes/

Next, create symlink between the user directory and the directory where xoops core files are uploaded

ln -s /var/html/www /home/homehome/public_html/xoops

The final step is to modify the /var/html/www/mainfile.php file so that it will read mainfile.php placed under the user directory. If you are running Apache you can use $_SERVER['DOCUMENT_ROOT'] to get the directory of the user.


Back to Main Page

Retrieved from "http://www.xoops.org/modules/mediawiki/index.php/Dev:Shared_Xoops_for_Multiple_User"

This page has been accessed 400 times. This page was last modified 17:18, 15 December 2007. Content is available under XOOPS Project.


Local Support Sites
Powered by
XOOPS Code hosted on SourceForge

Powered by PHP



Powered by MySQL

Powered by Smarty

OSI certified

All content on this site is subject to the Creative Commons License
Developers for Hire