We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Multiple requests in the bootstrap file (not the favicon issue)

Just saw an interesting question on SO: https://stackoverflow.com/questions/49665253/php-phalcon-handling-request-and-printing-site-content-makes-functions-run-mul

Tested myself and indeed in the index file multiple requests are made, while only 1 reaches the controller. Debugging myself, hope I can find the truth!

Anyone is welcome to share opinion and thoughts :)



93.7k
Accepted
answer
edited Apr '18

On the dev version of the site I tested, there were 3 broken images, which made the additional requests. This confused me in first place! After fixing paths, from 4 requests they went to 1. Everything is fine!

Conclusion: make sure to double check for broken asset links!

they answered the question and said there was a missing CSS file, which makes Phalcon Router attempt to find a controller and probably fails at that point. Not sure what your scenario is.

I know, explained in the comment above :)