• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved How to enable .sphp extension on Plesk

Nilton Santos

Basic Pleskian
Hello Everybody.

I have one question.

My cliente want to execute .sphp extension by browser.

How to enable .sphp extension on Plesk to execute on browser?
 
You need to add a handler to your Apache configuraton. This can be done either in the Apache configuration section of the Plesk GUI or in an .htaccess file. It should look like this, if it is based solely on the file extension

<FilesMatch "[^.]+\.sphp$">
SetHandler HANDLERNAME
</FilesMatch>

HANDLERNAME is the handler that you want the file to be processed by, for example cgi-script. I do not know the file extension .sphp, thus I don't know what handler this requires.

As an alternative you can add a MIME type handler in .htaccess like this example:

AddHandler application/HANDLERNAME .sphp

But again, you need to know what the HANDLERNAME must be replaced with for .sphp files.
 
Dear Support,

We are performing a migration of our own domain, that runs on a server with PHP 5.2, CentOS 5.11 and Apache / 2.2.3.

On the Production Server, we've executed scripts with extension .sphp.

The necessary settings for the operation, is to make the configuration in the file: /etc/httpd/conf.d/php.conf according to the follow configs:

#
# Cause PHP-CGI handle files with .sphp extension.
#
AddType application / x-httpd-wphp .sphp
Action application / x-httpd-wphp / cgi-bin / php-cgi

With these settings, the .sphp file runs on the production server.

How do we perform this configuration on our Plesk server?

We have a server in test environment and we don't get what is wrong with the plesk and the old system.

We have already migrated all content, however when performing tests in the .sphp script, he not executed, just performed the download of the file.

Additionally, we have already performed tests inserting the line:

"AddHandler application / x-httpd-wphp .sphp" in the .htaccess file and the add a MIME type handler, however, even if you make these settings, the content of the file are displayed in the browser instead of being executed like you can see below


Example:

Info.sphp is printed in the browser:

<?
Phpinfo ();
?>
 
Hello my friend Nilton Santos.

To resolve your customer's problem, try the following:

Through the Plesk Panel go to:
Domains > domain.tld > Apache & nginx Settigs

In "Additional directives for HTTP", paste the following lines:

<Files ~ (\.sphp$)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .sphp
Options +ExecCGI
</Files>

rafaelPlesk.png

I hope this can help you! :)
 
Hello Rafael,

This solution worked very well, that's exactly what we were looking for.

Thank you very much, my friend.

Congratulations.
 
Back
Top