Symfony2 : error 403 and 404 on prod envrionment - php

I am facing an issue with Symfony2. I have created a website, it works fine locally.
I can access localhost/symfony/web to see my site on prod. (it doesn't work if I go to app.php, I get redirected to the wamp index page, but it seems to be normal on the Symfony version I use - 2.2.1 )
Online I have a 404 error when I try to access http://www.mywebsite.com/web
If I try to go to any other page (like www.mywebsite.com), I get a 403 error.
But I can go to http://www.mywebsite.com/web/app_dev.php or http://www.mywebsite.com/web/config.php without error.
I am using a shared server (1&1 starter).
I don't see anything in the logs. I have cleared the caches (both dev and prod), but it doesn't change anything.
I am lost... can anyone help me?
Thanks,

Related

Laravel URL rewrite Error

Actually I am deploying my laravel 5 Application on Client Server.
My client create space for me in such type of path.
var/www/html/abcproject
Now I have uploaded my all laravel 5 file on abcproject directory.
My issue is that , my home page is working fine but my internal pages
are giving Not Found Error.
Suppose when I try to logged in, throwing this error.
Not Found
The requested URL /abcproject/login was not found on this server.
How to resolve that error?
You need to point the webroot to var/www/html/abcproject/public

Openshift PHP7 wordpress app throws “404 Page not found error” with custom domain name

I have a wordpress app based on PHP7 catridge on Openshift. I added two alias to the app(e.g, www.xyz.com & xyz.com) and I also updated the CName in my Zone file. When I enter www.xyz.com, it redirects me to www.xyz.com/app and throws a 404 NOT FOUND error (nginx/1.11.6).
But I can access the administration page without any problem (www.xyz.com/wp-admin)
Can anyone please help?
Enter the www.domain.abc first. Use CloudFlare to configure your domain. Make things pretty easy.
After this you will get the pretty permalinks error related to ngnix.
I am too getting the same error. I can access the home page and most of the things. This error only arises when I decide to use Pretty Permalinks in WordPress.
Till now I have figured it out that we have to edit the ngnix file. But there are several files out there.
Has made me even more confused.
This may not be the solution but you can access post and other stuff in plain permalinks.

Laravel 5.2 - Staging to Live Server : 500 Internal Server Error

I have a Laravel 5.2 project working fine locally, after uploading to a live server I have a 'laravel' folder in my root directory and public folder under 'public_html/testsite'
My 'index.php' points to the correct '/bootstrap/autoload.php' and '/bootstrap/app.php'
Upon going to my 'url/testsite/' I get a blank page only (was working fine L5.0) firebug shows : 500 Internal Server Error with HTML : Reload the page to get source for...
index.php is loading by testing with die() before any 'require' methods, but after 'require... autoload.php' the die() is not working, however it is successfully calling autoload.php as a die() works within this file.
I'm not sure if this is a .htaccess issue, or maybe I had to set something up in cPanel last time for this folder (I can't remember). I'd appreciate any help!
Please note this Laravel project sits as a test site in a /testsite/ folder along with my current live site files.
Amongst changing many things at once, I appeared to have solved this by setting up a subdomain within cPanel and setting this to my testsite/ folder.
This was on a server with my current website live under public_html/ and setting up a test laravel app(website) with under public_html/testsite/ to work as an independent site for testing.
The typical "change permissions on storage folder" suggested elsewhere on stackoverflow did not solve my issue so hopefully this helps someone in the same boat.

White blank pages in Laravel After Login

Sorry, this is question don't have a code snippet but a situation. I've a Laravel application which was running fine on my localhost and server. Today I made some updates to the controllers and some views. The changes was working fine in the localhost. So I uploaded the files to the server. But when I tried to login in the server, I could see the home page, login pages and all. But getting a white blank page after login.
When I manually try to navigate to other pages in the logged in section, it redirects to the dashboard and blank page comes. Everything is working fine in the localhost. I didn't make any updates to the server configuration. Everything was as before.
OS: CentOS 6.6 (Final)
PHP version: 5.6
Laravel 4.2
Server version: Apache/2.2.15 (Unix)
I checked several answers from other similar questions such as this one and this one. But they all had some updating situation. But in my case not so.
What would be the problem? If you need any additional information, just let me know.
I can give some more information:
When I access a course page (which I need to login to see), it shows a 302 Found status code in the Network tab and then redirects to the Login page where it again shows a 302 Found status code and then to the dashboard with a 200 ok code. Session is being created. Thats' why it's redirecting back to the dashboard page. But the page is still empty.
A blank white screen usually means either
Your'e rendering a template with no content
A fatal PHP occurred before Laravel could completely bootstrap itself
The "right" thing to do here is to check your web server error logs, or your PHP error logs. I'm going to guess you don't know where those are or if they're setup properly. If that's the case you'll want to temporarily change PHP's display_error ini setting. In Laravel 4.2 I'd do this by setting the ini in the following file
#File: boostrap/start.php
<?php
ini_set('display_errors','1');
//... rest of file
This should result in the error being displayed on the screen, and from there you can debug further.

Why does my custom 404 work but not my 403?

I'm working in a Symfony 2 project (version 2.1.11 to be precise). I'm trying to customize the 403 page returned when using the Symfony firewall. It correctly returns a 403 error but not using my custom page.
I am using the template override method by putting a file at app/Resources/TwigBundle/views/Exception/error403.html.twig. I have an error404.html.twig page right next to it that works OK and is returned for non-existent URLs. I've cleared my cache and I'm testing in the "prod" environment.
Anybody able to tell me where to go next? I'm not sure why the 403 works but the 404 doesn't. If you have a custom 403 working at all, I'd also appreciate a comment on how you did it (maybe I can override that template elsewhere, etc.)

Categories