htaccess + auto_prepend_file failuere

#1
Hi, I have searched the forum and could not find other topics about this problem so I hope someone can help me.

In the /www I have a htaccess file containing the following:
php_value auto_prepend_file ../design/header.php
php_value auto_append_file ../design/footer.php

and it works fine, my problem is that when I call a page "list.php" located in /www/callback folder via "$("#show").load("callback/list.php");" so problems arise.
*
in callback folder is a htacces file with the following content:
php_value auto_prepend_file none
php_value auto_append_file none

and even to the rims htaccess file in the callback folder should not throw design of the file list.php then throw the design of anyway via htaccess file from the /www

It has worked in the past when we used Apache as web server, I hope there is someone who can help me :confused:
 

webizen

Well-Known Member
#2
...
and it works fine, my problem is that when I call a page "list.php" located in /www/callback folder via "$("#show").load("callback/list.php");" so problems arise.
...
Please elaborate how you call list.php. What script language is this "$("#show").load("callback/list.php");"?
 
#3
sorry, the page is in php with javascript

<div id="show"></div>
<script type="text/javascript">
jQuery(function($) {
$("#show").load("callback/list.php");
interval_stats = setInterval("$('#show').load('callback/list.php');", 5000);
});
</script>
 

NiteWave

Administrator
#5
not clear about:
and even to the rims htaccess file in the callback folder should not throw design of the file list.php then throw the design of anyway via htaccess file from the /www
can you be more specific ?
 
#6
htaccess file in callback folder has:
php_value auto_prepend_file none
php_value auto_append_file none
ie. files in this folder are not put on design.

However, the files in callback folder is being put design on by the htaccess file from the www folder, this did not happen on apache.

it seems like the htaccess file located in the callback folder has no effect as soon htaccess file from the www folder is loaded
 
#8
Files in the callback folder has to be loaded by this script

<div id="show"></div>
<script type="text/javascript">
jQuery(function($) {
$("#show").load("callback/list.php");
interval_stats = setInterval("$('#show').load('callback/list.php');", 5000);
});
</script>

when the files is loaded and showen in the div is has the design 2 times, first time on the file test.php in the www dir, and design again on the file list.php in the www/callback folder (where the htaccess file is set not to apped the design.

 
Last edited:

NiteWave

Administrator
#9
here's testing source code: /test.php
PHP:
<script type="text/javascript" src="jquery.js">
</script>
<div id="show"></div>
<script type="text/javascript"> 
jQuery(function($) {
$("#show").load("callback/list.php");
interval_stats = setInterval("$('#show').load('callback/list.php');", 5000);
});
</script>

the result is expected:
--- design header ---
--- callback/list.php -----
--- design footer ---
 
#10
I do not understand why it teases with me if it works with you ... how does your htaccess file in the www folder and the callback folder?

Do you have something special in your server config?
 

NiteWave

Administrator
#11
/usr/local/lsws/DEFAULT/html>cat .htaccess
php_value auto_prepend_file ../design/header.php
php_value auto_append_file ../design/footer.php

/usr/local/lsws/DEFAULT/html/callback>cat .htaccess
php_value auto_prepend_file none
php_value auto_append_file none

/usr/local/lsws/DEFAULT/html/callback>cat list.php
PHP:
<?php
echo "--- callback/list.php -----<br>";
?>
just what you've suggested.

check:
http://php.net/manual/en/configuration.changes.php
You will need "AllowOverride Options" or "AllowOverride All" privileges to do so
 
Top