0

Am trying to access a text file from one apache server to a other but i get following error

Warning: file_get_contents(http://popx.mplayer.biz:7999/web-cronjobs/data/updates/updates_today.txt) [function.file-get-contents]: failed to open stream: Connection refused in /home/mplayerb/public_html/index.html on line 227

but yet i can access the file just fine by typing url into my browser

<?php $updates_file = 'http://popx.mplayer.biz:7999/web-cronjobs/data/updates/updates_today.txt'; ?>

i added the popx.mplayer.biz to my host file on my 2nd apache server were am getting file from but i still get connection refused can anyone help me solve this please thanks alot.

3
Contributors
7
Replies
19
Views
3 Years
Discussion Span
Last Post by Simon180
0

i think thats just Daniweb messing the click url up copy the url as text it should work

0

Create a new PHP file and upload to the server where you are running the script above.

    <?php

        echo (ini_get('allow_url_fopen')? 'It is On' : 'It is off');

Direct your browser to this file. It should print "It is On" or "It is off".

It is On ? your PHP.ini file is good. You need to focus on troubleshooting your script.

It is Off ? Set allow_url_fopen directives to on . This can be done by editing the php.ini file.

If your Server API is apache module, you can set it to on by adding this on your .htaccess file in the root directory.

    php_value allow_url_fopen On

If it is a fast CGI or any derivatives of CGI, you can pretty much create a new file called php.ini file and upload it to the directory where your script is running.

    allow_url_fopen = On;

SECURITY WARNING!
Sometimes allow_url_fopen directives creates a security issues, when set to on. I strongly suggests to use cURL instead.

0

ok yes iamthwee i see now there a DNS issue i will fix this and get back to you give me few mins

0

i dont have php installed on my solaris server I will install it and see what happens

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.