I ask this because a client's hosting service will not be able to offer PHP with 'FastCGI' and 'Opcode cache (APC, Wincache)', only PHP with suPHP.
Will this be good enough for the latest version of Revo?
-
☆ A M B ☆
- 2,213 Posts
Hello,
If you have a high traffic site then using FastCGI and APC would be the ideal configuration, however for most websites (especially on shared hosting) you will find suPHP which works fine for any version of MODX. It's actually our default configuration.
-
☆ A M B ☆
- 24,524 Posts
Those are not limitations. suPHP is the only way I'll work; if a host doesn't have it I'll find one that does.
"su" means "switch user". Normally a .php script is run as the Apache server user (that can be www, apache, nobody, or whatever user is assigned to the Apache service). This means that if you want the .php script to be able to write files, such as saving images or writing to cache files, the folders and files you want to write to must be "world writable" so that any user can write to them. These files and folders belong to your user (your FTP or domain control panel user), so if a script being run as another (Apache) user needs to write or delete anything, these things must have world-writable permissions. Definitely a security problem waiting to be exploited.
What suPHP does is "switch user" from the calling program's user (the Apache user, or whatever web server is being used) to the owner user (you). Thus files and folders can have permissions that allow everyone to read them (after all, the web server does have to be able to read the script files in order to run them, and has to be able to read your folders in order to find the files in the first place) but only the owner to write to them. Since the user gets switched to the owner when the script is executed, this means it will be able to write cache files and image files, handle file uploads, and any other file-management functions your script is written to perform, but even if some other user does manage to get access to your server's files he won't be able to insert nasty little bits of code into your files or upload malicious files into your folders; only your user can write to them.
MODx works just fine with any form of suPHP, whether an Apache module or with PHP run separately as CGI or FastCGI. In fact, it works even better, since that allows the MODx Manager's file manager to work to its full potential, allowing for uploading files and editing .css and snippet configuration files. As far as system-based caching, MODx provides its own caching, so you shouldn't see any great difference in performance.
-
☆ A M B ☆
- 2,213 Posts
Hello,
It's unlikely you will have any problems using suPHP, while FastCGI/APC can be helpful for high traffic website you aren't looking at enough traffic to have any problems.
The use of suPHP is mainly security related, it allows hosts to track down malicious users among other things.
Thank you for your kind replies AMDbuilder, and Susan thank you for the eye opener, you learn new things every day and today's lesson was great XD.
I'm so glad I was wrong, looking at suPHP as a "limitation", I'm actually anxious to start working with this server now XD, thanks again.