Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8954229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:16:28+00:00 2026-06-15T14:16:28+00:00

I am developing a stand-alone application, which uses drupal functions and I faced with

  • 0

I am developing a stand-alone application, which uses drupal functions and I faced with some troubles. First of all my application must check has the user access to this application and if he doesn’t have permissions show error message. If user is logged on and has permissions my application must show him some actions… First of all I created subdomain in Apache, for example I named it:
myapps.site.com. The trouble is: when unauthorized user entered this address, main page of site.com is loaded (only text without pictures), not my page with error message, but when he printed myapps.site.com/index.php everything is OK and error message loads. When authorized user enters this page everything is OK. I have checked, that the problem is with

drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

Here is my sample of code:

<?php
chdir('/www/mysite/');
require_once './includes/bootstrap.inc';
require_once './includes/form.inc';
// Here is problem
 // if I comment this and show only err message  everything is also OK
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
global $user;
// Here I am loading additional info to check if the user has access
profile_load_profile(&$user);
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="styles/styles.css" />
<script src="jscripts/jQuery.js"></script>
<title>app</title>
</head>
<body>';
//  here i check user priviliges
if (!$user->uid || $user->profile_is_priviliged == FALSE )
{
   echo 'some err msg';
}
else
{
    echo 'some actions';        
}
echo '</body></html>'; ?>

As I have understood the problem also may rise because of that this is subdomain and basic path in settings.php is site.com and by default drupal_bootstrap loads content of main page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:16:29+00:00Added an answer on June 15, 2026 at 2:16 pm

    Use http://drupal.org/project/domain for this kind of thing, don’t code it yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a stand-alone java application which uses eclipselink. It is all fine
I am developing a stand-alone java application which gathers data from around 1000 measuring
When developing a stand alone application for windows, what type of application should i
Currently I am on a team developing a new stand alone application in C#.
I'm developing a simple, stand-alone, command line Java application. The project is managed by
I am developing a C# a stand alone single user desktop application that requires
We are developing Stand alone application in .net compact framework 2.0 targeting windows ce
I am developing application as stand alone single system till now . Now i
I use joomla to manage a website... and i am developing a stand alone
Hai I am developing a standalone application using Java in which I am using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.