PDA

View Full Version : Page no vbulletin


THE_MAD2
04-11-2009, 06:04 AM
Hello, here I have a problem with a non-vBulletin page, I want it assigned the rights of the forum, but when I connect it works and when I do not connect it gives me an error

Unable to add cookies, header already sent.
File: /home/una/domains/unattended-news.com/public_html/test.php
Line: 1

My code :

<?php
//--------------------------------------------------------
// Unattended-News
// ? 2005 - 2009, Unattended-News - THE_MAD2. Tous droits r?serv?s.
// Version 1.0
//--------------------------------------------------------

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'resetkey');
define('CWD','./forum');

// #################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array();

// ########################## REQUIRE BACK-END ############################
require_once('./forum/global.php');
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!$vbulletin->userinfo['userid'])
{
echo 'DSL, mais pas connecter';
}

// ################################################## ######################
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
echo'connecter';

?>

Thank

Dismounted
04-11-2009, 06:35 AM
Make sure there is no white-space before "<?php". The PHP interpreter indicates there is.

THE_MAD2
04-11-2009, 07:19 AM
no space

Dismounted
04-11-2009, 11:52 AM
Open the file in a program like Notepad (and not other editors); also post the file as an upload.

THE_MAD2
04-11-2009, 02:49 PM
I use to encode Notpad more and I no spaces

--------------- Added 1239518026 at 1239518026 ---------------

When I try in the forum by removing "define ( 'CWD','./ forum');" walk its impeccable, but when I move the file with the above code, its not