Hello everyone i am new to laravel and i hope someone can help me about my problem. I created a laravel project. After that I import it to cpanel using softaculous. Then, I made some changes base on what i research in the net to avoid showing important file like .env . I created a folder relative to public_html, let say the folder name is 'tamangbilang' where i put almost all of my code except the index.php. Inside my public_html folder, I have another folder named as 'tamangbilang' where my index.php resides. I have followed this instruction https://dev.to/pushpak1300/deploying-laravel7-app-on-shared-hosting-hostinger-31cj the only difference is that I put another folder inside public_html.I also did some changes on the index.php code
require __DIR__.'/../../tamangbilang/vendor/autoload.php';
$app = require_once __DIR__.'/../../tamangbilang/bootstrap/app.php';
Everything is working fine on my login page(my first page) but when I try to login, an error occur.
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
It seems like the connection between routes was lost. I did further testing and I notice that the code is working well only if there is an index.php, before the route in the url. example
http://my-sample-domain.org/tamangbilang/index.php/login
P.S. I don't have access for ssh.
go to bootstrap folder & open cache folder then delete config. after that please check your routes this error basically arises due to routes not found for that go to your project installed on local and write php artisan route: list check if the route is present or not.
Related
For testing purpose I have Installed fresh Laravel-7 and also installed joedixon/laravel-translation package, all are working fine.
After that I have changed root directory and others (I have to change for implementing the Translation in another running project which root directory like that)-
Change things are-
Moved index.php into root directory, ex: myproject/public/index.php to myproject/index.php
Move .htaccess into root directory
In index.php, changed-
require __ DIR __.'/vendor/autoload.php';
and
$app = require_once __ DIR __.'/bootstrap/app.php';
And for Translation I added the /public/ for the path of css, js in resources/views/vendor/translation/layout.blade.php
And now all are working but when I try to update the translation file, It throws an error showing the requested url is not found.
Everything else seems to work fine expect for updating the translations.
How to solve ?
Screenshot attached.
enter image description here
i didnt work with this package before but i have noticied a double slash // in your requested url you trying to post to ( in the screenshot ) so that could cause a 404 since there is difference between
http://localhost/cartpro_language_test//languages/bn
and
http://localhost/cartpro_language_test/languages/bn
make sure its accesible in your routes check php artisan route:list
by default its accessible under /languages not /cartpro_language_test/languages so verify if there is any other changes you made that cause the url to be different than the one sat up
i did the exact same modifications and its working for me
One of my routes is returning this error message:
Not Found
The requested resource /jackpots was not found on this server.
When I change the route name to anything else e.g. route-1, it works.
Server is running on http://127.0.0.1:8000/jackpots via artisan serve
How can I resolve this?
Edit 1:
Does not work:
Route::get('jackpots', 'JackpotsController#getIndex');
Works:
Route::get('jackpot', 'JackpotsController#getIndex');
Turns out the problem had nothing to do with anything in the routes/web.php script.
In my public directory, I also had a folder with the same name as a URL endpoint i.e.
Folder structure
public
|__jackpots
web/routes.php
Route::get('jackpots', 'JackpotsController#getIndex');
This somehow confuses the php server (as well as apache) into thinking you're trying to access the public/jackpots folder whose permissions won't allow you to do that.
I renamed the public/jackpots folder and the problem was resolved.
I'm trying to push a Laravel project to production on Hostgator.
I followed this tutorial. Only the last step, changing one line on paths.php I couldn't accomplish because this file do not exists anymore on Laravel: http://shincoding.com/laravel/installing-configuring-laravel-shared-hosting/
I put all my project files on root/quasenerd_base/quase-nerd, except the content of the public folder, which I moved to root/public_html.
I successfully change the path on index.php to the quasenerd_base folder:
require __DIR__.'/../../quasenerd_base/quase-nerd/bootstrap/autoload.php';
$app = require_once __DIR__.'/../../quasenerd_base/quase-nerd/bootstrap/app.php';
When I access the url http://quasenerd.com.br, I can see my main layout. But it won't load the #section of the page.
In addition, any other url that I try to access returns a 404 page not found. (for example, /login). Apparently I can't access any of my views.
I tryed to add to my index.php:
$app->bind('path.public', function() {
return __DIR__;
});
but it didn't work.
Any ideas?
I have one project on shared hosting and I use this tutorial: YouTube
I hope it will help you.
I've setup Homstead which is working fine, but the web site is showing 403 forbidden error. If I put a index.php file in the public folder then it shows the content of the index.php file as expected. I have removed the index.php file and setup a laravel app within the public folder. This creates the 403 forbidden error again. If I point the web browser to homestead.app/lts/resources/views/welcome.blade.php it will show the laravel welcome page. 'lts' is the name of the project, it looks like laravel is not loading or pointing to the correct file to load. Any help will be much appreciated. I am new to laravel, I use to use codeigniter so I do understand how frameworks, work a little.
Can anyone help me,
i developed my application with Cakephp 2.1, and it works fine on my development server running Centos 5.7. My challenge came when i transfer my application to the lice server to be accessed by on LAN. It states that a missing controller which is not available in my whole application, for example, i named my folder which contains my application and uploaded to the correct folder in Centos, e.g /var/www/html/students and every time i need to access the application states that students controller is missing. I tried to rename my folder to 'mysite' and the errors still remain with mysite controller is missing.
So everytime i changed the name of the folder it states a missing controller for that named folder. I tried to figure out in core.php but cant find the solution.
To change the base directory to say /mysite you will have to modify your 3 .htaccess of cakephp i.e one in installlation folder , second inside the app folder,third inside the webroot folder
try adding:-
RewriteBase /mysite/
Hope this helps!