About CodeIgniter 403 Error - php

I just recently got a project based on CodeIgniter and I am total beginner.
I have added new view in my CI views and I want to load it to popup window when I press on a given link. But I get that my playerview.php page is forbidden on this server error 403. So where should I edit or change settings so that I have permission to use my new view?
The .htaccess file has only one line and it says
Deny from all

You can't call a view directly from a browser. Views are loaded by controllers, and controllers are called based the URL. It is typically www.yoursite.com/controllername/functionname
If you read the general topics section of the CI docs, it will all make sense.

Related

Why is the auth/login path returning 404 error?

I am new to Codeigniter and I have recently started a project using Codeigniter v3.10 and the Ion-Auth library for user actions.
When I try to access the login page base_url/auth/login I get a 404 error.How can I troublehsoot/solve this? I don't see anything in my network tab in the browser.
I copied and configured the files as presented in user docs.
Thank you in advance
base_url/index.php/auth/login
or use .htaccess to remove index.php

Codeigniter application showing 404 on first load and after refresh it shows the actual page

I am developing an application in Codeigniter. I have uploaded the project to the server and want to access it using URL www.example.com/xyz/.
xyz is the folder where the project is located. It was previously working, but now it is showing "404 page not found". Every time when I load the page using URL I get 404 Error and when I refresh the same page with 404, it gets executed and shows the actual page. I have it on my route.
$route['default_controller'] = 'Member';
I have Member controller with index function.
Please help
Thanks
Make sure you have set base_url() in application/config/config.php file correctly and (.htaccess) files is there

How to edit the view of "The page has expired due to inactivity" in Laravel 5.5

In Laravel 5.5, When you are using CSRF protection (by default) and you send a post request after long inactivity you'll get this error page (Screenshot).
I'm ok with this error however, I need to change the view/text of this error to match my application style and my language for sure.
Any Ideas in how to edit this view?
You can override the default view by placing a 419.blade.php file in the resources/views/errors folder.
If you're using an editor with global search capabilities, you can search for the error message inside your project. For example, in Visual Studio Code you can press Ctrl + Shift + F to search inside the project.
I use it all the time to find the files which are part of the framework that I need to customize.
More on overriding the error views in this section of the official docs.
You can override the default view by placing a 419.blade.php file in the resources/views/errors folder.

Unable to access controllers of codeigniter which is installed under a wordpress site

I have a Wordpress site. So all i wish is to fetch the information from those database tables and create my own custom API's. For that i opted CodeIgniter Framework.
The file directory system looks like this in my FTP
My codeigniter files are placed in apps folder
The problem is the pages are not loading, It always returns 404 Error
or No Input file specified/found etc.
I tried changing .htaccess file but no luck.
But if i specify
applications/apps
i.e controller/method in default_url in routes.php it works fine.
and if i click on the Hyperlink, i am trying to load another view or call another View(a web page) but this returns 404 error page not found.
What might be the reason behind this.

codeigniter installation problem on shared host

my host account is something like:
~
~/public_html
~/public_html/system/application
to access my web, I need to put http://example.com/~userid in address bar
I install codeigniter in the ~/public_html directory, I can access http://example.com/~userid.
The Welcome page shows correctly, and the related user guide pages show correctly.
The problem is: if I create a new controller, and create new views, the web page just show "Error 404: Document Not Found". If I use http://example.com/~userid/welcome/index it has the same problem.
If I use base_url() function it shows http://example.com/~userid/
What should I do do fix this problem?
Thanks in advance!
Try http://example.com/~userid/index.php/welcome/index.
It looks like your URL rewriting is not set up or badly configured. This is the default way if URL rewriting is disabled.
EDIT See this page of the user guide, especially the section "Removing the index.php file" on how to set up URL rewriting.

Categories