Results 1 to 29 of 29

Thread: Contao 4.10 Install Error (allow_url_fopen)

  1. #1
    User
    Join Date
    05-05-12.
    Posts
    48

    Default Contao 4.10 Install Error (allow_url_fopen)

    Contao 4.10 won't install. I keep getting the following message. See below and attached:

    The PHP setting "allow_url_fopen" is not enabled on the server

    However, IT IS enabled on the server. I don't know where else to go from here. I need help to solve this problem so that I can start using 4.10.

    Thanks !
    Attached Images Attached Images

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    Did you also check this in the phpinfo()?
    Contao Community Moderator
    → Support options

  3. #3
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    My server was recently migrated to an upgraded version. I don't know where in the new Cpanel to find phpinfo(). When I look up PHP, the following options come up:

    Software: Select PHP Version
    Databases: phpMyAdmin

    Please see attached
    Attached Images Attached Images

  4. #4
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    • Create a phpinfo.php file in your web/ subfolder
    • Edit the file and add <?php phpinfo() ?>
    • Open the script in your browser: https://example.com/phpinfo.php
    • Search for allow_url_fopen in the output of the PHP info
    Contao Community Moderator
    → Support options

  5. #5
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Thank you ! I just tried it and the info came back. The allow_url_fopen is off. How do I turn it on ?
    Attached Images Attached Images

  6. #6
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    So this is exactly the reason why the Contao Manager does not work.

    It may be necessary to set the PHP settings for this folder separately, but this is something you could ask your hosting provider.
    Contao Community Moderator
    → Support options

  7. #7
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Thank so much, I appreciate the help. I'll contact my provider and see if possible.

  8. #8
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    You can also see that your settings in the directory do not work by the fact that PHP version 7.4 is selected in the cPanel, while PHP v7.2.33 is displayed in the PHP info.
    Contao Community Moderator
    → Support options

  9. #9
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Wait ! I reset the php version and now it's working except it's giving me a new error message. Please see attached.
    Attached Images Attached Images

  10. #10
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    The Contao installation directory must be empty in order to install Contao. So just create a new (empty) folder, create a new subfolder web/ into this folder, put the contao-manager.phar.php into the web/ subfolder and set the DocumentRoot accordingly.

    https://docs.contao.org/manual/en/installation/
    Contao Community Moderator
    → Support options

  11. #11
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    This is the closest I ever gotten to actually installing Contao 4 !

    I've attached my server info as well as Contao 4's list of server configurations. Which one of these matches my server ?
    Attached Images Attached Images

  12. #12
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    The "Custom configuration" option which you had chosen was perfectly fine.
    Contao Community Moderator
    → Support options

  13. #13
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    I tried again by emptying the folder and starting from the beginning. Again, I chose 'Custom' and received this error. If you notice in the background, the custom configuration isn't working.
    Attached Images Attached Images

  14. #14
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    You have misunderstood that. It works perfectly fine, otherwise the Contao Manager would have stopped there (which did not happen, as you can see). The orange icon only means that you have chosen the "Custom configuration".

    The problem is still that your folder is not empty (as you can see on your screenshot there are still some hidden files with the dot at the beginning). So just do it as I have described above: create an empty installation folder and install Contao there.

    NB: To see hidden files, you may need to enable the corresponding option in your FTP client first.
    Last edited by xchs; 09/19/2020 at 00:50.
    Contao Community Moderator
    → Support options

  15. #15
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Oh my goodness !!!! It finally worked !!! How do I connect the database ? I tried and got an error 404.
    Attached Images Attached Images

  16. #16
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    Did you click on the button "Install tool" in the Contao Manager? If you got an Error 404 then probably your DocumentRoot is not set correctly. The DocumentRoot of your domain must point to the web/ subfolder of your Contao installation (see https://docs.contao.org/manual/en/in...-configuration ).

    To run the Contao install tool just open https://example.com/contao/install (see https://docs.contao.org/manual/en/in...o-installtool/ )
    Contao Community Moderator
    → Support options

  17. #17
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Ok, I got some sleep and am starting over. Last night, I emptied my public_html folder, deleted everything and re-installed Contao 4. I must have done this at least 5 times last night. In my final attempt, I pointed the DocumentRoot of my domain to web/ yet I'm STILL getting the 404 error. Attached are screenshots of the error message and var/log entries.
    Attached Images Attached Images

  18. #18
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    As you can see on your second screenshot you are trying to open the install tool via https://www.example.com/web/contao/install

    If you have set the DocumentRoot for example.com correctly the the subfolder web/ of your Contao installation, the install tool is available via https://www.example.com/contao/install
    Contao Community Moderator
    → Support options

  19. #19
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Here are screenshots from the EventListener folder line 42 and 94.
    Attached Images Attached Images

  20. #20
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Yes, I first tried https://www.example.com/contao/install. However, when I received the 404 error message, I tried https://www.example.com/web/contao/install.

  21. #21
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    The last one is wrong. To run the Contao install tool you have to open it via https://www.example.com/contao/install

    Is there an .htaccess file within your web/ subfolder (be aware this is a hidden file and could therefore not be visibile in your FTP client)?

    What Contao version did you have installed? Version 4.10 or version 4.9?

    Can you open the Contao install tool via https://www.example.com/index.php/contao/install or https://www.example.com/app.php/contao/install ?
    Contao Community Moderator
    → Support options

  22. #22
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Yes, there was a hidden .htaccess file and I removed it then tried the two urls you suggested and am still getting the same 404 error message.

  23. #23
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    I installed version 4.9 (4.10 didn't accept the official demo template, which I need to build out the site once everything is properly set up)

  24. #24
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    I'm going to take a break here as I have a bunch of errands to run. I'll return later today to try again. Thank you so much for your help with this issue. Will be back soon.

  25. #25
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    No, why did you remove it? No one told you to delete this file. Please restore it. It is necessary to run Contao and part of the installation!

    Please show a screenshot of your folder structure of your Contao installation and a screenshot where we see what is in your web/ subfolder.

    If you still get an Error 404 when you either run https://www.example.com/index.php/contao/install or https://www.example.com/app.php/contao/install then it is something wrong with your DocumentRoot which has to be set correctly to the web/ subfolder.

    To check if your DocumentRoot is set correctly try this:
    • add a new text file test.txt (with some content e.g. "It's working") and save it into the web/ subfolder of your Contao installation (i.e. /home/example/public_html/web/test.txt)
    • Open https://www.example.com/test.txt in your browser
    • The browser must show the content of this file (e.g. "It's working")

    As long as that does not work, you have not set the DocumentRoot of example.com to the web/ subfolder. Your Contao installation will only work if this also works.
    Last edited by xchs; 09/20/2020 at 00:40.
    Contao Community Moderator
    → Support options

  26. #26
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    Ok, I'm back. I found another .htaccess file in the general root folder so I deleted that as well then tried the urls you suggested. Again, I got the 404 error message.

  27. #27
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    Quote Originally Posted by ally1 View Post
    I found another .htaccess file in the general root folder so I deleted that as well
    And why did you do that? You should instead restore the web/.htaccess file and not delete another one.

    Quote Originally Posted by ally1 View Post
    then tried the urls you suggested. Again, I got the 404 error message.
    Then you have still a problem with your DocumentRoot. You'll have to fix this first in order to run Contao.

    You must be able to open the https://www.example.com/test.txt file in your browser where the file test.txt must be located in the web/ subfolder of your Contao installation.
    Last edited by xchs; 09/20/2020 at 00:40.
    Contao Community Moderator
    → Support options

  28. #28
    User
    Join Date
    05-05-12.
    Posts
    48

    Default

    I tried redirecting the root to the web directory several times but it won't work. See attached.
    Attached Images Attached Images

  29. #29
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,264

    Default

    No, a redirect is not the same as setting the DocumentRoot. Please ask your hosting provider where you can change the DocumentRoot of your domain.
    Contao Community Moderator
    → Support options

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •