Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

   

Reply
 
LinkBack Thread Tools Display Modes
Old 04-16-2007, 11:52 AM   #1 (permalink)
Inactive
 
Join Date: 10-22-06
Location: Gotham! Can't you tell from my avatar!?
Posts: 13
iTrader: 0 / 0%
Latest Blog:
None

marie6 is liked by many
Cpanel and Basic Authentication with Apache.

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

Any help would be greately appreciated!

Thank you in advanced!
marie6 is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-16-2007, 12:27 PM   #2 (permalink)
Contributing Member
 
Join Date: 04-16-07
Location: 3rd Planet from the Sun
Posts: 66
iTrader: 0 / 0%
Latest Blog:
None

bin_asc is liked by many
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
bin_asc is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-17-2007, 03:10 AM   #3 (permalink)
Inactive
 
Join Date: 10-22-06
Location: Gotham! Can't you tell from my avatar!?
Posts: 13
iTrader: 0 / 0%
Latest Blog:
None

marie6 is liked by many
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
marie6 is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-17-2007, 06:48 AM   #4 (permalink)
Contributing Member
 
Join Date: 04-16-07
Location: 3rd Planet from the Sun
Posts: 66
iTrader: 0 / 0%
Latest Blog:
None

bin_asc is liked by many
A yes, you probably have apache2, because of the suPHP. Please tell me in general what you are trying to do, so I may give more directions.
bin_asc is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-17-2007, 12:07 PM   #5 (permalink)
Inactive
 
Join Date: 10-22-06
Location: Gotham! Can't you tell from my avatar!?
Posts: 13
iTrader: 0 / 0%
Latest Blog:
None

marie6 is liked by many
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.

Here is a link to the password management user manual: https://www.paypal.com/en_US/pdf/installation.pdf

I found this site that explains a little bit more, but not enough to help me: http://paypaltech.com/SG2/Help/PERL/PassMgmtHelp.htm

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


Again thank you very much for the help
marie6 is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-17-2007, 11:27 PM   #6 (permalink)
Contributing Member
 
Join Date: 04-16-07
Location: 3rd Planet from the Sun
Posts: 66
iTrader: 0 / 0%
Latest Blog:
None

bin_asc is liked by many
Wink

Here`s the deal

.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

If you need more help and clarifing, do reply.
bin_asc is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-18-2007, 11:12 AM   #7 (permalink)
Inactive
 
Join Date: 10-22-06
Location: Gotham! Can't you tell from my avatar!?
Posts: 13
iTrader: 0 / 0%
Latest Blog:
None

marie6 is liked by many
Thank you,
I think that I’m getting closer to my goal with your help

But I tried again today, and there is still something not right.

This is what I did:

1. I created a folder called “members“

2. I made the .htaccess file in Notepad

This is what the .htaccess file contains (and I have of course replaced AuthName with my own site and AuthUserFile with my own path):

Quote:
AuthName "mysite"
AuthType Basic
AuthUserFile "/home/user/public_html/.htpasswd"
AuthGroupFile /dev/null

require valid-user
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.
marie6 is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-18-2007, 03:11 PM   #8 (permalink)
Contributing Member
 
Join Date: 04-16-07
Location: 3rd Planet from the Sun
Posts: 66
iTrader: 0 / 0%
Latest Blog:
None

bin_asc is liked by many
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.
bin_asc is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-18-2007, 03:31 PM   #9 (permalink)
Inactive
 
Join Date: 10-22-06
Location: Gotham! Can't you tell from my avatar!?
Posts: 13
iTrader: 0 / 0%
Latest Blog:
None

marie6 is liked by many
Quote:
Originally Posted by bin_asc View Post
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?

EXAMPLE:

AuthName = " Your website "
AuthType = "Basic"
AuthUserFile = "/home/<account name>/.htpasswds/.htpasswd"
AuthGroupFile = "/dev/null"

require = "valid-user"


And there is this:

Quote:
You need to put a line in .htaccess to tell the system where the php.ini file can be found
How would this line look in .htaccess?
marie6 is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-19-2007, 05:57 AM   #10 (permalink)
Contributing Member
 
Join Date: 04-16-07
Location: 3rd Planet from the Sun
Posts: 66
iTrader: 0 / 0%
Latest Blog:
None

bin_asc is liked by many
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 ).
bin_asc is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-19-2007, 05:59 AM   #11 (permalink)
Contributing Member
 
Join Date: 04-16-07
Location: 3rd Planet from the Sun
Posts: 66
iTrader: 0 / 0%
Latest Blog:
None

bin_asc is liked by many
I`m not even sure you`d need values in the php.ini and .htaccess. Order scripts like you have usually rely on the paths they have in the source code.
bin_asc is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-20-2007, 01:07 PM   #12 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,821
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
yeah er, moving to coding forum!
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-11-2007, 06:03 AM   #13 (permalink)
Inactive
 
Join Date: 10-22-06
Location: Gotham! Can't you tell from my avatar!?
Posts: 13
iTrader: 0 / 0%
Latest Blog:
None

marie6 is liked by many
Quote:
Originally Posted by bin_asc View Post
I`m not even sure you`d need values in the php.ini and .htaccess. Order scripts like you have usually rely on the paths they have in the source code.
Thanks again for all the help, everything finally worked as it should once I got my webhost to set up Basic Authentication with Apache
marie6 is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-11-2007, 06:05 AM   #14 (permalink)
Inactive
 
Join Date: 10-22-06
Location: Gotham! Can't you tell from my avatar!?
Posts: 13
iTrader: 0 / 0%
Latest Blog:
None

marie6 is liked by many
Quote:
Originally Posted by LazyJim View Post
yeah er, moving to coding forum!
My apologies for starting the thread in the wrong forum. Newbie error Won't happen again
marie6 is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-11-2007, 01:36 PM   #15 (permalink)
Contributing Member
 
Join Date: 04-16-07
Location: 3rd Planet from the Sun
Posts: 66
iTrader: 0 / 0%
Latest Blog:
None

bin_asc is liked by many
Good thing you fixed it
bin_asc is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms Authentication problem ASP.NET 2.0 AmberJo Coding Forum 5 01-03-2008 01:16 PM
IIS Subweb Authentication digest/integrated akseli Web Hosting Forum 0 08-29-2006 04:33 AM
Email Authentication And All That Jazz ... JohnG Marketing Forum 0 05-10-2005 11:29 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 10:39 AM.
© Copyright 2008 V7 Inc