This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

500 error at sentora main account
#1
500 error at sentora main account
Hi there.

At Sentora i found a new error, maybe you guys can help me since i made a new project to run on my server, and installed Sentora it's up and running and i am ok with it, also my clients, all works just fine, but... I found a problem, i made a installation of cms i build and its so light that does not require any kind of mysql and works just fine. By the time i place it online, i get a 500 error on this cms.

Now it works on the frontend like a charm, some issues but it manages to work, the main problem comes when i go to the domain.com/admin, now that's the same cms i already installed in many of my other domains also in the same server and had no issues, at this one and let me remind you all, its the main account of the server, so it's the zadmin account.

So i checked the Log's and here is something funny i found. For some reason the system is cutting the access to my admin at my website and this is what i got from the log:

PHP Code:
PHP Fatal error: require_once(/var/sentora/hostdata/z/public_html/domain_com/engine/_init.php 

Well that's why i cannot get the index.php file of my system. Now, as you notice i got /hostdata/z/public_html/ like what? it's kinda like admin is gone, should be zadmin...

It seems the path is deleted somehow. Can anyone help me?
'' Life is full of important choices ''
Help Sentora Donate now => http://sentora.org/donate Blush
Reply
Thanks given by:
#2
RE: 500 error at sentora main account
did you create an account named z? This looks strange.

Did you move a directory? Could check command line history.
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#3
RE: 500 error at sentora main account
PHP Code:
PHP Fatal error: require_once(/var/sentora/hostdata/z/public_html/domain_com/engine/_init.php 
This is an issue in the script's coding. PHP can NOT include/require a file from the file system base, only the hosted root folder. Therefore, the require_once line should be like:

PHP Code:
require_once('engine/_init.php'); 

As for the zadmin folder being called 'z' it appears your script is removing 'admin' from the code probably by using a regex like
Code:
str_replace("#admin#", "");
or something.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#4
RE: 500 error at sentora main account
Hi guys thank you so much for helping out with this. Well Me.B I did not change files directory names, seams that my script is doing that.

Let me show you guys something. This is my _init.php file i believe that i can make something here to get this working like a full path replacing the ROOT by another code. i want you all to take a look.

PHP Code:
<?php defined('CMS_ACCESS') or die('No direct script access.');

if (
version_compare(PHP_VERSION"5.3.0""<")) {
    exit("System requires PHP 5.3.0 or greater.");
}

/** Include Engine */
include ROOT DS .'engine'DS .'MyCMS.php';

MyCMS::$environment MyCMS::PRODUCTION;

if (
MyCMS::$environment == MyCMS::PRODUCTION) {
    error_reporting(0); 
} else {
    error_reporting(-1);
}

MyCMS::init(); 

TGates, yes i must agree. Also there i found another file that indeed comes with that:

PHP Code:
public static function parseVariables($frontend_buffer)
    {
        return str_replace(array('@site_url',
                                 '@theme_site_url',
                                 '@theme_admin_url'),
                           array(Option::get('siteurl'),
                                 Option::get('siteurl').'/public/themes/'.Option::get('theme_site_name'),
                                 Option::get('siteurl').'/admin/themes/'.Option::get('theme_admin_name')),
                           $frontend_buffer);
    

When i go to my website as domain.com/admin i get the 500 Error. On frontview it works but does not make the connection with some items from the system such as images locations (some), icons (fontawsome).

PHP Code:
$site_url  Option::get('siteurl');


// Edit settings
            // -------------------------------------
            if (Request::post('edit_settings')) {

                if (Security::check(Request::post('csrf'))) {

                    // Add trailing slashes
                    $_site_url Request::post('system_url');

                    Option::update(array('sitename'          => Request::post('site_name'),
                                       'keywords'            => Request::post('site_keywords'),
                                       'description'         => Request::post('site_description'),
                                       'slogan'              => Request::post('site_slogan'),
                                       'defaultpage'         => Request::post('site_default_page'),
                                       'siteurl'             => $_site_url,
                                       'timezone'            => Request::post('system_timezone'),
                                       'system_email'        => Request::post('system_email'),
                                       'language'            => Request::post('system_language'),
                                       'maintenance_message' => Request::post('site_maintenance_message')));

                    Notification::set('success'__('Your changes have been saved.''system'));
                    Request::redirect('index.php?id=system');

                } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
            }

            // Its mean that you can add your own actions for this plugin
            Action::run('admin_system_extra_actions');

            // Display view
            View::factory('box/system/views/backend/index')
                    ->assign('pages_array'$pages_array)
                    ->assign('languages_array'$languages_array)
                    ->display();

        } else {

            Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id'));
        


Can anyone help me? I am kinda blank on ideas here, Thanks in advance.
'' Life is full of important choices ''
Help Sentora Donate now => http://sentora.org/donate Blush
Reply
Thanks given by:
#5
RE: 500 error at sentora main account
The _init.php file is not causing it since it is not even being loaded. It is something before that file removing the admin from the path.

This is not appearing to be a Sentora issue but a script issue. They had no suggestions how to sort this out?

[Moving to proper forum section]
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Can anyone suggest best Sentora alternative servermaster 1 1 ,342 12-22-2023, 10:41 AM
Last Post: TGates
Sentora 2.0 Beta Ron-e 6 14 ,580 01-01-2022, 11:56 AM
Last Post: TGates
Can not access Sentora ThomasMoss 4 8 ,194 01-01-2022, 10:41 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 1 Guest(s)