Session error - new installation

6 posts by 2 authors in: Forums > CMS Builder
Last Post: May 24, 2019   (RSS)

By zip222 - May 17, 2019

Having trouble with a new installation. Initially I was getting Internal Server Errors when I tried to load the install page. I was able to get past that by removing the php.ini file, but that only got me a little bit further. Now I am getting "Warning: session_start(): ... " messages. Not sure how to resolve this. Any suggestions?

By gregThomas - May 17, 2019

Hey Zip,

Please, could you post the full session start_error message that's being displayed. Also, which version of CMS Builder are you attempting to install?

Regarding the issue with your PHP ini file, which internal server error message is displayed when it's present? I'd recommend adding it back to the CMS and contacting your hosting service and ask them what's causing the issue.

Greg Thomas







PHP Programmer - interactivetools.com

By gregThomas - May 22, 2019

Hey Zip,

Assuming this is a fresh installation of CMS Builder and you're not restoring a previous site, it looks like the issue is that the default directory session data is stored in doesn't exist or PHP doesn't have permission to access it, this is an issue that your hosting company will need to resolve. I'd recommend creating a test script on your server and adding the following code to it:

<?php

//Ensure that all errors are displayed
error_reporting(E_ALL);
ini_set('display_errors', 1);

//Attempt to start a session
session_start();

//Add variables to the session
$_SESSION["foo"] = "bar";


echo 'Script Complete';

Then run the script through your browser and see if the same session error is displayed. If the same error is returned, contact your hosting company's support and include a link to this script and ask them to update the directory sessions are stored in. If 'script complete' is returned, then please send a second level support request to us so I can take a more detailed look at the issue.

Greg Thomas







PHP Programmer - interactivetools.com

By zip222 - May 22, 2019

it displayed a slightly different error, and it also showed the Script complete message. Just submitted the second level support request.

By gregThomas - May 24, 2019

Hey Everyone, 

I thought I'd follow up with the solution Zip222 used to resolve this issue. He updated his CMS Builder settings.dat.php file and added a custom path to store the session data. Here is an example of how you'd do that:

'advanced' => array(
    'imageResizeQuality' => '80',
    'showExpandedMenu' => '0',
    'disableFlashUploader' => '0',
    'codeGeneratorExpertMode' => '0',
    'hideLanguageSettings' => '0',
    'session_cookie_domain' => '',
    'session_save_path' => '/path/to/session/directory/',
    'requireHTTPS' => '0',
    'httpProxyServer' => '',
    'allowRelatedRecordsDragSorting' => '0',
    'outgoingMail' => 'logOnly',

So you'd replace the session_save_path variable '/path/to/session/directory/' with the full directory path to the location you want to store the session data on your web server. You should add the directory to store the session data outside of your public web directory if possible. If it has to be inside of your public web directory, add a .htaccess that denies all requests to it and ensure it has a name that could not be guessed.

Thanks,

Greg

Greg Thomas







PHP Programmer - interactivetools.com