none
[PHP][Web Apps] Symfony Error - Page Cannot Be Displayed RRS feed

Answers

  • As you can refer to Configure the Web Server of the guide on Symfony site, to get the content of the web.config file. And the file should be created in the root directory of your application, which is D:\home\site\wwwroot on Azure Web App by default.
    Monday, February 15, 2016 1:40 AM
    Moderator

All replies


  • Hi,

    We are checking on this and will revert to you at the earliest.


    Girish Prajwal

    Saturday, February 6, 2016 12:40 PM
  • Have you occurred any error or issue during your deploying your Symfony application to Azure following your this guide? Or have you missed any configurations?

    Per my experience, you may check the following points:

    1, Whether the dependencies have been downloaded on Azure, you can install composer, VSO extensions of your Azure Web Apps websites, and leverage VSO or Kudu console site to check or modify your files online. You can refer to the answer of http://stackoverflow.com/questions/35035504/how-to-install-composer-on-app-service/35058312#35058312 for how to install composer extension on Azure Web Apps

    2, You may check whether the MySQL connection info is correct, the info is set in the file 'app/config/parameters.yml', you can leverage your own MySQL workbench to connect to your MySQL server via these info.

    3, You can test your Symfony application in 'dev' model for troubleshooting. Modify the entrance file 'web/app.php'

    use Symfony\Component\HttpFoundation\Request;
    use Symfony\Component\Debug\Debug;
    // If you don't want to setup permissions the proper way, just uncomment the following PHP line
    // read http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
    // for more information
    //umask(0000);
    
    // This check prevents access to debug front controllers that are deployed by accident to production servers.
    // Feel free to remove this, extend it, or make something more sophisticated.
    /*if (isset($_SERVER['HTTP_CLIENT_IP'])
        || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
        || !(in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server')
    ) {
        header('HTTP/1.0 403 Forbidden');
        exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
    }*/
    
    $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
    Debug::enable();
    
    require_once __DIR__.'/../app/AppKernel.php';
    
    $kernel = new AppKernel('dev', true);
    $kernel->loadClassCache();
    $request = Request::createFromGlobals();
    $response = $kernel->handle($request);
    $response->send();
    $kernel->terminate($request, $response);

    Tuesday, February 9, 2016 2:37 AM
    Moderator
  • Thank you, its now working in dev mode but after installing the composer extension and removing the web.config file,how to do i construct a good web.config file and where to put it,its seems that is the main problem
    Sunday, February 14, 2016 2:04 PM
  • As you can refer to Configure the Web Server of the guide on Symfony site, to get the content of the web.config file. And the file should be created in the root directory of your application, which is D:\home\site\wwwroot on Azure Web App by default.
    Monday, February 15, 2016 1:40 AM
    Moderator
  • I am using symfony on digitalocean server, but I never had such error. I am using Cloudways web hosting for PHP. Since the server already had composer installed, I was able to install and use Symfony quickly using composer command.
    Thursday, January 31, 2019 2:28 PM