As I wrote in the previous post, the problem with defining the base_url variable is quite annoying. Specifically, this variable takes care of creating the path to the links, the action in the forms, redirects and so on and if it is not the last CI does not work correctly 🙂 It works but does some crazy things with urls 🙂 The solution as always is simple ( it appeared for me shortly before I decided to write it myself) 😀

$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);

This piece of code replaces base_url in the configuration file. Works as seen for both http and https. It only takes the folder in which the platform is located like this, that no intervention is needed on our part.

My life as a programmer has changed dramatically – I reached for those fruits that I had always disliked – ready framework for project coding, the reasons are purely mine why he doesn't like them. But I was left without a choice and turned to friends with experience in the field and they directed me to CodeIgniter I basically reviewed what he was talking about – I liked it. Apart from the fact that I read quite good reviews, so there was no point in avoiding the inevitable. Today I started writing with the platform and found out 2 very unpleasant things

  1. Error reporting is only for file logs and the platform does not spit errors directly on the page – only one white page appears and you wonder what is happening. Insanely inconvenient Even after manual adjustment in php.ini things remained in favor of CI. The solution to the problem is to add an external helper Err Helper – the man explained how to sail this miracle. After I put it on, everything fell into place.
  2. In the configuration file of the platform there is a variable base_url in which the main URL is described so that the platform can complete links, redirects and any other URLs. – overall the idea is good but if the site is more than 1 domain what we do 😀 There are quite a few solutions to the problem. I will probably check with a series of ifs which domain my request comes from before I find the variable 🙂 ,because it does not want to accept a value of $ _SERVER[PHP_SELF] again a crazy decision

Excluding my two remarks, I like CI, it's easy to run a server, even an inexperienced 9th grader will do it and not like Zend Framework to ask for hours of tuning 🙂 let's see if we will hold hands or become a part of the past 🙂

Today my phpmyadmin screamed for no apparent reason with the following gross error

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

Generally the problem is the elementary variable path in the php.ini file was worthless. The mystique was unleashed when I remembered that I upgraded my php version and then I probably inadvertently reduced the old settings, and today I restarted the server, that he had started filling the swap because of a zombie 🙂

Поради малките проблеми с базата данни беше избягал и тоя ми пост 🙂

А гледма вече имах потърсвания в google за gdm3 autologin та си викам я да го възтановя 🙂

Като цяло решението е елементарно променя се фаила /etc/gdm3/daemon.conf като в часта daemon се добавя следното съдържание


Първият ред разрешава автоматичния вход в системата втория ред описва с кои потребител ще се извършва. 🙂