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

Slim Application Error #16

Closed
astridx opened this issue Oct 11, 2018 · 5 comments
Closed

Slim Application Error #16

astridx opened this issue Oct 11, 2018 · 5 comments
Labels
bug

Comments

@astridx
Copy link

@astridx astridx commented Oct 11, 2018

Hello,
I installed Typemill some time ago on Ubuntu16.04 and at that time everything worked fine. I did not use Typemill in this project for other reasons.

Now I wanted to start a new attempt for a documentation. I have completely reinstalled Ubuntu 18.04 and installed lamp. Then I cloned this repo into the document root of apache and run composer update.
But, when I open http://localhost/typemill/ I see only an error:

Slim Application Error - A website error has occurred. Sorry for the temporary inconvenience.

It's probably because I did not properly configure something or I did not set the right permissions. Can you help me?

@trendschau

This comment has been minimized.

Copy link
Member

@trendschau trendschau commented Oct 11, 2018

Hi Astrid,

can you please open the file "settings.yaml" in the folder "settings" and then add this as the first line:

displayErrorDetails: true

This will turn on the detailed error reporting of the Slim Framework. Can you please post the error details here, so that I can fix it?

Thank you!
Sebastian

@trendschau trendschau added the bug label Oct 11, 2018
@astridx

This comment has been minimized.

Copy link
Author

@astridx astridx commented Oct 12, 2018

Hello Sebastian,

thank you for your feedback.

There was no settings.yaml, because I could not start the setup process.

But I realized, that I could start this setup process via
http://localhost/typemill/index.php/setup
so I add the index.php.

After that I could

  • create a user,
  • was redirected to http://localhost/typemill/index.php/setup/welcome
  • and the file settings.yaml was created.

I added
displayErrorDetails: true
as first line to the file settings.yaml.

If I open http://localhost/typemill/index.php/typemill
bildschirmfoto von 2018-10-12 10-15-04

If I open http://localhost/typemill/typemill
bildschirmfoto von 2018-10-12 10-17-16

@trendschau

This comment has been minimized.

Copy link
Member

@trendschau trendschau commented Oct 12, 2018

Hi Astrid,

I tested the GitHub-Version on my localhost again and it works well, so I suppose that some system requirements are missing on your ubuntu installation. I have no experience with ubuntu, but can you check:

  • that htaccess files are allowed on your system
  • that mod_rewrite module is activated on your system.

For me, the errors above look like routing and redirect problems, and these problems appear if htaccess or mod_rewrite is not active. The htaccess strips out the index.php part from the url. After that the routing logic of Typemill searches for urls without index.php in a directory of all typemill-content-pages. With index.php in the url, Typemill does not find any page and that is why you get the error.

I will think about a programmatic solution for this in the next version of Typemill.

Sorry that I cannot help with ubuntu, but I am sure that there are helpful tutorials with htaccess and mod_rewrite for ubuntu out there.

@astridx

This comment has been minimized.

Copy link
Author

@astridx astridx commented Oct 12, 2018

Thank you very much. Now it works.

The problem was my missing Apache knowledge. I thought enabling mod_rewrite is enough. But I had to add the text

    <Directory /var/www/html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>

into the section <VirtualHost *:80> of the file /etc/apache2/sites-available/000-default.conf

with sudo gedit /etc/apache2/sites-available/000-default.conf

@trendschau

This comment has been minimized.

Copy link
Member

@trendschau trendschau commented Nov 7, 2018

Hi Astrid,

by the way: thank you for sharing this solution, I will add it to the setup-documentation because it seems to be a common problem for ubuntu/linux users....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.