chrometweaks.org

Any body can help me to insert picture in php iPage web hosted by xoops?

Click Here To View All Answers...


First question I have is Any body can help me to insert picture in php iPage web hosted by xoops? Hoping for any response. Second question of mine... Hi there,.

I'm kinda new in oscommerce and have to write a script where I need to automatically create accounts. I only can't figure out how I can encrypt the password the right way..

I found the function tep_encrypt_password($plain) but it needs tep_rand(). I can't find this one, only a method with parameters max and min. If I use this one the result isn't correct. The result varies everytime 2..

How can I fix this? Someone with help please?.

Robbeke..

Comments (8)

That's a good question. I'm not sure what is the right answer. I'll do some poking around and get back to you if I find an useful answer. You should email the people at iPage as they probably could give you help..

Comment #1

Doesn't work. Oscommerce uses MD5 encryption in combination with an own algorithm...

Comment #2

You need to us this function from catalog/includes/functions/password_funcs.php.

$out = tep_encrypt_password($in);.

Try some forum searches I saw someone made a VB version they claim worked...

Comment #3

I found this function and when I copy it to my phpcode it everytime generates another result. It uses tep_rand() function or so, I can't find it.

..

Found the VB.NET code, but can't do much with that...

Comment #4

An MD5 algorithm WILL generate a different result each time. That's what it is supposed to do ! - What else do you expect if you pass it a RANDOM number ? .

The result generated by an MD5 consists of two parts. In order to verify a string / value that has been hashed by MD5, you feed the first part of the original MD5 result back into the algorithm along with the string / value you are trying to verify. If the strings / values match then you should get the same result..

Rich..

This post has been edited by.

CMOTD.

: 05 October 2004, 11:07..

Comment #5

Interesting read this... but I have NO idea what your all going on about! lol..

Comment #6

Create the account via the admin area contribution for creating an account and placing manual orders, then email the customer to have them click on a link to login, sending them to input their email address and let the system generate the password automatically for them...

Comment #7

Not precisely..

Md5 will generate the same result every time it is fed the same input..

The tep_encrypt_password() feeds the md5 a different (randomized) input every time it's called..

Basically, it creates a 2-char random "salt", prepends it to the user-selected password, md5-encrypt this, and stores in the customers.customers_password field the md5_result:salt..

If you want to generate osCommerce compatible passwords that will be repeatable, you should choose your own 2 hex-digits "salt", lets say "ce"..

Now you store in customers.customers_password: md5('ce'$plain_password)':ce';.

This will generate repeatable, oscommerce compatible passwotrds..

(didnt try it, this is my understanding of the code. also, I am not sure I understand what are you trying to do exactly).

Hope it helps.

Arod..

This post has been edited by.

Arod.

: 05 October 2004, 12:42..

Comment #8

Many thanks arod, that was what i'm looking for..

I'm going to try this..

Comment #9


This question was taken from a support group/message board and re-posted here so others can learn from it.