News:

LVCS.NET offers low cost domain registration services.

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - webzone (archived)

#226
@sixthcrusifix

if the variable is undefined, it probably means that the query failed. i'm going to look closer to the code.

@ghost

to include a single quote inside a string delimited itself by single quotes, I need to escape them.
ex : $variable = 'UPDATE userbase SET password = \' (escaped single quote) ' (delimiter)
#227
I think I found your problem.

You are doing a query and using the value mysql_query returned directly. mysql_query only returns a resource identifier that is designed to be fetched afterwards.

Try this :
$query2=mysql_query($SQL2,$conn)or die("SECOND QUERY FAILED");
$result2=mysql_fetch_object($query2);
$LPW=$result2->password;

To free memory you could also add :
mysql_free_result($query2);
#228
Quote from: ghost on November 30, 2005, 01:31:01 AM
$SQL1 ="UPDATE userbase SET password ='$NEW_PW' WHERE username = '$lostpw' '';

You dont need double quotes on the variables.. just the outside, which makes it easier.

My solution didn't use double quotes, but single quotes, this is why they had to be escaped. I agree that your solution is simpler, but mine is faster to process (single quotes are always faster).
#229
Try this instead :

$SQL1 = 'UPDATE userbase SET password = \''.$NEW_PW.'\' WHERE username = \''.$lostpw.'\'';
#230
Support Requests / Re: Encrypt and . . . DECRYPT!??!
November 30, 2005, 01:10:37 AM
That is the whole point of MD5 by the way. Then, you are sure that nobody can decipher your password (almost sure).

If you want to check if a password that was provided (let's call him x) is valid by comparing it to the database, just encrypt x and compare it to the encrypted value in the database. A given password will always produce the same value when encrypted with MD5.

You may also consider to use SHA-1, as MD5 is getting easier to break everyday.
#231
Support Requests / Re: Email and Domain names, HOW?
November 29, 2005, 09:14:35 PM
Basically, you can host your website at freepgs and have your mail hosted elsewhere. Just set your A records to point to freepgs and your MX records to point to the mail exchanger of your choice.

There are a few alternatives I could tell you about :
- You could contact the admin to try to get an e-mail address for your account (not sure, he may accept but I never tried so I don't know);
- You could use a service like Live Domains (domains.live.com) by MSN to host your email by setting your MX records appropriately.
- You could try to use ZoneEdit (www.zoneedit.com). I use their service for one of my domains. Once I pointed my domain to their nameservers, I could choose to foward e-mail messages I receive to the address I select.
#232
Support Requests / Re: Webmail is not available?
November 29, 2005, 10:46:50 AM
Quoteshall I remove  MX records?

If you want to receive mail at your domain, you need MX records. You could try to point them to mail.<yourdomain.com>
As the admin said, you also need to add an A record for the webmail subdomain.

Or, you could simply point your domain to the Plesk nameservers (NS) at plsk1.lvcs.net and plsk2.lvcs.net. This way, you would not have to set A and MX records for your domain, as Plesk would do it by itself.
#233
Support Requests / Re: htaccess
November 29, 2005, 03:51:26 AM
you're welcome
#234
Support Requests / Re: htaccess
November 29, 2005, 02:37:28 AM
mod_rewrite is enabled.

Changes I made in the code below :
- Added an [OR] between two RewriteCond
- Simplify your rewrite code a bit so it will run faster
- Added PNG as a protected extension

Try this :

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$ [OR]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?freepgs.com/pinkness(/.*)?$ [NC]
RewriteRule \.(gif|jpg|png)$ / [F,L]


Both examples were originally provided, but the first one seems to be buggy. The second one works :

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^(http://(www\.)?freepgs.com/pinkness(/.*)?)?$ [NC]
RewriteRule \.(gif|jpg|png)$ / [F,L]
#235
Support Requests / Re: htaccess
November 28, 2005, 01:14:46 AM
not sure what you mean by direct linking... if you mean hotlinking (another site using your image inside their page), it is getting harder to block.

many software and devices are now removing or garbling the referer header which is used to allow or block hotlinking. i must also say that blocking hotlinking may cause problems with google image search.

i know this info won't help you a lot, but it may help you reconsider this "protection" which is generally useless.
#236
Support Requests / Re: PHP4 ?
November 27, 2005, 06:28:16 AM
oops. just noticed the mistake.
#237
Support Requests / Re: PHP4 ?
November 27, 2005, 06:06:32 AM
PHP 4 has obviously less features that 5, so it would be a downgrade...
Anyway PHP 4 is only there as a maintenance release, that is : it is only updated for people who still need to run that version. To my knowledge, the recommended version is 5.
#238
Support Requests / Re: Domain Name Problems (Totaly LOST)
November 22, 2005, 02:37:25 AM
even if the freepgs control panel says your files are accessible through your domain, it might not be true.
if you had added your domain to your account before the fire (Oct 10), you'll need to add it back if you want everything to work fine

you can add your domain back at that address : http://system.freepgs.com/options.php?sec=doms
#239
i think he meant "undecided"
#240
Support Requests / Re: document path
November 21, 2005, 08:50:50 PM
If you're on the freepgs server, then it is /fpgs/fpgshttpd/username/

If you're on plesk, it is /home/httpd/vhosts/domain-name/httpdocs/ like in /home/httpd/vhosts/example.net/httpdocs/
If you have subdomains on plesk (like something.example.net), it is  /home/httpd/vhosts/example.net/subdomains/something/httpdocs