I'm trying to set up a Basic Authentication with Apache, I need this in order to install a PERL scrip to ensure Password management to member directives on my website.
The webhost I use offers the Cpanel controlpanel, and the usermanual to the PERL script I want to install tells me to use commands like CHOWN, PICO, TOUCH etc. I can't seem to find anywhere to type these commands. And Now I'm feeling more and more lost.
I'm also told to find the Apache configuration file httpd.conf, but I can't seem to find this file. Can anyone point me in the direction of this file in Cpanel?
The subscription I'm trying to install is Paypal Subscriptions and Recurring Payments with password management. If anyone has any experience with or know how to do this proparly, please let me know.
I tried it today, by paying myself for a subscribtion and the payment went through and I got my generated password to the website, but could not log in.
And that is not a good thing once I get costumers on my website.
So there is a mistake made somewhere, probable because I cant get to and alter the Apache configuration file httpd.config
You would need root privileges and be connected through SSH to use pico, touch and others.
Usually the httpd.conf file is located : /usr/local/apache/conf/httpd.conf
Thanks for the answere bin asc, but the file isn't there.
I finally got a reply from my webhost, and they told me to create a php.ini file
Quote:
Because we use suPHP to parse php files, you have the option of using a custom
php.ini file.
Your account can have multiple php.ini files on your account in different
folders so you can customize the php processing in different folders should
your script require it. A php.ini file will not inherit down into subfolders,
however, you can create a .htaccess file in the same folder as the php.ini file
and place the following code into it:
suPHP_ConfigPath /home/username/public_html
I'm still unsure what content I should put in the php.ini file. The user manual for the the PERL script, does not say anything about php.ini
Thank you so much for helping me! I appreciate it very much!
I am trying to set up PayPal Subscriptions Password Management
and PERL script so that people can subscribe to an area of my website. The reason why I would like to use Password management is so that the costumer gets his/hers username and password generated straight after they have made payment.
So far I have done what the manual said; created a new folder called Members and created these folders within that folder; .htaccess, htpasswd and .processed_txns (these files are as of yet empty since I don’t know what to put in them )
I have also uploaded the PERL script to my cgi-bin folder (like the manual said).
And now I’m even more confused because I don’t know where I should place the php.ini file and what it should contain
.htaccess = used for password protecting the directory
.htpasswd = used for storing the usernames and passwords of the members
>the touch command is really the command to create an empty file
>the chown ( change owner ) is used for changing the user of the file, again not needed since it says the passwd file needs to be the same username as your account, so you`re ok with that
>pico command is merely like opening a file with the editor, so you can just edit the file and then upload it to the ftp
As for the perl packages ( SSLeay and the rest ), ordinary hosts should have it
Should I have the full URL to my site as AuthName?
3. .htpasswd (empty file) Should I add anything to this file?
4. processed_txns (empty file) Should I add anything to this file?
5. Uploaded the PERL script (Paypal.pl) to cgi_bin
When I run a test by subscribing to my own site everything runs smoothly, I get paid and I get my username and password. The problem starts when I try to log in to restricted area on the website with my username and password. It does not work!
I wonder if I have the wrong permissions on the .htaccess, .htpasswd and processed_txns files? I set the permissions to 666 on all these files, is that right?
Should I change permissions on the PERL script file? I have set it to 644.
The perl script doesn`t need more permission, you could try a 755, but I don`t think it`s necesary. If you`d like, send me a private message, and I can have a look over the settings. Also, the .htpasswd doesn`t need to contain anything, the perl script should update it. Also, you need to modifiy the perl script to tell it where the .htpasswd file is. Waiting for your reply.
The perl script doesn`t need more permission, you could try a 755, but I don`t think it`s necesary. If you`d like, send me a private message, and I can have a look over the settings. Also, the .htpasswd doesn`t need to contain anything, the perl script should update it. Also, you need to modifiy the perl script to tell it where the .htpasswd file is. Waiting for your reply.
I'll try to set it to 755. I set everything to 777 in pure frustration earlier today, but that is probable not a good idea Anyway it still did not make a difference.
I just got a new reply from my webhost, but again not enough info At least not enough for me
Quote:
You should create a php.ini file. You need to put a line in .htaccess to tell the system where the php.ini file can be found
But what goes in the php.ini file? The content that was originally intended for the .htaccess file?
Dunno what he means, I don`t think that`s even possible. It is possible however to change php values by uploading a php.ini file to the public_html, or your root folder. You can change php values with .htaccess using the php_value format :
php_value name value ( you change the name with ex session.path , value - put the real value there ).