View Full Version : Help - have I broken my site?!
shellbe
June 27th, 2007, 11:30
I wanted to put a form on my website, so I found something on the net and followed the instructions... it asked me to run a test.php file which I did - the whole form thing didn't work for me so I deleted the other two files I had created (contact.php and sendeail.php) but can't delete the test.php at all.....
... so I do a search and see that this could help hijackers! Please help me get rid of this as I am really concerned now!
Thanks so much
Shell
the_pm
June 27th, 2007, 17:05
Log into your site via FTP, right-click on the test.php file, view its properties, and see whether the owner/group names are the same as your account name. If not, then you wouldn't have permission to delete the file (though they should be proper if you were the one who uploaded it in the first place).
Ask your server admin to restore ownership to you, and then you should be able to delete it :)
chaos
June 27th, 2007, 18:13
On a similar note, is there an easy way to delete these ProFTP error files I get from time to time? When uploading batches of pictures to one of my sites for Coppermine, occasionally I will decide to cancel the transfer early. This usually results in a file with a "invalid" filename (it's an error file). I can't delete it via FTP for this reason (apparently), and while I am not sure how it got there to begin with, I can go into CPanel and delete it using the file manager. I'll see if I can't find an example of the file name, but I would really like to be able to get rid of those via FTP.
inimino
June 27th, 2007, 21:55
I can't delete it via FTP for this reason (apparently),
FTP can can be used with any filename that can exist on your server. This may be a bug in your FTP client, but it's not a problem with FTP itself. If it happens again, you might try a different FTP client. It could also be a permissions or ownership problem like the OP.
chaos
June 28th, 2007, 01:00
Well, I am using FireFTP for Firefox, so it's not exactly the best in terms of quality. I just use it because it's fast, easy, and it works. I normally use Filezilla myself, and that has never given me issues. I was just wondering how the FTP client can manage to make an error file that it can't even work with??? :lol:
Tjobbe
June 28th, 2007, 12:32
Jamie recommended FileZilla to me, it works a treat!
http://filezilla.sourceforge.net/
shellbe
June 28th, 2007, 18:27
Panic over - managed to delete the file.... stupid forms - it's the one thing that I can't figure out - if anyone can help, I'd really appreciate it. I've taught every other aspect of html, css etc myself, and forms, making them work - it ain't happening for me!
the_pm
June 28th, 2007, 18:48
Forms can get a little tricky, because the scripts necessary to process them typically process at the server level, using a server-based platform, such as PHP, ASP, ColdFusion or PERL/CGI.
If this is a form meant to send you email, I recommend FormM@iler (http://www.dbmasters.net/index.php?id=4). It's easy to set up and it's secure :)
shellbe
June 28th, 2007, 20:13
I have heard about the server side of things, and am keen to learn at least how to do that for a form - as it looks more professional than having a link to an outside form (if that makes sense?)
Thanks for the link, I'll give it a go!
shellbe
June 28th, 2007, 20:14
I've got php professional, and trying to learn that with some online tuturials that I found... if I could get the server side of forms set up I'd be a happy bunny.
Any tips to get me started on that would be cool.
Thanks too for the link to formmailer - will give it a looksee.
chaos
June 28th, 2007, 21:07
Forms with PHP are very simple if you understand the core concept of "handing off" variables as I think of it.
http://www.w3schools.com/php/php_intro.asp
more specifically:
http://www.w3schools.com/php/php_forms.asp
shellbe
June 28th, 2007, 21:27
Thanks for those links Chaos - will check them out too
shellbe
July 2nd, 2007, 17:25
Can anyone help me sort out the php side of a form? I'm kinda desperate to do this - I see so many on the web and I figure it can't be that hard? Any help, on the forum or privately is really appreciated!
Thanks
Pattons3rd
July 2nd, 2007, 18:39
Do you just want it to send to your e-mail?
shellbe
July 2nd, 2007, 18:56
That I do, Pattons - I've got the form, just don't know how to have it sent to my email!
I want to learn how to do the script side, as the "free" ones have links, which I don't think look professional - plus I like to be able to do things for myself (with a little help as well ) :D
chaos
July 2nd, 2007, 19:16
Well, I find that if you wanted to learn how to make your own you should start by looking at what's in a free script. I don't see what's wrong with links, and sometimes they look more professional. Something like FormM@iler has way more than just emailing in there, but also has code checkers/protection to keep your Server Safe. I myself don't even understand much of that script myself, but for handling is easy as I said before. About all I know is that you will have your for point to a PHP script, and have the action be either Post or GET. Then you will name each element of the form so that it can be sent through the data stream to the server. Let's have an example where your form consists of a textarea called "text'.
Now in this PHP script you will have lines looking like:
$Text=$_GET['text'];
This means that your PHP script now has the text from the textarea usable for processing. You can do fun things with it like Email it (if you knew the functions). A simple example as to how to use it would be:
echo $text;
Now the user will see a their text when they click submit.
Someone else will have to explain the other hundreds of code required :lol:
shellbe
July 2nd, 2007, 20:29
I have been looking at the script and figuring out what different things do - which is a start! I can see from the free scripts that it is a complex process and probably beyond my capability of self-teaching!!!
But thought I'd ask for help anyway :)
Pattons3rd
July 2nd, 2007, 20:53
I think one of the simplest ways if you don't care too much is the mail() function.
Of course there are lots of other things you could do.
$to = "you@yourisp.com";
$subject = "Mail from your site!";
$message = $_GET['msg'];
mail($to,$subject,$message)
As long as this sort of thing is enabled on your host it should work on its self.
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.