menntarra_34 Posted September 19, 2010 Share Posted September 19, 2010 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. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted September 19, 2010 Share Posted September 19, 2010 Php simply outputs content (HTML, Javascript, CSS, media) to the browser. As long as that content it correct the browser can render it and display it. What is the actual php code being requested? Show the opening php tag that is in that file as well. Quote Link to comment Share on other sites More sharing options...
menntarra_34 Posted September 19, 2010 Author Share Posted September 19, 2010 these files are scrapers: opening and ending tags are: <html><body><pre><tt><?php ?></tt></pre></body></html> As i said this worked on my older(plesk) server, but not in this new(cpanel) server... Quote Link to comment Share on other sites More sharing options...
menntarra_34 Posted September 19, 2010 Author Share Posted September 19, 2010 I found the solution --> set "output_buffering=Off" in php.ini Quote Link to comment Share on other sites More sharing options...
menntarra_34 Posted September 22, 2010 Author Share Posted September 22, 2010 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.