Someone has asked me why there php file which is working as a javascript file is not working.
Ive tested on about 20 different servers including local computer and I cant replicate his error.
His error is:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.3 (CentOS) Server at domain.com Port 80
Ive got one of my servers on debug mode and no errors are coming from it what so ever.
Does his server need something activating, or installing to make this work?
Even when I remove any code within the file it still gives a 500 error.
So does this mean his site can not run with a php extension within the script like so:
<script type='text/javascript' src='http://domain.com/services/wp-content/themes/themename/js/sharrre.js.php?ver=1.0'></script>
The code within the file is:
header('Content-Type: text/javascript');
$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require( $parse_uri[0] . 'wp-load.php' );
$urlpath = get_stylesheet_directory_uri() . '/js/sharrre.php';