Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am developing a wordpress theme and I want to use jQuery.load() to load data from a PHP file in my theme directory called process.php to a div in a wordpress page template.

I haven't had any issues with load() in the past but Wordpress is preventing me from loading the data or even accessing the process.php file in the browser.

When I navigate to the full path of the file (eg: http://[site]/[theme]/functions/process.php) I get the following error in Chrome

Internal Server Error. The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, **@gmial.com 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.`

I've read similar questions but they involve modifying the .htaccess file. Does anyone know how to do this from a theme perspective ie: using $wp_rewrite.

EDIT

Linux Server error log states

    [Mon Mar 12 14:00:52 2012] [error] [client 121.98.81.237] SoftException in Application.cpp:245: File "/var/www/vhosts/****.co.nz/httpdocs/npr/wp-content/themes/_s_2/functions/process.php" is writeable by group [Mon Mar 12 14:00:52 2012] [error] [client 121.98.81.237] Premature end of script headers: process.php

and this is process.php

<?php 
echo "hello from php";
?>
share|improve this question
    
Take a look at the questions in here: ajax. Read about localize script and admin-ajax.php. –  kaiser Mar 12 '12 at 1:29
add comment

1 Answer 1

up vote 0 down vote accepted

You might find this informative, not sure if it will cover what you need but it explains a lot about front end Ajax for WordPress which is not exactly intuitive and it might help you out. In particular you probably need to understand how admin-ajax.php works.

share|improve this answer
    
Thanks for that I'll read up more on admin-ajax.php –  JackMahoney Mar 14 '12 at 23:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.