简体   繁体   中英

TinyMCE Javascript File 500 Internal Server Error on Production Server

I have a website made with CakePHP, with a plugin I made modified from CakeDC TinyMCE plugin

This all works well on my development server, but when I upload to production (HostGator) the TinyMCE textareas do not load correctly, and the Console shows X GET .. path_to_TinyMCE_JS_File.js

My other plugins work fine so not a plugin loading problem

I know I have the paths etc correct as when i load a test.js file into the same folder and navigate to that I can see that file contents

When I navigate to the js file, I should be able to see the JS text, but it 'renders' as an empty file/blank page. In the console it tells me I have a "500" Internal Server Error

I have re-uploaded the JS file and it seems like it should be fine (right file size etc). Permissions seem okay (0644).

I'm using TinyMCE 4.0.26 (I did try uploading the latest TinyMCE JS and got the same 500 error) via the CakeDC TinyMCE CakePHP Plugin , CakePHP 2.3 (I think..)

I'm not sure what to try next, any help much appreciated

if you are getting a 500 error, the only logical thing to do is checking the error logs on your server. The location of logs changes depending on your web-server software and os. But by default on linux/apache you can find your error logs under /var/log/apache2/ if you open up your related error log with;

tail -f /var/log/apache2/[your-site-name]-error.log 

then simply refresh the page from the browser to see the latest logs of errors. That way, you will be able to identify the problem. If you cant identify it yourself, just copy/paste the error here.

Yay, have finally found the solution here!

The problem here is that in HostGator php Short Tags are on by default. There is a

I had to modify my php.ini file on HostGator to turn off short tags, all good now!

This post is what got me over the line: Why is the JavaScript file parsed as PHP in my Cake plugin?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM