Jump to content

What do i have to change to make php show in iframe window...


Recommended Posts

Hi,

My problem is the following:

I changed webserver, and i also changed to cpanel instead of plesk. And now my websites function does not work. Let me explain it. It is an Iframe window, where by two javascript buttons i can trigger specific php files to be run and echo in this iframe window. The problem is that i don't see a thing, Nothing is showing up, however the phps run fine, but i can't see there "echo". Here is some code that maybe useful in the understanding:

 

the iframe on the site:

code]<iframe name="iframe_window" id="iframe_window" width=600 height=400></iframe>[/code]

 

This bit of javascript triggers the phpfiles:

 

document.getElementById('iframe_window').src = "_"+php_file+"?overwrite="+overwrite

 

I know that there is something to do with the php.ini, so some php configuration is not right, but i don't know what to change. In fact i checked the most important parts of the php.ini, and they are the same as it was on my old server, where this script ran just fine.

Link to comment
Share on other sites

ACTUALLY I HAVE TO ADD VERY IMPORTANT THING TO THIS!!!

It failed to work for me again, so i just started to investigate the matter, i found the problem: Compression of the file which you want to send continuous echos, should be disabled, you can do this by the following procedure:

 

Add this line to your .htaccess file:

SetEnv no-gzip dont-vary

 

If you want to turn off gzip for a specific file only, you can use this:

 

SetEnvIfNoCase Request_URI MY_FILE_NAME\.php$ no-gzip dont-vary

 

Obviously change MY_FILE_NAME to the name of the file.

 

I tested it, it works!

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.