Newbies forum FAQ + Bookmarked threads - Page 3
Page 3 of 3 FirstFirst 123
Results 31 to 38 of 38

Thread: Newbies forum FAQ + Bookmarked threads

  1. #31
    code | beer > sleep
    Join Date
    Sep 2002
    Well your almost right its

    PHP Code:
    However if you are going to do this its best if you put a prefix on them

    PHP Code:
    That way you dont overwrite variables that exist, although there is the option to add the prefix to variables that do exist.

    I dont use extract as basically its gotta go through an entire array and create variables on the fly, it may seem something of convience for the programmer, however for me personally i feel it slows down execution of course that depends on how big the Array is.
    Dont be lazy Search
    Use the Manual

  2. #32
    Join Date
    Mar 2005
    south wales , uk
    any chance of a tute on this session_save_path? or at least a pointer to where I can read up about it please?

  3. #33
    code | beer > sleep
    Join Date
    Sep 2002
    Since there are so many Linux (LAMP) Installs. I didnt think much in re-doing them so found one I first learnt LAMP Help, its pretty easy going you dont really need to know basic commands on the console but it is advised, its also quite an old tutorial but should still suffice even for PHP5 even.

    It however doesnt go into PHP Module installation which I strongly suggest reading the module in the PHP Manual and its related Manual/Installation guide.
    Dont be lazy Search
    Use the Manual

  4. #34
    Just a few things.

    With PHP5 being the latest. You can now use the MySQL Improved Extension. Most Host providers still use version 4, but it seems to me that with the OOP (Object Oriented Programming) goodies in PHP5, that it will overtake the version 4.

    Here's some syntax:
    PHP Code:

    // create mysqli object & open the connection
    $mysqli = new mysqli("localhost""test""test""testdb"); 

    // check for connection errors 
    if (mysqli_connect_errno()) { 
    "Unable to connect: ".mysqli_connect_error()); 

    $query "SELECT FROM <table>"

    // execute the query 
    $result $mysqli->query($query); 

    // error check
    if(!$result) { 
    $error_number $mysqli->errno
    $error_msg $mysqli->error
    "MySQL error $error_number$error_msg";     

    If your really having troubles installing Apache, PHP, and MySQL on your Windows (because you want to learn it via your computer localhost). Then use the Wamp5 extract. All you do is open up the EXE, it extracts, installs, and you point to where you want your root directory (you can access to view the websites you built via http://localhost or is the link, make sure to click the British icon on top since the site originally displays en francais.

  5. #35
    A lot of useful info, thanks guys.

  6. #36
    Thanks for the info.

  7. #37
    Junior Member
    Join Date
    Sep 2006
    Quote Originally Posted by planetsim
    Dont believe it.. forgot to acknowledge the real begginers..

    For those with no idea in PHP.. Heres the basics

    PHP means PHP Hypertext Processor.. Before that it was more well known as Personal Home Page.. thus the PHP..

    Before we can go on and just create php we need a webserver.
    The best solution would be Apache i suggest people download the 1.3.x version. As its the most stable.

    There are a couple of ways to download it..

    As a MSI. Get this if your Windows,
    Zip - Dont sugget anyone reading this thread to get it.

    I assume most of you are Windows Users, so download the MSI version of it.. Approx 2-3mb

    Installation isnt hard. But you can goto and learn how to install it..

    remember to test if it installed correctly by going to. http://localhost once you have started the apache server.

    From there you'll need to install PHP once again you can goto the site i suggested it has how you install it, the tutorial is quite old yet shouldnt be any different in installation.

    If you dont want the tutorial.. goto and download the PHP Installer. exe file about 900kb if i remember correctly.

    Follow the prompts. When you get to which server you want to install.. Select apache, you should recieve an error saying something like, Couldnt get to requested server or something a long those lines.

    That will mean you'll have to do this in the httpd.conf file.. Located in the Apache/Conf Directory.

    Open the file up and add this anywhere in it.

    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php/php.exe"

    Change the c: to which ever drive you installed PHP on.
    This just allows PHP to be parsed by the server, as a CGI Binary.

    You can install MySQL as well. But lets not get too far ahead of ourselves.

    Restart the Apache Server

    And create a .php file in the webroot directory. most likely htdocs.
    PHP Code:
    Save it.. as index.php
    and goto http://localhost/index.php

    If you see the PHP File with the information about your PHP Settings, you have successfully installed PHP. Otherwise.. try again.
    hi, I'm new to php, and I'm trying to configure for use with a server on a home pc, and I've gone through all the installation and set up tut's, i've done it 2, 3x... yet it still doesn't work. any advice for a n00b?

  8. #38
    Junior Member
    Join Date
    Mar 2010
    dallas, TX, usa

    hi there

    Quote Originally Posted by Weedpacket View Post
    Anothing bit about sessions for Windows users:

    If you're using Windows, you have to specify the temporary directory in php.ini - "session.save_path" if I recall. "/tmp" is the default for Un*x systems.
    This is my first time i visit here. I found so many entertaining stuff in your post, especially its discussion. Keep up the excellent work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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