Website Crash

Post

Posted
Rating:
#2329 (In Topic #473)
Not sure what's going on. But overnight my website has crashed, for lack of a better word.
Themes (all, including admin) are not showing up correctly. Started with not being able to login with chrome or IE, but can login with firefox, then after a couple of hours the themes went all haywire.

Here is what i did to try and fix the error:
  • Clear cache etc from webtools in admin, then even that stopped working.
  • Switched between my theme and stock theme. Same display issues.
  • Rebuilt permissions using fixperms.sh in ssh.
  • Ran decache.sh via ssh.
  • Changed from  php 7.1 to 5.6
  • Turned off cloudflare.
  • Disabled opcache while in 7.1.
I am scratching my head on this one.

Post

Posted
Rating:
#2330
Weird. Site is kinda back up.
But still unable to login with chrome or IE. Can with firefox.

Have the following in the error log:

 Uncaught Error: Call to undefined function escape_header() in /sources/ajax.php:33

and in the error_log file:

[12-Apr-2017 13:50:01 Australia/Sydney] PHP Notice:  Undefined index: SCRIPT_FILENAME in /home/xxxxxxx/public_html/sources/global2.php on line 35

 

Last edit: by Paul Flavel

Post

Posted
Rating:
#2339
Sorry I couldn't respond earlier, having a rough day here too.
Please try this:

Code (php)

  1.  

My guess is some kind of unusual reverse proxy has been set up on your hosting. It's triggered a bug in our CORS code which is a very obscure thing.
I'd better write a unit test for that.

As for the other issue, it is also very weird. It may be a blip. But I'm investigating.

Post

Posted
Rating:
#2340
Not a problem at all Chris.
The new ajax file fixed the issue. Wasn't sure if it was something with the shared server or composr so didn't post this in the tickets area.

Hope your day is getting better Chris…… Thankyou again.

Post

Posted
Rating:
#2341
I just spent a chunk of time looking at the second problem, hoping to improve PHP a bit.

PHP :: Doc Bug #74424 :: $_SERVER documentation page needs improvement.

Now let's see if I can incorporate my findings into our code to get more accurate patch-up of the data PHP provides us.

Post

Posted
Rating:
#2342
Thankyou Chris,

Sorry for opening that can of worms……

Post

Posted
Rating:
#2343
Ok, I finished my big review, changes in the next patch release:
https://github.com/ocproducts/composr/commit/a940cc7d1b6677ea56ea28c58ce1fb80a667a0ba

PHP can be annoying sometimes, but I'm glad I did this. I'm much more confident about our code staying correct now that I fixed PHP's documentation and have that to refer to in the future.

Post

Posted
Rating:
#2344
Chris. Not sure if this is related. Not seeing anything in the error logs.
When I go to edit a block in the side panel and click save, it doesn't save, it just sits there on the ajax popup with the loading image.

Post

Posted
Rating:
#2345
That's difficult for me to comment on. Someone would need to open the browser's developer tools, go to the network tab, then see what the raw request data coming back from the frame is (it's a frame, not AJAX actually).

Post

Posted
Rating:
#2346
Or, there could be something in the JS console.

Actually I'm wondering if there is some kind of cross-domain situation going on here and causing all of this, is it possible you're accessing the site from something different to what the base URL says? Composr normally redirects but maybe it's some kind of special case.

Cross-domain scenarios break JavaScript code.

Post

Posted
Rating:
#2347
Checked my settings, all seems correct.

error_log

[13-Apr-2017 10:50:02 Australia/Sydney] PHP Notice:  Undefined index: SCRIPT_FILENAME in /home/xxxxx/public_html/sources/global2.php on line 35

 

Post

Posted
Rating:
#2348
If you want me to take a look, email access to chris@ocproducts.com.

Post

Posted
Rating:
#2349
Just noticed:

error_log

[13-Apr-2017 10:50:02 Australia/Sydney] PHP Notice:  Undefined index: SCRIPT_FILENAME in /home/xxxxx/public_html/sources/global2.php on line 35

Post

Posted
Rating:
#2350
Ok. This is tricky because the fix here goes across tonnes of files. I've attached the affected files, as fixed by my patching.

Ideally don't upload files that aren't already on your server (some of these may be in addons you don't have installed, although if you do it shouldn't cause harm.

Attachment

SCRIPT_FILENAME_FIX.tar

Post

Posted
Rating:
#2351
Seems to have fixed the issue in the error_log.
However still having the javascript issue. Not saving blocks in the

Inspected via javascript console in firebug. Nothing in warnings, errors etc.

Post

Posted
Rating:
#2352
Received the following when opening a block for edit. Via firebug

Post

Posted
Rating:
#2353
I wonder if emptying the template cache will fix that.

Post

Posted
Rating:
#2354
Tried. No luck

Post

Posted
Rating:
#2357
Maybe you could record a quick Jing screencast to show me? Working for me on your site, but you're probably doing it a little differently.

Post

Posted
Rating:
#2358
Have not used jing before, what a great program

ERROR: A resource, -1, requested within some Comcode (the attachment tag) does not exist.
7 guests and 0 members have recently viewed this.