Join the community today
Become a Member

How to install Laravel?

Discussion in 'Other Web Apps usage' started by HarryPotter, Apr 5, 2015.

  1. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:03 AM
    1.9.10
    10.1.11
    So you created that guide, aren't you? I have to just know that do i need disable zend opcache and change the doc root absolutely?

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,328
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    9:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yes i created the guide, the extend of my knowledge of Laravel is contained in that guide at Install Laravel 5 on Nginx - CentminMod.com LEMP Nginx web stack for CentOS

    and that was derived from official docs so best to read the docs and ask on Laravel support forums :)
    FYI, disable opcache.enable_cli is not same as disabling zend opcache itself. Again read documentation for Zend Opcache PHP: Runtime Configuration - Manual
     
  3. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    12:03 AM
    1.9.9
    10.1.10
    I have a few self-coded laravel sites running on an centminmod server. I have zend opcache, open_basedir etc. enabled without any problems.
    However I am using laravel 5.x and not 4.x so not sure if that's your problem @negative
     
  4. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:03 AM
    1.9.10
    10.1.11
    Finally, i was running my software with zend opcache enabled but open_basedir disabled. (if enabled lots of php errors and doesn't work)
     
  5. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    12:03 AM
    1.9.9
    10.1.10
    Ahhh I remember what the problem is now.
    The problem is that public root is
    Code (Text):
    .../domaincom/public/public/
    (second public folder from laravel) and the index.php file needs access to one directory above because there are all the included files.
    So I have copied php.conf to php-laravel.conf and changed
    Code (Text):
    fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/usr/local/lib/php/:/tmp/;
    to
    Code (Text):
    fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/../:/usr/local/lib/php/:/tmp/;

    Notice the
    Code (Text):
    ../
    after
    Code (Text):
    $document_root
    so open_basedir allows access to the needed files.
    And ofcourse switch out the php.conf include in nginx vhost.
     
    Last edited: Mar 14, 2016
  6. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:03 AM
    1.9.10
    10.1.11
    Thank you for your help, i understand now.

    I was run it from /home/nginx/domains/domain.com/application-name/public directory so other main public directory stay a different location.

    I will move the my application under of the main public folder then configure the open_basedir location as you type.
     
  7. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    9:03 AM
    Not working anymore.
     
  8. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    12:03 AM
    1.9.9
    10.1.10
    You'll have to be more specific as to what exactly doesn't work. Which error msg. etc.?
     
  9. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:03 AM
    1.9.10
    10.1.11
    I worked it without problem.

    I have just a problem related with php version. Laravel 4.2 doesn't support the php 7.x so i downgraded to php 5.6.
     
  10. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    11:03 PM
    1.11.x
    10.x
    Getting a problem and totally blocked...

    Everything seems to be ok except routes I keep getting:

    Code:
    2018/03/29 17:42:17 [error] 30725#30725: *4 open() "/home/nginx/domains/subdomain.domain.pt/laravel/public/image/login/images/login_bk.png" failed (2: No such file or directory), client: 192.168.0.1, server: subdomain.domain.pt, request: "GET /image/login/images/login_bk.png HTTP/1.1", host: "subdomain.domain.pt:5556", referrer: "http://subdomain.domain.pt:5556/auth/login"
    
    The /public/ folder in the path seems to be added soamehow and we cant figure it...

    Conf file

    Code:
    server {
      server_name subdomain.domain.pt www.subdomain.domain.pt;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      access_log /home/nginx/domains/subdomain.domain.pt/log/access.log combined buffer=256k flush=5m;
      error_log /home/nginx/domains/subdomain.domain.pt/log/error.log;
    
      root /home/nginx/domains/subdomain.domain.pt/laravel/public;
    
      location / {
        try_files $uri $uri/ /index.php?$query_string;
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
     
  11. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    11:03 PM
    1.11.x
    10.x
    Actually just noticed "/public/image/login/images/" is the laravel route cant find a way to make it disappear
     
  12. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    11:03 PM
    1.11.x
    10.x
    *Update*
    Disabled staticfiles.conf and almost everything loaded except the images
     
  13. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    11:03 PM
    1.11.x
    10.x
    Did anyone got rewrite Laravel routes successfully?

    It can't serve the routes pointing to the storage folder.
     
  14. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    11:03 PM
    1.11.x
    10.x
    I want to cut my wirsts!

    Recompiled PHP again but this time I enabled PHPFINFO in centmin.sh, recompiled trough centmin menu 5 and... Voilá!

    Everything loading, in a few hours we will be doing massive tests to this webshop, so far my partner is amazed with speed load.
     
  15. eva2000

    eva2000 Administrator Staff Member

    54,328
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    9:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    so php fileinfo extension was needed ?

    How much memory on your server ?

    For 123.09beta01 and higher, you need at least 1023000 kilobytes of total swap space and 780000 kilobytes of memory to enable fileinfo php extension due to fileinfo's native high memory compilation requirements.

    Basically fileinfo php compile via source is memory intensive. Same problem whenever you source compile PHP on any system

    i.e.
    If you meet the swap disk and minimum memory requirements, set in persistent config file /etc/centminmod/custom_config.inc
    Code (Text):
    PHPFINFO=y
    

    then run centmin.sh menu option 5 to recompile your php version
     
  16. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    11:03 PM
    1.11.x
    10.x
    total used free shared buff/cache available
    Mem: 24524516 2029408 15411096 78088 7084012 21438044
    Swap: 12386300 0 12386300
     
  17. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    11:03 PM
    1.11.x
    10.x
    Think as to do with the way they coded the site, I created in a test server i have the environment php-fpm, nginx, etc. with a simple laravel project to test and everything was working until I uploaded this specific project and almost everything broke again.

    I will dig into that soon the devs woke up :)
     
  18. eva2000

    eva2000 Administrator Staff Member

    54,328
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    9:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Could be
     
  19. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    11:03 PM
    1.11.x
    10.x
  20. klimbo

    klimbo New Member

    8
    2
    1
    Mar 6, 2019
    Ratings:
    +2
    Local Time:
    9:03 AM
    CentOS 6.5 64bit
    MariaDB 5.5
    thank you for this usefull and informative post
     
    Last edited: Mar 7, 2019