Symfony Web Profiler not working - php

Yesterday my Web Profiler stopped working, in Symfony v.3.0.9 (on Win, with WAMP, PHP v7.0.4). Before that it worked just fine and I'm not sure exactly what happened when it stopped.
I first checked the JS errors being reported, then possible errors in dev.log, then tried clearing the cache (with cache:clear), also as an admin and also manually in file system. Nothing helped.
There are no errors returned anywhere and there are no tries from client side to even call it with AJAX. I tried restarting Apache, Wamp & Windows.
Then, I tried composer update, which naturally brought up some new, unrelated issues, and eventually I ended up installing Symfony 3.1, but still no sign of Profiler.
My HTML page does have a body, so the solution here: Web Profiler not showing up in dev doesn't help me. All other mentions of this problem usually lead to some compiling issue, which I don't have (or didn't find it yet).
I also made sure I am running in dev mode, by putting breakpoints in app_dev.php directly.
Has anyone any other/new idea what could be going on?
Addition: I also tried updating Symfony to 3.2, without Profiler appearing.
Addition #2: Just wanted to share, that the only way I can get my Web Profiler to show is, after the cache is rebuilt, go into the var/cache/dev/appDevDebugProjectContainer.php, into the getProfilerService() function and manually comment out the line with:
$instance->disable();
Ugly as hell, but I haven't find any other solution until now. At least, now I see that somehow Symfony decides, based on some internal logic, to actually not show the profiler. At least there is some logic at works.

The final answer to my "mysterious" issue was that someone in the team changed the profiler's setting in the config_dev.yml, and set the:
framework:
profiler:
collect: false
Getting that back to collect:true (which is also its default value) made it all work.

Related

Magento 2 Apache random 400 errors

Firstly I know how to deploy and work with files, I don't need answers saying 'redeploy static content' or 'clean cache' - experience from the research.
We having an issue on our development server. We have tested it with multiple projects, versions vary from 2.1.5 to the 2.2.3 open source.
After steps below we are receiving random 400 errors on some files (1-10 files). All those files are .js.
FUN PART:
After trying to get that file again (open in new tab) - everything is working fine, file is there, nothing bad.
After trying hard refresh again - again errors, but on other files.
After multiple soft refreshes (F5) - it looks good again.
Deployment mode - Developer
Steps to reproduce
Install Magento without Sample date (tested with 2.2.3) - nothing configured.
Set deployment mode Developer
Deploy static content or just clean /pub/static/
Chrome/Firefox - Inspector->Network tab->Disable cache (CHECKED)
Clear site data on the browser.
Create a product - for testing.
Go to the website and then to the product (no errors even after hard refresh).
Add product to the cart. (no errors even after hard refresh).
Go for example to the category. (errors even after hard refresh).
After clearing site data - everything looks fine again.
We have reproduced this on multiple pc's / webbrowsers.
Server info:
PHP: 7.1.16
APACHE: 2.4.33
DirectAdmin 1.52.0
Debian: 8
Any suggestion what to do or what to check/change will be useful (except a stupid ones, no one likes those)
P.S. I was not sure if I should post it here or magento.stackexchange.com
Or if I can post on both websites at the same time.
Good morning all
After all we have found an issue. It was an apache module : mod_ruid2
After it was disabled - no more random 400 errors has appeared.
I hope this anwer will help someone even if this is an uncommon issue.
To turn the module off, you need to do the following steps in the command line:
cd /usr/local/directadmin/custombuild
./build set mod_ruid2 no
./build apache

symfony2 "Erroneous data format for unserializing user entity" (FOS UserBundle)

I develop in symfony2 but am no sym2 wiz, brought in help to set everything up with the framework, and now it's throwing me a sudden error message I can't resolve.
I have two development environments, and one that I hadn't been using for a couple of months suddenly hit me with this error message upon trying to log in to my sym2 webapp locally:
"Erroneous data format for unserializing [user entity]"
I have not changed the code for logging in, I have not updated my vendors, and I have not changed any settings in MAMP (could it have updated itself though and done that?)
I don't understand what is going on.
I can google the error and I am suggested to hack one of the vendor source files. I would not know exactly what I would have done, so I am not comfortable with doing that just following some step-by-step instruction.
The application is running on symfony 2.3.9 and MAMP is set to PHP 5.6.27, the other option is 7.0.12 which produces the same error.
Ok, I changed my doctrine version to
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
and it resolved the issue. Now I don't know what other issues THAT might have introduced seeing sym2 isn't always too backwards compatible, but fingers crossed =)

Symfony debug toolbar is displaying, but not working

My Symfony debug toolbar (v1.3.7) is appearing correctly but clicking it generates a javascript error.
Looking through the source code, I can see that the javascript for the toolbar is not being sent back to the browser. I have another project set up on the same machine which uses Symfony v1.4 and this works fine.
This project is also set up on one of my colleages' machines and it is working fine. The project itself is also running without problems.
Any ideas what might be causing this issue?
You probably didn't correctly link the assets in your web root.
You need to copy/symlink/... /path/to/symfony/data/web/sf to /path/to/project/web/sf

Magento: Page won't stop loading in admin/system_config/edit/section/design

I was using Magento 1.4.1 and upgrade gracefully to 1.4.2. After testing if the upgrade was Ok, I made some modification in order to have a new home page layout for a store using these instruction. The modifications have been tested on a local version (Ubuntu 10.04, php 5.3.2), and worked great.
When I upload the files to the pre-prod server (Centos 5.5, php 5.2.14), and access the System->Configuration->design tab in the admin backend, my browser seems to keep loading indefinitly.
What I have done:
I copied the app/code/core/Mage/Page/* directory to the app/code/local/Mage/Page/;
I created the app/etc/modules/Mage_Page.xml, and defined the codePool to local;
What I have already checked:
I got no errors in /var/log/httpd/*.log;
I got no errors in magento's var/log/system.log;
The frontend works fine;
The backend can be accessed, except the System->Configuration->design tab;
I tried to revert my modifications to a revision before the modification were made (using svn);
I cleaned up the cache using rm -fr var/cache/mage* var/session/* directly on the server;
I restarted the server multiple time;
I even tried to get a dump of the db in production on the preprod server, with no effect. I still got the same issue.
If someone could point out anything I could have forgot.
I am ready to try anything to make it work, since it would not affect the production server for now.
After a lot of searching, we finally tried to reboot the apache server (we had to force it to reboot, I don't know why?). When we retried, everything was working as expected.
There probably was a corruption on the server that made crash only this tag.
Hope this could help someone.

Breakpoint not firing using PHP/XAMPP/NetBeans/Moodle

Bit of an obscure one this. My setup is all running on my local Windows machine; I've got NetBeans IDE installed, a local XAMPP server with XDebug running, and an installation of Moodle with some custom addons in the mod directory.
I can happily create breakpoints in PHP pages (including the main Moodle ones), but any breakpoints I place on php files in the mod directory never fire (on my mods, or any of the inbuilt ones). I thought Moodle might be doing some "magic" to display files in the mod directory, but my browser shows the url as http://localhost/moodle/mod/view.php - and that's the file I've set my breakpoint in.
Has anyone got any experience with debugging Moodle addins, or could possible point me in the direction of how to troubleshoot the breakpoint not firing? I've tried the Moodle site, but can't find anything relevent.
Actually, I think I've figured it out. If I tell it to debug that particular file it will 404 (it doesn't put the directories in, guess it's a bug), but if I then manually go to http://localhost/moodle/mod/view.php?XDEBUG_SESSION_START=netbeans-xdebug (which errors, no parameters are being passed in), and THEN manually navigate to Moodle then my mod breakpoints fire correctly.
All very bizarre, but it seems to be a usable workaround. I'm guessing the mods are running under some kind of different PHP session.
I'll keep this answer here in case anyone else has this bizarre problem.

Categories