I recently moved my website over to a Windows based server. I had some PHP scripts that worked flawlessly under Linux, but now seem to be having trouble working in Windows. Any clue as to what may be happening here? The scripts used to retrieve information from another website, then store it, now it doesn't do that it just returns blank space. Could it be a connections setting? or a permissions setting? Anyone have a clue?
That's where it all went wrong... Most often, I found, it's to do with file paths. Windows uses C:\folder\file.ext whereas Linux uses /var/folder/file.ext so check your include paths etc.
file_get_contents() doesnt work in Windows in certain versions unless im misunderstood. There are several functions that isnt included in the windows php that doesnt work. Why downgrade your server?
Windows IS easier to manage... which is why it's not used that much as a web server OS, Linux is a much more stable and secure OS because of the fact that it's not easy to "manage" There are certain functions that either work differently or not at all on Windows, unfortunately there's no definitive list since there are different versions of Windows and different versions of PHP. For the most part any function that requires a specific module/library (like GD for images) won't run on Windows (or if it will, you need to tweak the hell out of Apache or PHP and sacrifice a goat or two). GD, for example, has come embedded into PHP for at least a couple of years and even then I can't for the life of me get the damn thing to work.
Well I changed it back to *.nix. Scripts still aren't working. It must be something in the servers setup that's not allowing it to work properly.
This is the reason why, retrieve remote information using PHP requires the fetch data function that is not understood by Windows. Instead you would need to use request.QueryString runing an ASP page Windows servers are easier to manage because no need to grant permisssions like on *nix platforms, in addition to MS-access databases, best solution that MySQL, IMHO.
As I said. I changed back to *.nix, yet script still isn't working. **I'm on a different server than before.**
Oh, I missed that part, but I have seen you are on a server using plesk (error shown a few minutes ago signing up at your forum) Plesk (like the other control panels) give the server admin the ability to disable functions. Your hosting provider may have banned the fetch function to save on bandwith. Contact customer support to ask if fetch function is enable before keep trying with scripts.
Yes I'm having trouble with FTP right now. It's on a dedicated server. Just got it and I'm still messing around with setting it up. Plesk just messed up my FTP settings some how and now I can't connect to the website via FTP. Back to the scripts..... So I'm guessing I'd have to edit some conf file in order to get it running fine. Any idea as to which file that would be?
There are no errors. I really can't show the script because it is custom code that I wouldn't like for anyone to see. I mean I know it's not the script itself. It's something to do with the server setup. Because he script does work on the other server (old server).
It seems like it was a configuration issue afterall. I upgraded to 4.4.2 and now most scripts seem to be working fine.