Help with setting up a codeignitor on Lamp in Debian codeignitor does not work

here is the text of the error


Warning: require_once (/var/www/market-tat.loc/public_html/system/core/CodeIgniter.php): failed to open stream: Permission denied in /var/www/market-tat.loc/public_html/index.php on line 315

Fatal error: require_once (): Failed opening required '/var/www/market-tat.loc/public_html/system/core/CodeIgniter.php' (include_path = '.: / Usr / share / php: / usr / share / pear ') in /var/www/market-tat.loc/public_html/index.php on line 315


I can't understand why the error comes out, the only thing that is not / usr / share / pear but here : / usr / share / php exists , then why the error!?

Maybe there are errors with access to them? But, full access to CI files through

$ chmod 777 dir

    1 answer 1

    Link original ask - >> http://idroot.net/tutorials/how-to-install-codeigniter-on-ubuntu-14-04/

    Install CodeIgniter on Ubuntu 14.04

    Step 1. First make sure that your running packages are up-to-date.

    sudo apt-get update sudo apt-get upgrade

    Step 2. Install LAMP server.

    A Ubuntu 14.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

    Step 3. Install CodeIgniter.

    Download the latest stable version of CodeIgniter, it is version 3.0.1:

    cd / var / www / wget https://github.com/bcit-ci/CodeIgniter/archive/3.0.1.zip unzip 3.0.1.zip mv /var/www/CodeIgniter-3.0.1 / var / www / yourdomain

    Change the ownership of that directory and files:

    chown -R www-data: / var / www / yourdomain

    Step 4. Configure MySQL Database for CodeIgniter.

    By default, MySQL is not hardened. You can secure MySQL using the mysql_secure_installation script. you should be able to reset your password and remove it.

    mysql_secure_installation

    MySQL Console will create a database for CodeIgniter. Run the following command:

    mysql -u root -p

    My password is your root password and hit Enter. Once you’ve been logged in to your CodeIgniter software:

    mysql> CREATE DATABASE codeigniter_db; mysql> GRANT ALL PRIVILEGES on codeigniter_db. * to 'codeigniter_user' @ 'localhost' identified by 'YoUrPaS $ w0rD'; mysql> FLUSH PRIVILEGES; mysql> exit

    Next, you’ve created a new database:

    nano /var/www/yourdomain/application/config/database.php

    Find the following lines:

    $ db ['default'] = array ('dsn' => '', 'hostname' => 'localhost', 'username' => 'codeigniter_user', 'password' => 'YoUrPaS $ w0rD', 'database' => 'our_bd',);

    Also, you need to edit the following file:

    nano /var/www/yourdomain/application/config/config.php

    Find your base URL:

    $ config ['base_url'] = 'http: //yourdomain.com';

    Save the file and close it.

    Step 5. Configure Apache2 web server.

    This is the path to the user’s file to / var / www / yourdomain:

    nano / etc / apache2 / sites-enabled / 000-default

    VirtualHost *: 80>

    ServerAdmin admin@yourdomain.com

    DocumentRoot / var / www / yourdomain /

    ServerName yourdomain.com

    ServerAlias ​​in. Yourdomain.loc

    Directory / var / www / yourdomain />

    Options Indexes FollowSymLinks MultiViews

    AllowOverride All

    Order allow, deny

    allow from all

    / Directory>

    ErrorLog /var/log/httpd/yourdomain.com-error_log

    CustomLog /var/log/httpd/yourdomain.com-access_log common

    / VirtualHost>

    Save and close the file once you are done. Service apache2 restart 1

    service apache2 restart

    Step 6. Access CodeIgniter.

    CodeIgniter will be available on HTTP port 80 by default. Open your favorite browser and navigate to: //yourdomain.loc or: //give your installation. If you are using a firewall, please click here.

    Congratulation's! You have successfully installed CodeIgniter. Thanks for using CodeIgniter on Ubuntu 14.04 system. For additional help or checking out the official CodeIgniter web site.