TinyPortal
Development => Support => Topic started by: jacci on July 22, 2007, 06:05:26 PM
Hi there, i am having a very bizzare issue with a require statement at the moment.
I have two SMF with TP installed now, and i have duplicated the skins on the two of them. Yet on one of them, if i put my require statement it, it pretty much wipes out the rest of the forum from loading under the require statement. Yet, i have the exact same thing coded on my test site. Of course, it is the live site that is screwing up.
http://www.pretendercentre.com/testsmf/index.php
it is a random quote script to pull math formulas which display just under the news and it is working perfectly fine on test site.
yet here on my actual site it is a complete disaster
http://www.math.net.au/forum/index.php
if i use the EXACT same coding in the same skin i downloaded from the test site and then installed on my live site i get this.
(it is the formula in the little box right under the news item)
echo ' <div align="center">'; require('http://www.math.net.au/quotes.php');echo '</div>' ;
i have checked and rechecked and rechecked the coding again and it is identical to the working one. Any ideas what might be causing it to work on one install and not the other? Could there be some setting i need to tweak. I have checked chmods on both and the are the same.
this is baffling me to no end, any help woudl be appreciated
thanks,
jacci
I believe that your problem may be related to a PHP setting for allowing files to open through HTTP:
Check PHP.INI for 'allow_url_fopen' - the setting can be either "on" or "off" (without the quotes), such as:
allow_url_fopen = On
This will allow PHP to load files through URLs; use at your own risk, as this is reduction in security because content from external sites (scripts) can now be processed.
As a better alternative, place the quotes script on your new server and refer to it through a relative path. That is secure, and doesn't rely on the original server to be up and running, so the script will always place the quote.
ohhhhhhhh you are my hero!!!!!!!!!!!!!!!!
thankyou sooo much. ;D
i did as you said with the relative path and like magic it fixed!!!! This has been driving me nuts.
I want to use the script in a number of places so figured the url would be easier, but clearly that is not the case at all.
you have restored my sanity (at least momentarily :2funny: )
Glad to help. 8)