Contentify: install issue cant proceed

Created on 30 Mar 2019  路  34Comments  路  Source: Contentify/Contentify

im not sure what is the issue, why i cant proceed further with the install. the installer check comes back all green

https://liefgaming.com

Is it a issue with composer?
my shared hosting doesnt allow SSH access but i was reading i can install composer via ftp if i was to upload from my pc. but how?

help wanted

All 34 comments

@Sinn2195 based on where the code stopped returning data, and assuming that your running 2.6, it looks like your host may be blocking the apache_get_modules() function.

If you are running v2.6, you can work around this by editing the public/install.php file
on line 68 add if (function_exists('apache_get_modules')) { and on line 75 add }

the whole block should now look like the version on the 3.0-dev branch
https://github.com/Contentify/Contentify/blob/3.0-dev/public/install.php#L70

This is the only usage of the apache_get_modules() function in the entire project so if this gets you past, you should be good!

i ended up switching to 3.0

like 58
[2019-03-31 23:31:56] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Parse error: syntax error, unexpected ''from'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in /hermes/bosnacweb05/bosnacweb05az/b279/ipg.sinn219506506/config/mail.php:58

Is there still a comma at the end of line 45?

there is not

Hello,

i was reading i can install composer via ftp

I guess... no. You could run it locally on your PC and then upload everything _with_ FTP.

Now when I go to the website all I get is a 500 HTTP response code which basically just tells me that there is an error on the server. But that's all I can tell so you have to look into the log files to see what went wrong. You might find the Apache log files right in a sub folder of the root directory of your web storage.

alright ill give that a shot

It might also help if you post the complete /hermes/bosnacweb05/bosnacweb05az/b279/ipg.sinn219506506/config/mail.php file. (If it contains any sensible data such as passwords please replace them with something like ****.)

Because I assume the error is above/before the lines that you posted.

Okay thanks, but please post the complete /hermes/bosnacweb05/bosnacweb05az/b279/ipg.sinn219506506/config/mail.php file. (If it contains any sensible data such as passwords please replace them with something like **.)

The exception does not really help, it says there is a syntactical error in the file but it does not exactly tell where or what is wrong. All it tells us is info about a _subsequent_聽error.

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Mail Driver
    |--------------------------------------------------------------------------
    |
    | Laravel supports both SMTP and PHP's "mail" function as drivers for the
    | sending of e-mail. You may specify which one you're using throughout
    | your application here. By default, Laravel is setup for SMTP mail.
    |
    | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
    |            "sparkpost", "log", "array"
    |
    */

    'driver' => env('MAIL_DRIVER', 'mail'),

    /*
    |--------------------------------------------------------------------------
    | SMTP Host Address
    |--------------------------------------------------------------------------
    |
    | Here you may provide the host address of the SMTP server used by your
    | applications. A default option is provided that is compatible with
    | the Mailgun mail service which will provide reliable deliveries.
    |
    */

    'host' => env('MAIL_HOST', 'smtp.liefgaming.com'),

    /*
    |--------------------------------------------------------------------------
    | SMTP Host Port
    |--------------------------------------------------------------------------
    |
    | This is the SMTP port used by your application to deliver e-mails to
    | users of the application. Like the host we have set this value to
    | stay compatible with the Mailgun e-mail application by default.
    |
    */

    'port' => env('MAIL_PORT', 465),

    /*
    |--------------------------------------------------------------------------
    | Global "From" Address
    |--------------------------------------------------------------------------
    |
    | You may wish for all e-mails sent by your application to be sent from
    | the same address. Here, you may specify a name and address that is
    | used globally for all e-mails that are sent by your application.
    |
    */

    'from' => 
        'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
        'name' => env('MAIL_FROM_NAME', 'Sinn'),
    ],

    /*
    |--------------------------------------------------------------------------
    | E-Mail Encryption Protocol
    |--------------------------------------------------------------------------
    |
    | Here you may specify the encryption protocol that should be used when
    | the application send e-mail messages. A sensible default using the
    | transport layer security protocol should provide great security.
    |
    */

    'encryption' => env('MAIL_ENCRYPTION', 'tls'),

    /*
    |--------------------------------------------------------------------------
    | SMTP Server Username
    |--------------------------------------------------------------------------
    |
    | If your SMTP server requires a username for authentication, you should
    | set it here. This will get used to authenticate with your server on
    | connection. You may also set the "password" value below this one.
    |
    */

    'username' => env('MAIL_USERNAME'),
    'password' => env('password'),

    /*
    |--------------------------------------------------------------------------
    | Sendmail System Path
    |--------------------------------------------------------------------------
    |
    | When using the "sendmail" driver to send e-mails, we will need to know
    | the path to where Sendmail lives on this server. A default path has
    | been provided here, which will work well on most of your systems.
    |
    */

    'sendmail' => '/usr/sbin/sendmail -bs',

    /*
    |--------------------------------------------------------------------------
    | Markdown Mail Settings
    |--------------------------------------------------------------------------
    |
    | If you are using Markdown based email rendering, you may configure your
    | theme and component paths here, allowing you to customize the design
    | of the emails. Or, you may simply stick with the Laravel defaults!
    |
    */

    'markdown' => [
        'theme' => 'default',
        'paths' => [
            resource_path('views/vendor/mail'),
        ],
    ],

];

http://sinn219506506.ipage.com//main_site/storage/logs/laravel.log

Add a comma to the end of line 45 of the config/mail.php

That should fix it :)

Ignore that, you did have a comma

the end of the from line is missing a [

change 'from' => to 'from' => [

see https://github.com/Contentify/Contentify/blob/3.0-dev/config/mail.php#L58 for reference

Yep, that's it.

We have just seen why it is dangerous to use PHP files as config files :D

i ended up just copying your mail.php and updating my info, it did change the error but im still receiving the same errors in logs

Well what is the new error then?

well instead of the 500 error i get the sites crash page
like 58

Then you can take a look in the log file of Contentify: storage/logs/contentify.log

i do not have a contentify.log file

also ive noticed i do not have a database.ini file

In the log there is this error:

[2019-04-01 15:31:11] production.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Class 'Fideloper\Proxy\TrustProxies' not found in /hermes/bosnacweb05/bosnacweb05az/b279/ipg.sinn219506506/main_site/app/Http/Middleware/TrustProxies.php:8

=> https://github.com/Contentify/Contentify/issues/532 Seems like you have to do php composer.phar install. Well you can do it locally on your PC and then upload the vendor folder (this is the folder where Composer installs the third party libraries.)

If it does not work I will upload my vendorfolder so you can use it.

could you upload the vendor folder it would make things easy, im having issues figuring out how to use composer

is there any recommended composer guides so i can eventually do it my self ?

  1. Well you need PHP on your system.
  2. Then open a console (cmd.exe on Windows, CRTL+ALT+T on Linux)
  3. Use the cd command to switch to the Contentify directory (e. g. cd C:\data\Contentify - if you don't have it on C switch to the partiion by typing for example D:)
  4. Run php composer.phar install - on Windows php.exe composer.phar install You might have to specify the path to the PHP binary, e.g. C:\XAMPP\php\php.exe composer.phar install

getting the 'composer install' to run as part of the web based install process would take some work. I've created #545 to track that request

like 58
issue I had running composer

This seems to be the same error as before. Suggestion: Reset the mail.php to its original state, run composer install and then re-apply your changes.

This is not a real fix but your website should run then, only sending mails will not work.

alright i was able to get the install to continue but now im experiencing the FatalErrorException migrations issue.
i have already tried to delete the migrations db, tried wiping the db completely
like 58

Ok, I'll upload database dump that you can import so you can skip the installation.

Here is the MySQL dump:

sql_contentify.zip

It's for 2.6. If you want to use 3.0-beta you have to execute these queries after importing the dump:

ALTER TABLE `servers` CHANGE `hoster` `host` VARCHAR(255);
ALTER TABLE `news` ADD `image` VARCHAR(255) DEFAULT NULL;
ALTER TABLE `videos` ADD `enable_comments` TINYINT(1) DEFAULT 1;
ALTER TABLE `streams` ADD `enable_comments` TINYINT(1) DEFAULT 1;
ALTER TABLE `polls` ADD `enable_comments` TINYINT(1) DEFAULT 1;

Login credentials:

+----------+---------------------------+
| Property | Value                     |
+----------+---------------------------+
| Username | superadmin                |
| Email    | [email protected] |
| Password | lY5VXRcm                  |
+----------+---------------------------+

You should change the password after the first login, of course.

So this is v2.6? What PHP version?
Did you change something in the FrontController.php? This again seems to be a subsequent error, so there is a syntactical error somewhere else in the file.

ended up doing a fresh install but now its something even different! its the theme in the config file
I am using 3.0dev
php 7.1
updated the db string from 2.6-3.0
installed composer vendor with a fresh core
I did not change anything inFrontController.php
https://liefgaming.com

<?php

namespace Contentify\Controllers;

use Config;
use Exception;
use Input;
use Redirect;
use URL;
use View;

abstract class FrontController extends BaseController
{

    /**
     * The layout that should be used for responses.
     * If null the layout of the chosen theme will be loaded.
     *
     * @var string
     */
    protected $layout = null;

    /**
     * Setup the layout used by the controller.
     *
     * @param string $layoutName The name of the layout template file
     * @return void
     * @throws Exception
     */
    protected function setupLayout(string $layoutName = null)
    {
        if (! $layoutName) {
            $theme = Config::get('app.theme');

            if (! $theme) {
                throw new Exception('Error: Could not retrieve the theme name from the config!');
            }

            $layoutName = $this->layout ? $this->layout : lcfirst($theme).'::layout';
        }

        parent::setupLayout($layoutName);

        View::composer($layoutName, function($view)
        {
            /** @var \Illuminate\View\View $view */
            $view->with('moduleName', $this->moduleName);
            $view->with('controllerName', $this->controllerName);
        });
    }

    /**
     * Helper action method for searching. All we do here is to redirect with the input.
     *
     * @return \Illuminate\Http\RedirectResponse
     */
    public function search(
    {
        $url = URL::previous();
        return Redirect::to($url)->withInput(Input::only('search'));
    }

}'

Still unable to progress

but now its something even different! its the theme in the config file

Hm maybe something in the cache... Please try to clear it: https://github.com/Contentify/Contentify/wiki/FAQ#how-can-i-clear-the-cache

You might also take a look at the config database table. It should contain an entry with the key "app.theme" and the name of a theme, for instance "MorpheusTheme".

ended up clearing the cache folders, i checked the db and the MorpheusTheme is in the config file. no progress

Guess this issue is outdated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

khalifaone picture khalifaone  路  3Comments

Ozymandias2 picture Ozymandias2  路  4Comments

niclasreich picture niclasreich  路  3Comments

khalifaone picture khalifaone  路  3Comments

NePhiTV picture NePhiTV  路  5Comments