cPnginx plugin does not allow execution of Perl files - perl

I had someone install cPnginx-10.7 on a cPanel server. As a result, whenever one tried to access any .pl scripts, the script would be downloaded instead of executed. I had to uninstall the plugin.
Is there a way to allow for Perl to be executed while using it?

I found 2 solutions:
1. In cpnginx admin interface from WHM change the domain to "Proxy" (Nginx proxy server in front of Apache). This slows down things though.
2. WHM > Install a Perl module, install Nginx (thus one can maintain a "hybrid" option for the domain.

Related

Unable to call cURL from perl in Unix

My project wants to download files on Unix AIX from the AWS platform. I am trying to call cURL from within Perl script to server this purpose.
I am getting an error
Can't locate LWP/Curl.pm in #INC. Haven't been able to find libcurl.pm and curl.pm in respective directory of perl installation.
The version of Perl being used here is 5.8.8. I have read about this error and found that it requires libcurl.pm (7.10.8 version) and curl.pm modules installed in Perl's module library.
Going forward there is a plan to use cURL in combination with FTPS in order to download files from AWS. I have also read WWW library should be used instead of LWP from cpan.search.org. Can you advise which is better?
Also, if you could list the prerequisites of using cURL from within Perl script please?
The LWP::Curl module needs to be installed
It doesn't require libcurl.pm or curl.pm; indeed, there are no such modules
It does require WWW::Curl::Easy, but that will ordinarily be installed automatically when you install LWP::Curl
There are very many WWW modules and I can't tell which one you mean
I would normally recommend the regular LWP as it is the "standard" way of writing an internet client, but I don't believe it supports FTPS, so LWP::Curl should do fine
To install the LWP::Curl Perl library, you need to have libcurl and the C header files on your system. The WWW::Curl::Easy module will build against those, and the build will fail if you don't have them
That is all you need
You may want to consider LWP::Protocol::Net::Curl, which is very similar to LWP::Curl but it is a completely separate module by a different author and with different dependencies. It hasn't been updated as recently as LWP::Curl, but it is designed and tested as another LWP:;Protocol plug-in which can replace the standard protocols leaving LWP to work as normal. LWP::Curl doesn't seem to be quite as compatible

magento . PHP extension "soap" must be loaded

I have shared server from domain.com
And when I try to install full package I get this issue : PHP extension "soap" must be loaded.
And I ask my customer service, he told me we can't solve this issue you must get VP host (VIP ) not shared server. Please help me to solve this issue.
Simply go in php.ini file and Find this code ;extension=php_soap.dll remove terminate sign like do it extension=php_soap.dll
I solve the problem by editing:
xampp\php\php.ini
and changing this line from:
;extension=php_soap.dll
to:
extension=php_soap.dll
In my case, only un-commenting extension=php_soap.dll line didn't work. My PHP version is 7.0 & i installed apt-get install php7.0-soap (used this because i'm using Ubuntu).After soap installation, it worked for me.
Although your question is very confusing, I believe to have understand partially what you need.
A shared server is one that other people are sharing with you. These are usually very cheap but you don't get much control over what happens there; specifically, you usually can't install stuff or have much freedom of configuration. These servers usually offer specific services (i.e., they already have PHP and MySQL installed, but you can't run, say, Ruby). You rarely (if ever) get shell access to such servers.
Dedicated servers are the opposite. You usually have full control over the machine's configuration as it's not shared with other users, but they are often way more expensive.
The reasons for this are clear: when a server is shared it's cheaper to the provider to keep and maintain a running machine, because several clients are paying for it. If you want/need a fully dedicated machine then you can manage it, but you have to pay it yourself. In this case, if you need to install PHP modules and your provider is denying you access, you must either find a provider that does allow it or find a dedicated machine. You're out of luck on that regard.
please go to this
*xampp\php\php.ini*
and find
;extension=php_soap.dll
remove the semicolon at the end and restart your appache server from the host server
On my XAMPP in php.ini this extension calls extension=soap

How to get/put files from SFTP server using Net::SSH::Perl module?

It might be simple query, but still I'm not clear regarding this.
In my script I'm connecting to SFTP client server using Net::SSH::Perl module. Previously I was using Net::SFTP but removed from the script, as all of a sudden it stopped working and throwing an error.
When I used Net::SFTP, most often I will use the below command to Put/get files from remote server.
$sftp->put("/home/ftpford/ftpcon/conout/$file","/Uti_Integrator/READYFORPICKUP/PENDING/$file");
But I'm not sure of how to get/put files using Net::SSH::Perl.
Can any one suggest? I have tried many ways and even I tried to search in Google but I'm not clear of any thing.
And please note that I don't have privileges to install new modules in my server.
I want to get/put files using the above Module.
I don't think that's a standard feature of Net::SSH::Perl.
One option is to use other modules that do (you don't necessarily need to install them in the system directories, you can have them in your own directories if you include them via PERL5LIB or use lib.
The other option (which answers your question stricto sensu) is to emulate it. You can try to simply run cat >$destination_file on the remote box via Net::SSH::Perl, and then send the contents of the file over the ssh connection.
Of course, error handling and the like might not be very straightforward...
BTW, you tell us you have tried many things, but you don't tell us which, and what problems you encountered.

How can I install Perl modules on a restricted server?

I have a server that I can ssh into but that's it. Otherwise it is totally closed off from the outside world. I'm trying to deploy some scripts I wrote to it but they have several Perl dependencies (Params::Validate, XML::Simple, etc.) I can't get them via yum since our satellite server doesn't have those packages and the normal CPAN install won't work either since the host is so restricted. Moving the module sources over and compiling is extremely tedious. I've been doing that for over a day, trying to resolve dependencies, with no end in sight. Is there any way around this? Any help is greatly appreciated.
If you can, set up a parallel system as close as possible (as far as architecture, and perl version) to your closed system, and install all your dependencies there into a separate lib directory using local::lib. Then you can simply scp over that directory to your closed system, and again using local::lib (and setting up some environment variables), your code will be able to utilize that directory.
See this, it explains multiple methods that you can use to get CPAN modules into production.
Have you tried cpan minus? If not, here's how to get it.
curl -L http://cpanmin.us | perl - App::cpanminus
You can use it with local::lib. :-D
Chromatic has a great post on how to even get a newer(and multiple) version(s) of perl onto a restricted system.
If you can change your hosting provider, this would be a good time to switch ;-) (I personally think Linode rocks!).
Assuming that is not the case, you can try to go with the option of setting a parallel system as #Ether suggested.
On the other hand, if the modules you are using and their dependencies are pure Perl modules, you should be able to use PAR::Packer to package your script and its dependencies and scp a single file over to the host.
I use SSH tunneling to tunnel from the remote server back to a local proxy server. That way you can install whatever Modules you need.
Just set the http_proxy variable to the local port that is remote forwarded (If that makes sense) from your local machine.
i.e.
ssh user#remote -R 3128:proxy_ip:3128 (for a tunnelling a Squid setup)
then on the remote server in cpan
o conf http_proxy=http://localhost:3128
o conf commit

How to set up local repository for PPM?

I am using Active Perl and am looking for ways to set up a local repository to install various modules. Main reason behind is the production server has no internet access.
Can anyone point me any quick start or step-by-step tutorials on this?
There is a tutorial on how to install from a local repository (manually) here
There are descriptions how someone did it here (perlmonks) and here (perl.com)
To use the GUI ppm manager most likely requires a httpd (a.k. web server) that gives PPM access to the *.ppd and *.tgz files over http. I'm not sure I'd choose that over doing it from the command line.