FTP help please :-)

Discussion in 'Software' started by LukusWesley, Jun 26, 2007.

  1. LukusWesley

    LukusWesley Private E-2

    Hey guys, whats up? I've been a long time fam of Major Geeks... however this is my first post... hard to believe huh?? Not really... let me quickly explain before I begin with my question. The reason I never have to post is b/c this site is so great that I can ALWAYS find my answers without even having to ask them... Thank you Major Geeks :)

    Okay, on to my issue...
    (I'm a computer programmer, I should have to be asking questions, I should be answer right.... RIGHT :) ha ha.)

    I'm hosting a web server for the first time b/c I'm getting married in October and want to host a website for the wedding (*plus it impresses her ;)
    -All has been going well.. but I've hit a little bump in the road.

    First is first.. I bought a flash template... I'm not creative enough to make my own. Modification has been a learning experience, and pretty easy actually. The template includes a php file and also an asp file... I know that these files are used for the "guestbook". Let me explain... on the site, there is a guestbook, people can post to the guestbook and I'm assume that it auto updates on the page.... I've been told that I have to upload those files to my webserver in order for them to work...

    This is where my confusion sits...
    I believe I have a misunderstanding of what uploading is. I thought that since I'm my own web server, that making a root directory for my website was simply enough. I thought that you have to upload to a webserver if you don't have access to it... like if someone else was hosting and i wanted to upload to their webspace.... but since I have my own... I didn't think there was a need to upload... I'm realizing thats not true. I have been told from where I bought the template that in order to test the guestbook, I have to upload the directory for the guestbook, which includes the php file.

    NOW, I have downloaded Serv-U... setup was pretty dang easy. I ran out of time to mess around with it... and I'm not sure how to even use it!!

    SO this leaves me with a few questions.... Can someone explain to me why I have to upload my files if I am the webserver? I have put the webpage in the root directory for my website and it works perfectly fine.. I can access the web page as well as pictures via my domain... I never uploaded those... BUT I guess the only way for the guestbook to work is to upload them..

    Any help you guys have to offer is greatly appreciated!!!! And if helped... I'll be sure to share my knowledge with anyone else that needs it...

    Thank you so much in advance :) SORRY for the long post!

    Oh yeah... I hope I've posted this in the right place.. if not... feel free to move me!
     
  2. LukusWesley

    LukusWesley Private E-2

  3. Mada_Milty

    Mada_Milty MajorGeek

    Okay, if you're doing the hosting, you're right... no need to use the FTP protocol when you have Windows Explorer (or equivalent)

    Not sure what Serv-U is... is this your webserver software?

    You'll need to have PHP installed on the webserver for PHP extensions to work.

    We'll need some technical details of your server. What platform? What webserver software? Version numbers, plugins, etc, etc...
     
  4. LukusWesley

    LukusWesley Private E-2

    Thank you!! Very usefull info!
    However, not sure how I'll go about doing that :) Info on how to do that may be helpful!!

    Thanks again. Now I know I'm not going crazy. I was second guessing whether or not I really knew what uploading was!

    Don't worry about it. Its software to set up an FTP server, but we don't need that now :)

    Windows XP Pro
    IIS

    And as far as version numbers... I'll have to wait till I get home from work. Not on the server now. BUT, I'll get that other info asap. Maybe you have enough info to figure something else out :)

    Figured it would be important to let you know this... when I click on the "send" button for the Guestbook... it tries opening the php file... BUT it prompts me to save, or open... I'm guessing this is because I dont have PHP installed like you said earlier... BUT, just thought I should let you know.

    If necessary... LET ME KNOW... I can give you the URL of my site... and you can actually SEE what I'm talking about... that might be helpful huh... let me know!

    THANK YOU AGAIN for you generosity in helping me.
     
  5. Mada_Milty

    Mada_Milty MajorGeek

    Slick! PHP comes in a build that will automatically configure itself for IIS.

    You can access the download page at this link - I believe that it is the 'installer' download you want.

    For installation reference, see:

    http://ca3.php.net/install.windows
     
  6. LukusWesley

    LukusWesley Private E-2

    Very nice!!! Thank you so much!!!

    I'll be home in about 3 hrs or so.... I will get to work on that as soon as I get home... We'll see what happens...

    Until then... Was there any additional information that you would like me to seek out when I get home or do you just want me to try installing php and see what happens?

    Thanks again!
     
  7. Mada_Milty

    Mada_Milty MajorGeek

    Nah, I think we've covered what we need. Let us know if you have any troubles!
     
  8. LukusWesley

    LukusWesley Private E-2

    Thank you again!
    I downloaded php last night... and seems to be working... have to tweak a few things to really test it, but I'm sure I won't have a problem with that.

    If I do have any questions I'll let you know. Thank you so much for your help!
     
  9. LukusWesley

    LukusWesley Private E-2

    Okay... a couple of questions now that I have time this evening to work on this a bit. I installed php. Didn't seem to have a problem with that.

    However, when I put a test post to my site, a window pops up and says message sent successfully however I have yet to get the email. I could be misunderstanding how its supposed to work. SO, we'll do a couple of things here....

    First.... here's the url to my site.
    www.lukentori.com

    if you click on the 4th pic... its the guestbook page (*forgive me for the filler info, yes its a template I'm modifying :) No where near complete yet)

    Just put in some info, whatever you'd like.. and click send. You'll see that little contact letter window pop up. I'd like to make that guy a little prettier.. I'm assuming I can modify that but I don't want to mess up the php code. I'm gonna post the code in my contacts.php file and see what you think.

    contact.php file
    -----------------------------------------------------------
    <?
    Error_Reporting(E_ALL & ~E_NOTICE);

    while ($request = current($_REQUEST)) {
    if (key($_REQUEST)!='recipient') {
    $pre_array=split ("&777&", $request);
    $post_vars[key($_REQUEST)][0]=$pre_array[0];
    $post_vars[key($_REQUEST)][1]=$pre_array[1];
    }
    next($_REQUEST);
    }



    reset($post_vars);
    $subject="From ".$post_vars['your_name'][0] ;
    $headers= "From: ".$post_vars['your_email'][0] ."\n";
    $headers.='Content-type: text/html; charset=iso-8859-1';
    $message='';
    while ($mess = current($post_vars)) {
    if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {

    $message.="<strong>".$mess[1]."</strong>&nbsp;&nbsp;&nbsp;".$mess[0]."<br>";
    }
    next($post_vars);
    }

    mail($_REQUEST['recipient'], $subject, "
    <html>
    <head>
    <title>Contact letter</title>
    </head>
    <body>
    <br>
    ".$message."
    </body>
    </html>" , $headers);
    echo ("Your message was successfully sent!");

    ?>
    <script>
    resizeTo(300, 300);
    </script>
    -----------------------------------------------------------

    Okay... can someone take that code and show me where I can modify it?? look at the Contact letter window that opens up when you click send and compare it to this code to see whats going on. I figured everything that would show up in that window would be what is between the <html> tags. But notice that echo("Your message was successfully sent!") shows up too.. maybe you have a better assessment.

    ANYWAY :) I did a test entry and haven't recieved the email yet... I'm supposed to recieve an email when they click send right??? Don't worry, I've made sure that my email is in the Active code for the flash movie. I know that parts right... :)

    Thanks for your help.. let me know if any of this confuses you or you just have further questions!!

    THANKS!!
     
  10. LukusWesley

    LukusWesley Private E-2

    After looking at that code for a little bit... it almost looks like it is supposed to auto update the webpage ( you see the posts on the right side of the page ) .... hmm not sure... I dont know php but I'm sure if you know php this is pretty simple code...

    Anxious to see...
     
  11. LukusWesley

    LukusWesley Private E-2

    Here is what it looks like when you click on "send"... looks like somethings wrong :(
     

    Attached Files:

  12. Mada_Milty

    Mada_Milty MajorGeek

    At a glance, it appears to be some minor syntax error - possibly something as small as a missed bracket.

    I'll try to find time later to review the code in detail.
     
  13. LukusWesley

    LukusWesley Private E-2

    Thank you again Mada... you've been so helpful!!
    Its a good thing b/c when I contact customer support of the people I bought the template from they just aren't that helpful. They're telling me that its either my hosting service doesn't allow php... (*which you and I both know thats not true) or service provider doesn't.....

    BUT I'm like you, looks like a syntax error to me!! And I've never coded in php!! Thank you again Mada... when looking at the code... you might show me where I can add code to make that thing look a little bit better... Remember, the link to my webpage is here also :) Thank you again!!!
     
  14. LukusWesley

    LukusWesley Private E-2

  15. Mada_Milty

    Mada_Milty MajorGeek

    Heh, so I've had to give myself a bit of a refresher on my PHP.

    The tutorial I'm reading can be found at this link. This will likely come in handy to you as well.

    Here's one thing I found to check:

    Can we add this just to make sure this isn't the problem for us?
     
  16. LukusWesley

    LukusWesley Private E-2

    Now we're getting somewhere :)

    That definitely made a difference... however, it apprears that there are still a few things wrong with the syntax!!

    We're getting warmer....

    Thank you for you help!
     

    Attached Files:

  17. LukusWesley

    LukusWesley Private E-2

    This may help.....

    Your message was successfully sent!<script>
    resizeTo(300, 300);
    </script>
    PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in C:\weddingwebsite\contact.php on line 15
    PHP Warning: current() [<a href='function.current'>function.current</a>]: Passed variable is not an array or object in C:\weddingwebsite\contact.php on line 20
    PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 503 5.5.2 Need Rcpt command. in C:\weddingwebsite\contact.php on line 37

    I viewed source of that output window..
    Hope it helps!!
     
  18. Mada_Milty

    Mada_Milty MajorGeek

    Okay, so the first two errors are stating that the functions we're using don't like the parameters we're passing here:

    and here:

    Which is weird, because $post_vars SHOULD be an array of the fields carrying your form data. (If I haven't seriously misread your code) I'll look into a way of finding out what data/ datatypes it is trying to pass.

    As for the SMTP error... I'm afraid I won't be much help there. I assume you've installed the SMTP component of IIS? Have you also configured your PHP.INI file accordingly?

    Kinda grasping at straws there. Your mailserver is returning an error code, so you probably have configured it correctly (especially considering that the PHP installer should have done the work if you had the SMTP component running at the time of install). I'll see what I can find off work-hours.

    In the meantime, I guess I should show you how to change the appearance of your popup window before I forget again.

    In this function, you can put CSS, or attributes in the HTML tags to get the appearance you want. Treat it like normal HTML code. This will be sent to and rendered by the client browser.
     
  19. Mada_Milty

    Mada_Milty MajorGeek

    I was thinking about this, too, and I would be livid if I received this response. That's a total brush-off. If you want, you might try making a page with this script:

    Code:
    <?php
    phpinfo()
    ?>
    This will output all the technical details of your platform, and your PHP install. This will prove to them that your PHP install is functioning correctly. Just a thought in case you want to approach them for support again.
     
  20. LukusWesley

    LukusWesley Private E-2

    Okay Mada... thank you again... I must say... DUMMY ME, I haven't done these. Like I said... I'm a total newbie when it comes to this self hosting thing!! SO, there is one of our problems!!!

    I promise I didn't forget about our post! I'm CRAZY busy at work today unfortunately and I have barely found time to even check that you had responded.... I'll get back to our convo when I get the time to. In the meantime... I'm see what I can do about getting the above you've mentioned set up. If you have a link to something that might help that would be great... if not, don't spend much time on it, I'll find something to help....

    Thanks again... I will look into this as soon as I can.
     
  21. Mada_Milty

    Mada_Milty MajorGeek

    We may be in luck. IIRC, the SMTP component is installed by default when you install IIS.

    We can confirm by checking in Control Panel --> Add/Remove Programs --> Windows Components --> Internet Information Services --> Details.

    Or, I might suggest making a page using the phpinfo() function again. This should output the details of (or absence of) both your mailserver setup, and the php configuration. Two birds with one stone, if you will.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds