0

After the system upgrade, I found out that the websites hosted on my machine were down.

So, first of all, my apache2.conf file was restored to default (and I had to modify it again). Secondly, site-available files now must have the extension '.conf', so I had to rename all of them and use a2ensite to enable them again.

Next, one site shows a console error

ReferenceError: $ is not defined

I know it seems that the site isn't loading jQuery properly, but it worked before and stopped after upgrading, so I guess something else has changed. The upgrade affects jquery too in some way I cannot see?

UPDATE: seems something related to php. Jquery was called in a separate page, called through a require('pagename') and the required seems not to be interpreted.

Sasha Grievus
  • 223
  • 2
  • 11

2 Answers2

1

More likely than the upgrade affecting jQuery is that the browser is trying to load jQuery, but receives a 404 (or similar) response from the web server, perhaps due to some configuration in Apache that's no longer valid.

You likely updated to Apache 2.4+ in this server upgrade. This update comes with a bunch of changes - some of the popular ones are outlined here: https://stackoverflow.com/questions/19481660/403-error-on-apache-for-a-laravel-project-after-upgrade-to-ubuntu-13-10/19482358#19482358

fideloper
  • 353
  • 3
  • 11
  • Yep, the problems lies there. Just a few minutes after posting i found out that php may be involved. I'm still investigating, thank you very much! – Sasha Grievus Feb 01 '16 at 14:55
0

The problem was about upgrading the php version. The website, I was talking about, was very old and yet there where '< ?' short tag for php that has been substituted by '< ?php'. There's a good answer here:

http://stackoverflow.com/questions/5121495/php-code-is-not-being-executed-i-can-see-it-on-source-code-of-page
Sasha Grievus
  • 223
  • 2
  • 11