PHP for teh noobs

  • Page

    of 3 First / Last

    Previous
  • nonzero 7 Aug 2007 21:24:20 200 posts
    Seen 4 years ago
    Registered 9 years ago
    Fancy making a PHP based website as they seem ubercustomizable and perfect for my marketing and promotionary needs.

    Anyone got some pointers on the whole gig as I've never forayed into this sphere before.

    Ideally I want to make something that has 1 page with the content (which will just be pics with a bit of description text in 5 different categories) and a forum which intergrates into the look and feel of the page.

    Thanks
  • mouse Moderator 7 Aug 2007 21:33:13 10,312 posts
    Seen 2 days ago
    Registered 12 years ago
    Hmm well, you don't really need to do any learning here. Just one static page and a PHPBB (or similar) installation will see you fine. Depending on your host, you might even be able to get them to install it for you.
  • mouse Moderator 7 Aug 2007 21:51:53 10,312 posts
    Seen 2 days ago
    Registered 12 years ago
    CrispyXUK wrote:
    I've obvously got apache on my mini, which is my current server, this a good place to start?

    Absolutely. Then you just need to get PHP and MySQL on there. Both are ultra easy to install. In fact, I think PHP is already on the Mac.

    Edit: I just added a PHP installation link.
  • PiD 7 Aug 2007 21:52:47 3,566 posts
    Seen 7 months ago
    Registered 8 years ago
    XAMPP ftw!
  • mouse Moderator 7 Aug 2007 21:54:48 10,312 posts
    Seen 2 days ago
    Registered 12 years ago
    CrispyXUK wrote:
    Whats MySQL?

    It's a database. That's where PHP software (like PHPBB or WordPress for example) stores all its data and settings. The OSX version includes a little System Prefs panel where you can turn it on and off with one click.

    Edit: Download link

    There's loads of guides out there for this stuff and it's easy to do, so have a bit of a Google if you get stuck.
  • silentbob 7 Aug 2007 21:59:24 28,918 posts
    Seen 2 minutes ago
    Registered 11 years ago
    PHP is for n00bz! ;)

    VR News: www.roadtovr.com -- Follow us on Twitter.

  • Deleted user 7 August 2007 22:20:42
    look for a linda.com php learning torrent - they are excellent and you should be able to find them
  • Tremendosaurus 8 Aug 2007 16:30:12 1,196 posts
    Seen 2 weeks ago
    Registered 7 years ago
    silentbob wrote:
    PHP is for n00bz! ;)

    PHP ftw! ASP ftmfsal (for-the-mutha-fucking-sucky-ass-lose). Fact.

    :)

    -T
  • catterz 8 Aug 2007 16:36:42 8,763 posts
    Seen 5 months ago
    Registered 12 years ago
    If you're keen on learning php, do what I did. Go to w3schools.com and follow the tutorials there.

    I learnt all of my php, css and mySQL knowledge there... and with a few google searches too.

    You'll need a server which can run php, btw.

    Still stalking this place, old-school style (UID: 1053)

  • MrCarrot 8 Aug 2007 16:51:45 3,516 posts
    Seen 3 weeks ago
    Registered 9 years ago
    Also: learn Smarty while you're on. :)
  • MrCarrot 10 Aug 2007 10:27:29 3,516 posts
    Seen 3 weeks ago
    Registered 9 years ago
    For dev stuff I use XAMPP, it includes PHP, MySQL and apache in one installer
  • MrCarrot 10 Aug 2007 10:34:01 3,516 posts
    Seen 3 weeks ago
    Registered 9 years ago
    Developing things on my PC, as opposed to working on a live webserver somewhere.
  • thehat 10 Aug 2007 11:30:57 1,833 posts
    Seen 3 years ago
    Registered 9 years ago
    CrispyXUK wrote:
    I'm looking into this as we need a web dude to manage our company site as our developer has fucked off the Oz.
    Are you still looking for someone then Crispy? How much work is it?
  • thehat 10 Aug 2007 11:48:57 1,833 posts
    Seen 3 years ago
    Registered 9 years ago
    Ah, fair enough then. I already have a job anyway, just sniffing around for a little extra cash.
  • catterz 10 Aug 2007 12:57:42 8,763 posts
    Seen 5 months ago
    Registered 12 years ago
    It's most likely ftp.hiddentec.com

    Still stalking this place, old-school style (UID: 1053)

  • Devious_Droid 10 Aug 2007 13:28:48 81 posts
    Seen 6 years ago
    Registered 7 years ago
    I believe that unless you are paid to be a web programmer, there's adequate ways to run a dynamic database driven site without having to learn much.

    The only PHP I know is 'echo', but I can set up a wordpress/joomla/expressionengine website without much hassle.
  • silentbob 14 Aug 2007 13:59:28 28,918 posts
    Seen 2 minutes ago
    Registered 11 years ago
    Tremendosaurus wrote:
    silentbob wrote:
    PHP is for n00bz! ;)

    PHP ftw! ASP ftmfsal (for-the-mutha-fucking-sucky-ass-lose). Fact.

    :)

    -T
    Either use Perl or ASP.net, don't piss about with some lame bastard hybrid! ;)

    VR News: www.roadtovr.com -- Follow us on Twitter.

  • infoxicated 14 Aug 2007 14:43:53 1,022 posts
    Seen 1 day ago
    Registered 11 years ago
    CrispyXUK wrote:
    Could anyone explain to me how to setup a testing server on my local machine, I've installed XAMPP and have PHP and MySQL running (as services) now I'm a little unsure what to do next.

    Dreamweaver CS3 btw.

    http://localhost/

    Should take you to the root of the apache server if it's running.
  • Onny 14 Aug 2007 15:02:04 5,697 posts
    Seen 9 months ago
    Registered 9 years ago
    Look in the documentation, it should tell you where the "root" of your webserver is. With apache, it's normally a directory called "htdocs".
  • Onny 14 Aug 2007 15:22:23 5,697 posts
    Seen 9 months ago
    Registered 9 years ago
    OK, it's like this:

    Apache is your web server. This accepts connections to your machine and sends out web pages as per people's requests. That bit's easy.

    MySQL is a database. Nothing more, nothing less.

    PHP is the bit in the middle. You write PHP scripts to query the database and send the result back to the viewer.

    An easy example is something like Amazon. Very basically; you go to the homepage, and type a search. A PHP script then deals with your search criteria, creates a database query, queries their database and then formats the results into what you, as a viewer, will see onscreen.

    Does that make more sense now?
  • Onny 14 Aug 2007 15:23:29 5,697 posts
    Seen 9 months ago
    Registered 9 years ago
    See;

    PSP and MySQL tutorial
  • Dunneh 14 Aug 2007 15:26:40 150 posts
    Seen 2 years ago
    Registered 7 years ago
    Bah, use vb.net with Microsoft IIS and SQL express. Microsoft have loads of really useful tutorials aimed at beginners for server side scripting.
  • Day 14 Aug 2007 15:35:40 313 posts
    Seen 4 days ago
    Registered 11 years ago
    I found CocoaMySQL was good for MySQL database management on osx and BBEdit for coding...

    Havent used it myself, but Coda is meant to be a good alternative to DW.
  • Day 14 Aug 2007 15:46:13 313 posts
    Seen 4 days ago
    Registered 11 years ago
    CrispyXUK wrote:
    Fuck this, I'm officialy giving up, no point if I can't even find the mySQL program or a database file.

    Use CocoaMySQL to connect to the mysql server and then create a new database... you are on a osx arnt you!?
  • Day 14 Aug 2007 15:53:20 313 posts
    Seen 4 days ago
    Registered 11 years ago
    CrispyXUK wrote:
    No, I'm at work on PC's.

    Ah, soz my bad... thought you were on osx as I remember reading previously about a mini machine and I assumed a mac mini.
  • catterz 14 Aug 2007 15:54:09 8,763 posts
    Seen 5 months ago
    Registered 12 years ago
    Have you been able to access the ftp server?

    If you can access that you can download the config.php or otherwise named php files to show you the directory of the database.

    Still stalking this place, old-school style (UID: 1053)

  • catterz 14 Aug 2007 16:05:59 8,763 posts
    Seen 5 months ago
    Registered 12 years ago
    It might then be in the index.php file.

    You need to scan for something like:

    [code]$user="username";
    $password="password";
    $database="database";
    mysql_connect(localhost,$user,$password);
    @mysql_select_db($database) or die( "Unable to select database");[/code]

    Still stalking this place, old-school style (UID: 1053)

  • Day 14 Aug 2007 16:06:13 313 posts
    Seen 4 days ago
    Registered 11 years ago
    Might be of help... you could also use HeidiSQL to connect to MySQL databases on IIS (win - pc)
  • catterz 14 Aug 2007 16:07:36 8,763 posts
    Seen 5 months ago
    Registered 12 years ago
    CrispyXUK wrote:
    got this from head.php

    //local
    /*
    $db = mysql_connect("localhost","root","");
    mysql_select_db("hiddentec",$db);
    */
    echo mysql_error();
    If I'm not mistaken those lines have been commented out with the /* --- */ tags.

    Still stalking this place, old-school style (UID: 1053)

  • Onny 14 Aug 2007 16:14:23 5,697 posts
    Seen 9 months ago
    Registered 9 years ago
    It means they are ignored.

    MySQL doesn't have a single database file which will have any meaning to you, so there's no point looking for it. Furthermore, if you've downloaded the files from your ftp, then chances are that the database is hosted on that server and hence it will be currently unavailable to you.

    do a search within all the php files for a mysql_connect statement. This will tell you the name of the machine it's hosted on (in the example you posted, "localhost") as well as the username and password ("root" and blank respectively).

    The mysql_select_db statement will give you the name of the database ("hiddentec" in the example).

    EDIT: I should add here, just in case, that if you find the mysql_connect statement, under no circumstances post it on here.. you really don't want the internet knowing your passwords.
  • Page

    of 3 First / Last

    Previous
Log in or register to reply