eZ Community » Forums » Install & configuration » activating the Symfony debug toolbar...
expandshrink

activating the Symfony debug toolbar in ezPublish5

activating the Symfony debug toolbar in ezPublish5

Monday 13 April 2015 7:28:21 pm - 6 replies

HiI have worked with Symfony2 for some time and I am trying to see the debug toolbar on my site. In Symfony I would simply go to ...index_dev.php but ezPublish does not have this file. Apologies if this is really simple or very obvious in the documentation somewhere but I haven't found it yet!Thanks in advanceBarry J

Tuesday 14 April 2015 5:09:01 am

Hello Berry!

Which version of eZ Publish 5 are you using? This is important as the use of 'index_dev.php' was prior to eZ Publish 5.2

Re: https://github.com/ezsystems/ezpublish-community/blob/master/doc/apache2/vhost.template#L140

It seems it was removed around May 28, 2014 and in the 2014.05 community build and the use of the web server environment variable "ENV" and functionality of the 'dev' mode was incorporated into the main index.php file:

https://github.com/ezsystems/ezpublish-community/commit/d8b77a6142ed53cc822947acc7272a33ae5ce274#diff-2567a5ec9705eb7ac2c984033e06189d

https://github.com/ezsystems/ezpublish-community/commit/cc12319f0badce420bfd67813e4fc3ae7e6d12ce#diff-2567a5ec9705eb7ac2c984033e06189d

I honestly had not realized that the 'index_dev.php' file had been removed either. I just did a few minutes of research on the commit history of the 'web' directory in the ezpublish-community github repository:

https://github.com/ezsystems/ezpublish-community/commits/master/web

I think it will help you understand if you study the apache virtual host documentation which covers the setting of the "ENV" variable:

https://github.com/ezsystems/ezpublish-community/tree/master/doc/apache2

In short I currently set the "ENV" variable to "dev" using the following virtual host syntax:

SetEnv ENVIRONMENT "dev"

Now while I think there may be other, perhaps better ways of doing this ... this is what I am using and it works just fine for my dev env needs.

Apologies for my late reply ... it's been a very long day.

I hope this helps!

Cheers,
Heath

Modified on Tuesday 14 April 2015 5:09:28 am by // Heath

Wednesday 15 April 2015 9:48:48 pm

Hello Berry,

I wanted to as another question. How are you installing eZ Publish 5 exactly? Share.ez.no download or composer install?

While doing some other unrelated research I found this recent dev mode related bugfix which might affect you depending on how you installed.

https://github.com/ezsystems/ezpublish-community/commit/378424784ecf5236e0307ab7825e6dae0af52d20

If your still having troubles you might want to make sure your installation contains this fix and test again.

I hope this helps!

Cheers,
Heath

Thursday 16 April 2015 1:08:15 am

Hi Heath.

Thanks for your help. I finally got it working, although I don't think my config is perfect so maybe it is worth re-installing with that patch.Let me tell you what I did to get the toolbar working.

 

MAMP/conf/apache/extra/httpd-vhosts.conf

<span style="color: #808080; background-color: #f7faff; font-style: italic;">#
</span><span style="background-color: #f7faff;">NameVirtualHost </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">*:80
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;">#
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;"># VirtualHost example:
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;"># Almost any Apache directive may go into a VirtualHost container.
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;"># The first VirtualHost section is used for all requests that do not
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;"># match a ServerName or ServerAlias in any <VirtualHost> block.
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;">#
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;">
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;">
</span><span style="color: #808080; background-color: #f7faff; font-style: italic;">
</span><span style="background-color: #f7faff;"><VirtualHost </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">*:80>
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;">DocumentRoot </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">/Users/andrewpalmer/Applications/MAMP/htdocs
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;">ServerName </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">localhost
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;"><Directory </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">"/Users/amdrewpalmer/Applications/MAMP/htdocs">
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">      </span><span style="background-color: #f7faff;">AllowOverride </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">All
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;"></Directory>
</span><span style="background-color: #f7faff;"></VirtualHost>
</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"><VirtualHost </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">*:80>
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;">DocumentRoot </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">"/Users/andrewpalmer/Applications/MAMP/htdocs/Sites/cms/web/"
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;">ServerName </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">cms.dev
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;">DirectoryIndex </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">index.php
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;"><Directory </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">"/Users/andrewpalmer/Applications/MAMP/htdocs/Sites/cms/web/">
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">      </span><span style="background-color: #f7faff;">AllowOverride </span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">All
</span><span style="color: #008000; background-color: #f7faff; font-weight: bold;">   </span><span style="background-color: #f7faff;"></Directory>
</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"></VirtualHost></span>

 

 

 

cms/web/.htaccess

<span style="color: #000080; font-weight: bold;">SetEnv </span><span style="color: #008000; font-weight: bold;">ENVIRONMENT </span>"<span style="color: #008000; font-weight: bold;">dev</span>

Thursday 16 April 2015 1:15:23 am

then in my URL i have to type in the following: (anything else I have tried doesn't work)

 

cms.dev:8888/Sites/cms/web/index.php

 

It doesn't even work if I have another / after .php

 

 

 

So let me know if you think it is worth re-installing. I would probably just set up another project and start again!!

Take care and thanks again.

 

Also thanks to twitter people who have helped me along the way:

@grahambrookins

@tcv_br

@ilukac

 

and I am @SymfonyCoda

Thursday 16 April 2015 2:04:59 am

Hello Berry, 

Thank you for re-joining the conversation here in the share.ez.no forums!

We know that pasting code examples in the forums is currently frustrating because of other technical issues which do not remove some formatting characters ...  would you consider posting your vhost config as a gist here in the forum thread instead (since in your last message the code is very hard to read and posting code as a gist is so much easier)?

Alternately another suggestion I make is that I -always- copy and paste my code examples into a plain text editor first and then copy and paste from the plain text editor into the forum message using the literal tag feature as this usually ensures the code posted in the forum is free of extra formatting the first time. This being just one of the tricks I've learned from years of using the forums here on share.

Thank you for your continued support!

Cheers,
Heath 

Thursday 16 April 2015 2:16:13 am

Hello Berry,

After some more thought and stripping the html from your incomplete vhost config share code example, at a glance I think you need to start by following the documentation regarding apache virtual host configuration: https://github.com/ezsystems/ezpublish-community/tree/master/doc/apache2

That would be a good place to start, doing things the right way.

I have a few questions that your answers would -really- help us all:

  • How are you installing eZ Publish?
  • What version of eZ Publish are you installing?
    • Composer only, community build from share.ez.no/downloads or github directly?

Another very powerful piece of documentation for those getting started to also study in detail: https://doc.ez.no/display/EZP/Installing+eZ+Publish+on+a+Linux-UNIX+based+system

Please consider answering these questions so we can give you the very best support possible.

Cheers,
Heath

Modified on Thursday 16 April 2015 6:01:22 am by // Heath

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from