Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Location
    Charleston, SC
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How Can I Start Server Side Scripting?

    I am a beginning WEB developer, and I would like to get to know a little bit of a server side programming language such as PHP to build a guest book. I found out that I need a server, so I downloaded Apache, from apache.org. Unfortunately, the comments were very confusing, and I ended up deleting it. I don't have a domain name, but I heard it's possible to have a small server on your computer. Currently, I don't have a web domain, so if preferable, I would like to keep all of my scripting in My Documents.

    My question is, does anyone know a good place for me to start server side programming, a site/reference for beginners, a clear guide to Apache or another server. Do I need any software requirements to start writing PHP scripts besides a server( and what programs make up a server?)

    Also, if I download a server, what does it mean when it is running?

  • #2
    New to the CF scene
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You should download PHPTriad. Do a search for it on http://www.download.com, download it, and install it.

    It will install PHP, Apache and mySQL for you. Now you can run all your PHP scripts from your local drive. You should probably pick up a copy of Beginning PHP 4 by WROX Press or some other publication, just to get an idea of the basics.

  • #3
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    All you need to test your PHP scripts offline is a server and PHP, preferably a DB as well once you get past the basic configuration of the server its pretty straightforward.

    & since phptriad is now no longer being developed you may like to try phpdev but I would say that !
    (phptriad is just as good & still available as noted by Kennis (not as good as phpdev5 will be though!))
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #4
    New to the CF scene
    Join Date
    Jul 2002
    Location
    ...
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Netscape Try This

    Go to opensa.org and download. The BINARIES.
    Then, configure httpd.conf to your needs, or you might try comanche (comanche.org).

    opensa has in-built PHP support and Perl support with minimal effort as long as you have installed perl.

    Now, download the following:
    Mysql-max 4.x or Mysqld-max 4.x. or whatever BINARIES.
    ActiveState Perl (activestate.com)

    Install it all.
    Configure and tailor httpd.conf and php.ini to your needs and you're ready to go.

    If you plan on running forums or similar, you may want to consider also running a SMTP email server. Try inetsrv (3.x). If you can't find it (it seems to have dissapeared off the web) PM or Email me and I will send it to you.

    If i remember correctly, the .php extension i configured and ready to go for PHP scripts on openSA, but you might also want to enable support for .php3 since some scripts use it and you won't have to go to the trouble renaming and replacing in files.

    If you come across scripts, that do not seem to work, or not seem to be picking up GET or POST input (and they look like they're missing $var = $_GET[var]; etc.) they were probably written before the existance of PHP 4.2.x and you will have to turn register_globals on in PHP.ini to make them work, or give them serious manual modification. Enabling register_globals IS a security risk.

    When writing scripts yourself with register globals on, you must be aware of loopholes like this:
    PHP Code:
    if ($admin_pw "catanonymous")
      
    $password_ok 1;

    if (
    $password_ok) {
      
    // admin stuff
      // ...

    Anyone could just go to the script,example.php?password_ok=1 and it would work and allow them admin access.
    To prevent this loophole:
    PHP Code:
    if ($admin_pw "catanonymous")
      
    $password_ok 1;
    [
    B]else
      
    $password_ok 0;[/B]

    if (
    $password_ok) {
      
    // admin stuff
      // ...

    And you would be secure.

    From this, I hope you can see why register globals is insecure. THINK when turning it on.

    Have fun with php.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •