-
☆ A M B ☆
- 24,524 Posts
Thank you! That totally helped me get to a solution... which was:
- adding a php.ini file to the root level of the server with this in it:
allow_url_fopen = 1;
Problem solved.
Cheers!
-
☆ A M B ☆
- 24,524 Posts
Keep in mind that the directory-level php.ini files are not inherited; every directory that has a .php file that gets executed needs one. In the case of MODx, that means the root directory and the manager directory, since everything else is included into their index.php files.
Thanks for your help here. However, it looks like I spoke too soon.
The solution appeared to work but only for a bit. Now it’s back to throwing the error.
I checked with the hosting company - the server does have allow_url_fopen turned on.
I also tried adding a copy of that php.ini file to the /manager directory.
No luck.
So... any other ideas about what could be causing the error?
Cheers.
Have you checked PhpInfo() to confirm that allow_url_fopen is really off?
Is the file on your own server or somewhere else?
Yes - I just checked using PhpInfo() and allow_url_fopen is really ON.
The file is on our server.
Can you just give the path to the file rather than using a URL in the file_get_contents() call?
Also, check the permissions and ownership of the file.
This is the file it’s trying to open:
http://usr-52.starnet.md/in.php
You could search your snippet code for that to see where the call is being made.
Also, take a look at line 136 of that index.php file. It’s possible that your site has been hacked.