Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean installation problem #1402

Open
spagu opened this issue Sep 27, 2016 · 1 comment
Open

Clean installation problem #1402

spagu opened this issue Sep 27, 2016 · 1 comment

Comments

@spagu
Copy link

spagu commented Sep 27, 2016

DBALException: An exception occurred while executing 'INSERT INTO Versions (ver_name, ver_value) VALUES ("last_db_version", ?) ON DUPLICATE KEY UPDATE ver_value = ?' with params ["4.4.x", "4.4.x"]:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'scoop.versions' doesn't exist

this is what I get during a installation process, manual or web

@lilalkor
Copy link

lilalkor commented Mar 2, 2017

I can confirm that issue. All database scheme is not created. Imported install/Resources/sql/campsite_core.sql as workaround.
Also it needs acess to /tmp during crontab test, while it is usually restricted by open_basedir.

Also if you have open_basedir set, when CMS looks for php binary, it ignores $PATH and uses open_basedir only. So if you have i.e. '/var/www:/tmp:.' in open_basedir (quite permissive one) it will look for /var/www/php, /tmp/php, ./php and then throws error, telling you to add php to $PATH. It even does not check $PATH in that case!
Lines from vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php

        if (ini_get('open_basedir')) {
            $searchPath = explode(PATH_SEPARATOR, ini_get('open_basedir'));
            $dirs = array();
            foreach ($searchPath as $path) {
                if (is_dir($path)) {
                    $dirs[] = $path;
                } else {
                    if (basename($path) == $name && is_executable($path)) {
                        return $path;
                    }
                }
            }
        } else {
            $dirs = array_merge(
                explode(PATH_SEPARATOR, getenv('PATH') ?: getenv('Path')),
                $extraDirs
            );
        }

open_basedir allows any nested directories, and you are checking only /path/php ones.
The right way to handle that is to check $PATH. That is the variable that tells you where to search for binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants