souceforge 项目网站上的 Silverstripe

发布于 2024-07-26 08:28:02 字数 263 浏览 8 评论 0原文

如何在 Sourceforge 上为项目安装 silverstripe。 我知道我需要一个同步链接...但我不知道该怎么做?

我有一个只读的 htdocs 文件夹(一旦在服务器上),我可以通过 sftp 访问该文件夹
它可以通过 url 访问

我有一个可以通过 sftp 访问的持久文件夹(一旦在服务器上) 无法通过 url 访问

我有一个 mysql 凭据,在安装过程中已接受,但由于没有正确的访问权限而无法完成

how do I install silverstripe on sourceforge for a project. I know I need a synlink...but I don't know how to?

I have a htdocs folder that is read only (once on the server) that I can access via sftp
it is accsesable via url

I have a persistent folder that is rightable (once on the server) that I can access via sftp
it is not accsesable via url

I have a mysql credentials that are accseped during install but can't be finished because of no right accsess

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神爱温柔 2024-08-02 08:28:02

那么您正尝试在 sourceforge 上安装 SilverStripe 吗? 哦,那好吧。

我想您需要检查您使用的 MySQL 用户是否具有数据库的写访问权限。 另外,您在安装过程中获得了正确的数据库名称:如果没有,安装程序将尝试创建该数据库,如果您没有必要的权限(通常是共享主机设置的情况),您会收到一个错误,抱怨 CREATE DATABASE 语句。

So you're trying to install SilverStripe on sourceforge? Well, okay.

I guess you need to check that the MySQL user you're using has write access to the database. Also, that you got the database name right in the installation process: if you didn't, the installer will try to create that database, and if you don't have the necessary permission (usually the case on shared hosting setups), you'll get an error complaining about the CREATE DATABASE statement.

蓝礼 2024-08-02 08:28:02

那么我的理解是否正确,您的问题是您可以上传SilverStripe,但无法安装它,因为安装程序想要写入配置文件?

好吧,在这种情况下,实际上有一种方法可以在不使用安装程序的情况下运行 SilverStripe。 只需将数据库信息输入到 mysite/_config.php 文件中即可。
它应该看起来像这样:

    <?php

    global $project;
    $project = 'mysite';

    global $databaseConfig;
    $databaseConfig = array(
            "type" => 'MySQLDatabase',
            "server" => 'localhost',
            "username" => 'myuser',
            "password" => 'mypass',
            "database" => 'mydatabasename',
            "path" => '',
    );

    MySQLDatabase::set_connection_charset('utf8');

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.org/themes/
    SSViewer::set_theme('blackcandy');

    // Set the site locale
    i18n::set_locale('en_US');

    // enable nested URLs for this site (e.g. page/sub-page/)
    SiteTree::enable_nested_urls();

    Director::set_environment_type('dev');
    // Director::set_environment_type('live');

请注意,SilverStripe 默认情况下需要对 asset/ 文件夹具有写入权限,不仅用于上传文件,如果环境类型设置为 live,它还需要它来保存 CSS 文件,因为 SilverStripe 想要获取所有JS和CSS文件,将它们合并为1个JS和1个CSS文件,并将它们保存到assets/文件夹中。
如果这是不可能的,管理员将根本无法加载,您也可以通过让 SilverStripe 在另一台服务器(您的本地开发服务器)上生成这些文件然后上传文件来解决此问题。

So do I understand it right that your problem is that you can upload SilverStripe, but you can not install it, because the installer wants to write the config file?

Well, in this case there is actually a way to get SilverStripe running without using the installer. Just enter the database information into your mysite/_config.php file.
It should look something like this:

    <?php

    global $project;
    $project = 'mysite';

    global $databaseConfig;
    $databaseConfig = array(
            "type" => 'MySQLDatabase',
            "server" => 'localhost',
            "username" => 'myuser',
            "password" => 'mypass',
            "database" => 'mydatabasename',
            "path" => '',
    );

    MySQLDatabase::set_connection_charset('utf8');

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.org/themes/
    SSViewer::set_theme('blackcandy');

    // Set the site locale
    i18n::set_locale('en_US');

    // enable nested URLs for this site (e.g. page/sub-page/)
    SiteTree::enable_nested_urls();

    Director::set_environment_type('dev');
    // Director::set_environment_type('live');

please note that SilverStripe by default requires write permission on the assets/ folder, not only for uploading files, it also requires it for saving CSS files if the environment type is set to live, because SilverStripe wants to fetch all JS and CSS files, combine them into 1 single JS and 1 CSS file and saves them into the assets/ folder.
If this is not possible, the admin will simply not load, you can also work around this by letting SilverStripe generate those files on another server (your local dev server) and then upload the files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文