GithubHelp home page GithubHelp logo

Comments (8)

abrarShariar avatar abrarShariar commented on July 17, 2024

Change the folder name to crud (if you havent yet)

Please make sure you have changed the $config['base_url'] found in line:26 of \application\config\config.php . It should look like :

$config['base_url'] = 'http://localhost/crud/demo';

from crud-with-codeigniter.

ehzawad avatar ehzawad commented on July 17, 2024

Folder name already crud and line:26 as like as you have said

from crud-with-codeigniter.

abrarShariar avatar abrarShariar commented on July 17, 2024

As most of the stackoverflow Q/A suggests, one of the main reason to get this error
is the code for mod_rewrite in the .htaccess file (where we rewrite the code and remove index.php from the default path). Try changing the code to this:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
</IfModule>

NOTE: I think the mod_rewrite in .htaccess has some variation with Xampp, for Lampp

More Reference: htaccess-not-working-on-localhost-lampp-ubuntu

from crud-with-codeigniter.

ehzawad avatar ehzawad commented on July 17, 2024

http://localhost/crud/demo/main/create
http://localhost/crud/demo/main/new_data
404 not found

Where is main/create (class/method) located??

Maybe, CI_Controller cannot able to get proper path

from crud-with-codeigniter.

abrarShariar avatar abrarShariar commented on July 17, 2024

the mod_rewrite has some difference in Lampp (please check my previous comment)

All the controller methods are located :/application/controllers/Main.php
The create() method at line: 23 and the new_data() method at line: 29

from crud-with-codeigniter.

ehzawad avatar ehzawad commented on July 17, 2024

Already...checked and changed .htaccess file but still not working....

from crud-with-codeigniter.

SohanChy avatar SohanChy commented on July 17, 2024

After almost two hours of frustration, I have finally gotten it to work on LAMP.
It was just due to lamp being too much over secure :p

Before using this on LAMP,
Go to terminal and:
sudo a2enmod rewrite
sudo gedit /etc/apache2/sites-available/default
and add/modify it to

 <Directory /var/www/>  
            Options Indexes FollowSymLinks MultiViews  
            # changed from None to FileInfo       
            AllowOverride FileInfo  
            Order allow,deny  
            allow from all  
    </Directory>

Then finally sudo gedit /etc/apache2/apache2.conf
and change

<Directory /var/www/>    
    Options Indexes FollowSymLinks  
    AllowOverride NONE  
    Require all granted  
</Directory>

to

<Directory /var/www/>  
    Options Indexes FollowSymLinks  
    AllowOverride ALL  
    Require all granted  
</Directory>

@abrarShariar @ehzShelter

from crud-with-codeigniter.

abrarShariar avatar abrarShariar commented on July 17, 2024

Congratulations @SohanChy 👍

from crud-with-codeigniter.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.