Welcome Guest ( Log In | Register )



 
Closed TopicStart new topic
> Fopen Problem In Astahost, allow_url_fopen ON but not working?
hazeshow
post May 17 2005, 04:10 PM
Post #1


Premium Member
Group Icon

Group: Members
Posts: 230
Joined: 15-May 05
From: your sister
Member No.: 5,102



Hi there,

I have a code which grabs an xml-file from another location, reads it and puts the content into al local file. I use fopen, fwrite and fclose. The code goes like this:

<?php

$local_file = 'lala.xml';

$fd1 = @fopen ('http://www.example.com/lulu.xml', 'r');
while ($line=fgets($fd1,4000))

$alltext.=$line;

$fd2 = @fopen('lala.xml', 'w');
@fwrite($fd2, $alltext);

@fclose($fd1);
@fclose($fd2);
?>


On my Apache at home everything works fine. But it doesn't work on the astahost server. I thought all I needed was allow_url_fopen being set to ON and safemode OFF. As far as I understand the PHP information in my accounts phpinfo.php it should all work. Does anybody have an idea why the file is not written?

Thank U
Go to the top of the page
 
+Quote Post
overture
post May 17 2005, 05:11 PM
Post #2


Premium Member
Group Icon

Group: Members
Posts: 208
Joined: 6-September 04
From: England
Member No.: 315



You may have to change the lala.xml permissions to 777 to be able to read, write and execute the file. You can do that in the File Manager. that should work. biggrin.gif
Go to the top of the page
 
+Quote Post
hazeshow
post May 17 2005, 05:22 PM
Post #3


Premium Member
Group Icon

Group: Members
Posts: 230
Joined: 15-May 05
From: your sister
Member No.: 5,102



Sooooo cool! It works! Thank you very much, overture! I'm sooo stupid, I should have known that 777 thingy.

Thank U! wub.gif
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post May 17 2005, 06:04 PM
Post #4


PsYcheDeLiC dR3aMeR
Group Icon

Group: Admin
Posts: 2,242
Joined: 29-January 05
From: Nakorn Chaisri, Thailand
Member No.: 2,411
myCENTs:84.36



Issue resolved. smile.gif Topic closed.
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Mail Is No Longer Working?(10)
  2. Tomcat Version In Astahost(1)
  3. Subdomain Problem(3)
  4. Ssh Not Working...(2)
  5. Email Not Working In Outlook(3)
  6. Astahost Seems Slow To Update(7)
  7. Ip Address For My Site(3)
  8. Domain Name Wrong And Not Working(2)
  9. How Do I Promote Astahost (what Kind Of Banner) ?(4)
  10. Does Astahost Allow Http Put(7)
  11. Credits Script Not Working?(3)
  12. Could A New BBCode Be Added To Astahost ?(4)
  13. Forwarding Email(5)
  14. Drupal Not Working In Iexplorer(6)
  15. Errors On Astahost Forum(2)
  1. Asp With Astahost(8)


 



- Lo-Fi Version Time is now: 2nd December 2008 - 09:27 PM