Aces High Bulletin Board

General Forums => The O' Club => Topic started by: Denholm on November 05, 2008, 01:02:12 PM

Title: Anyone here a PHP nut?
Post by: Denholm on November 05, 2008, 01:02:12 PM
Hey there,

I just recently got into the Webmaster spirit and decided to advance my skills. I recently installed Apache, PHP, and MySQL. This is so I can test web-pages on my system before uploading them to servers.

I would like to know if there are any of you out there that can provide hints, tips, or perhaps even tutorials in helping someone such as me get started. I have already setup an authentication script through the helpful assistance of some tutorials. However my problem comes when I am trying to setup the, "Remember Me" cookie. I just don't know enough PHP to experiment with it.

I recently stumbled across this (http://www.evolt.org/article/comment/17/60265/index.html) tutorial to help me set up such a system. Yeah, it looks great. Too bad when I went in to configure it to work with my database the pages wouldn't load. I'll keep playing with it. But until then, any tips or tutorials to help an inexperienced user such as me would be appreciated.

Thanks!
Title: Re: Anyone here a PHP nut?
Post by: RTHolmes on November 05, 2008, 01:47:00 PM
PHP rules :rock  try phpbuilder.com - great stuff on there from code chunks to wider scope articles about programme structure etc. the PHP docs themselves are really good too with useful examples.


edit: if you want something to read, Philip and Alex's Guide to Web Publishing is just about the most useful book out there for web applications - its quite old and not LAMP-specific but the principles all still apply, and its the best written coading book Ive ever read :)
Title: Re: Anyone here a PHP nut?
Post by: Denholm on November 05, 2008, 01:53:52 PM
*Sigh*


I was asking here because I'm tired of no assistance from them. :mad:
Title: Re: Anyone here a PHP nut?
Post by: RTHolmes on November 05, 2008, 02:06:33 PM
Quote
Introduction

I just started programming with PHP and MySQL this week and the first script I wanted to write was a login script.

I think that explains why you should avoid this bit of coad. 99% of the problems people have with PHP are actually due to lack of knowlege about programming or server configuration, not PHP.

First off make sure your AMP setup is working properly by testing it with some simple examples. Next start at <phpbuilder> and use their stuff because its all tested and seems to be written to basic standards, or (better) build it from scratch yourself using the PHP docs - you'll learn 10x as much 10x as fast, although it will take longer to produce working apps.
Title: Re: Anyone here a PHP nut?
Post by: Fishu on November 05, 2008, 04:24:33 PM
I started with the same setup, except I changed to PostgreSQL shortly afterwards.

Login stuff is not the simpliest thing to begin with. There are several ways to accidentally create a backdoor if you don't know what you're doing. The worst case is that your database becomes accessible to malicious users. The most common problem is that there's a backdoor past the login.

In the beginning it'll be more secure to handle logins with .htaccess
Title: Re: Anyone here a PHP nut?
Post by: Denholm on November 06, 2008, 09:01:42 AM
Well, I'll try your suggestions for as long as I can. Yet seeing as this is a job, I'm trying hard to get this one done.

EDIT: What is the AMP setup?

...First off make sure your AMP setup is working properly by testing it with some simple examples...
Title: Re: Anyone here a PHP nut?
Post by: RTHolmes on November 06, 2008, 09:24:35 AM
What is the AMP setup?

= Apache + MySQL + PHP :)

by basic testing I mean do a <?php echo phpinfo(); ?> to test PHP is working properly, then make sure you can read and write to the database using a PHP page.
Title: Re: Anyone here a PHP nut?
Post by: Denholm on November 06, 2008, 10:05:39 AM
I already know it's in working condition because I have already done what you said, test to see if I can read/write things to the database via simple scripts. It's working properly.
Title: Re: Anyone here a PHP nut?
Post by: RTHolmes on November 06, 2008, 12:21:29 PM
ok I'll bite, what problems are you having with it (ie. what error messages)?
Title: Re: Anyone here a PHP nut?
Post by: MotleyCH on November 06, 2008, 01:33:29 PM
Make sure the $path is correct and $hostname is your url without http or www  ($hostname = 'yourdomain.com';
Title: Re: Anyone here a PHP nut?
Post by: Denholm on November 06, 2008, 03:09:15 PM
ok I'll bite, what problems are you having with it (ie. what error messages)?
I am having a problem, but I'm not here to discuss that. I was asking for suggestions in getting started, which you already gave me. I was also asking if anyone knew of any free tutorials out there that help a newcomer such as me go from a limited knowledge of PHP to a more broad understanding of the language.
Title: Re: Anyone here a PHP nut?
Post by: Gaidin on November 06, 2008, 03:52:45 PM
A few places I have gotten PHP help over the years.

http://www.tizag.com/phpT/ (http://www.tizag.com/phpT/)
http://us2.php.net/manual/en/tutorial.php (http://us2.php.net/manual/en/tutorial.php)
http://www.w3schools.com/PHP/DEfaULT.asP (http://www.w3schools.com/PHP/DEfaULT.asP)

There are many others out there. 

http://phpnuke.org/ (http://phpnuke.org/)

Great for using PHPNuke.
Title: Re: Anyone here a PHP nut?
Post by: Denholm on November 06, 2008, 04:32:49 PM
Thanks guys, I'll dig through all of this in hopes of getting a better understanding of the language. :)
Title: Re: Anyone here a PHP nut?
Post by: FireDragon on November 07, 2008, 11:46:38 AM
Did you try "youtube".....might find what your looking for
Title: Re: Anyone here a PHP nut?
Post by: Denholm on November 07, 2008, 12:53:44 PM
Well... I have found what I'm looking for. The trouble comes when I'm customizing it, obviously because I don't know what I'm looking for and the only knowledge I have to guide me is my ability to interpret HTML code. So I'm merely guessing the values that must be updated to include extra forms for registration and such.

Anyways, thanks for the responses. I'll get into that, eventually. Still swamped with scholarship applications, college admissions, and trying to earn money at the same time. :rolleyes: