Hello everyone!) I am developing a web script in PHP, for sale.

I want to give customers access to the project in gitlabe and I do not know which license to choose.

Tell me, is there a license prohibiting the resale and distribution of software to other people?

  • one
    Why not just write? You are not obliged to choose a ready license - you can write anything that is not against the law. If you are not sure about the legislation, add a clause of the form “if it is not against the law”. Better yet, consult a lawyer. - KoVadim
  • Thank you, did not know. I'm in this business "lamer") - user217084
  • one
    And I'm for open source software. And there are enough cats in a bag with terrible code. PS is not about your code. Speech is now generally in commercial development - Naumov
  • @Naumov, Some developers need at least some money) It’s another thing if they gather up the N-th sum of money ... end. - user217084
  • @KobaltMR you can support open-project projects for money, i.e. you have an open source project, there are people who like everything and the code and its work, but they would like more, they turn to you for support saying that we will pay you here so much then you implement ... Here’s a scheme , and there is no one to buy a script somewhere ... - Naumov

2 answers 2

The choice of license depends on the country of distribution.

Most international licenses in the Russian Federation are not legally binding. They try to stick to them mainly out of respect for the developers and the possibility of entering the international market.

Therefore, to choose, you need to know which country will be distributed. And in any case, the license will be commercial.

It is advisable for each country to consult with "local" lawyers. When there is no money for lawyers, they take a product close in structure and rework its contract.

    https://gitlab.com/WhileTeam/MinePanel/blob/master/classes/database.class.php global variables are evil, you need to get rid of them better config the config directly in the constructor.

    if ((!isset($session[0]) or !isset($session[1])) or (empty($session[0]) or empty($session[1]))) { $this->is_auth = false; unset($_SESSION['auth']); return; } 

    Does this construction work at all? by the way there is a difference between or and || . Plus empty is a synonym !isset && is_null() i.e. isset superfluous here.

    global $db; global again

     <?php $mpage['title'] = 'Главная страница'; $users_count = $db->fetch("SELECT COUNT(`id`) FROM `mpk_users`")['COUNT(`id`)']; $last_version = '1.0'; ob_start(); include_once STYLE . '/pages/main.html'; $mpage['content'] = ob_get_clean(); 

    $db not clear from where it appeared. There is no documentation at all.

     if (isset($_GET['login']) && $_SERVER['REQUEST_METHOD'] == 'POST') { $login = @$_POST['login']; // нельзя так $passw = @$_POST['password']; if (empty($login) or empty($passw)) { alert('Введите логин/пароль!', 0, 0, 0); } $passw = md5(md5($passw)); $userRow = $db->fetch("SELECT * FROM `mpk_users` WHERE `login` = '{$login}'"); // sql inj уязвимость 

    here @ definitely nothing: if (empty(@$userRow['login'])){

      if ($userRow['password'] != $passw) { alert('Неверный логин/пароль!', 0, 0, 0); } 

    This query is decided at the sampling stage.

    exit(header('Location: index.php')); - well, and why is exit() location going to another page anyway.

    • system.php is connected to index.php and there is already a config, a class with a database, and other classes. Classes are initialized. Then the page loads in the index and there will be no problems with $ db and $ user variables, - user217084