0

I am currently using version 3.4.5 of phalcon with which I use the Debug component. But the problem is that the CSS and JS files associated with the Debug component are not loaded (error 500). You will find below my code that I use to call the debug component:

<?php
error_reporting(E_ALL);

$debug = new Phalcon\Debug();
$debug->listen();

// my code here withtout try/catch clause

Below, you will find the errors returned in console.log : Error 500 returned by CSS and JS files associated with the Debug component

Thanking you in advance for the help you could give me

1 Answer 1

0

The resources for Phalcon 3.4.x's Debug (That is CSS/JS) are no longer live. The domain changed, breaking compatibility with 3.4.x. You have a couple options at this point to 'fix' this:

  1. Upgrade to At Least Phalcon 4.0, if Not 5.0
  2. Ignore The Errors. They just mean the debug screen will not be pretty, but the information is still there.
  3. Call setUri on the Debug Class and change the base URI it tries to load from. The only issue with this would be that I doubt the files still exist, and where they are if they do. You may have to resort to self-hosting old copies and then calling your copy. You can check the newer versions of Debug.zep in the source code to find out.

Typically, I just ignore it (Option 2).

1
  • For the first solution I have already considered it but since my project is large I did not favor this solution for the third solution I tried to setUri to a [github.com/zVPS/phalconphp-debug-assets] (github repository) containing the assets files of the Debug component (I didn't want to store them locally because my project is heavy and I didn't want to make it even heavier) So I think I'll go with solution 2 until I realize solution 1 (phalcon migration). Thank you for your help
    – Mathieu
    Nov 24, 2022 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.