Idea of PHP project ???

Discussion in 'PHP' started by pulikuttann, Mar 9, 2007.

  1. #1
    I am a newbie in php and I am in my way to learn more on php.

    I have created a small script which I feel useful for newbie php webmasters in DP.

    Link

    Now to improve my php knowledge and to get more practice I am interested to do a project which can be useful for webmasters.(FREE).Any idea and help ???

    If interested then we can make a wonderful open source project for DP members .............. reply !!!
     
    pulikuttann, Mar 9, 2007 IP
  2. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I doubt if you are just starting that you are ready to do a widely used Open Source project, although it doesnt stop you from making one, but populalrity will no doubt be limited.

    Just think of something you wouls like and code it.

    For instance, code a game server query function :)

    That would be useful for game server hosts like me, (although I already coded my own so I wouldnt need it, but Im sure others might).

    Thats an idea.

    Goodluck
     
    Kalyse, Mar 10, 2007 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,841
    Likes Received:
    4,543
    Best Answers:
    123
    Trophy Points:
    665
    #3
    I would pick a CMS system such as Joomla, Drupal or even WordPress and write a component or plugin for it - something not already done and not that big a project.

    You get the benefits of
    • an established community ready to trial your code and give supportive feedback
    • the coding security of the system - security is the #1 problem facing any site these days, forget usability, design and coding, if it's not secure it's dead. This is a great example of code begging for a sql injection
      $query="INSERT INTO submit 
      (name,cat,image,link,yourname)
      VALUES('$_POST[name]','$_POST[cat]','$_POST[image]','$_POST[link]','$_POST[yourname]')";
      Code (markup):
    • existing work to see variances in coding quality and learn what you like and don't like.
     
    sarahk, Mar 10, 2007 IP
  4. Rich_H

    Rich_H Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's not really an idea for an open source project but a good way to learn a programming language (any language), is to create a Sudoku puzzle creator/solver application.

    Use the web to get hints and learn the different methods of solving Sudokus but don't cheat and use other peoples code.

    Even if you don't figure it out right away, I guarantee you'll learn more about PHP (or any other language you want to learn) while trying. You'll learn how to use arrays of arrays, recursive functions and more.

    First hint, create the solver first.


    Rich
     
    Rich_H, Mar 10, 2007 IP
  5. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I like the idea of developing plugins from sarahk. If you want ideas you could take a look at wordpress plugins and try and implement them in serendipity and vice versa, look at phpBB and implement them in simple machines forum etc.

    If you want to do something specifically webmaster related as in something a webmaster would use to maintain/monitor/control a site rather than put on a site then you might want to look at the search APIs available and the libraries for interacting with these.
     
    streety, Mar 10, 2007 IP
  6. chuckd1356

    chuckd1356 Active Member

    Messages:
    770
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    70
    #6
    Why don't you just code a tutorial site, it will help you out! They aren't good for marketing, but you will learn a lot along the way.

    And if you are just learning PHP, then there is no way you could code a widely used secure application. Unless you're god.
     
    chuckd1356, Mar 10, 2007 IP
  7. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thankz for all comments !!!
    Since I am a newbie in php there can be many security bugs.So I want to know more abt writing more secure php codes.What I can do for it ???
     
    pulikuttann, Mar 10, 2007 IP
  8. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Can u plz explain how it can become sql injection ????
     
    pulikuttann, Mar 10, 2007 IP
  9. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #9
    sql injection is possible because you're taking user submitted content and sending it straight to the database without checking to see whether it is well formatted or not.

    For example in yourname you may be expecting something like Peter which would be all well and good but if instead you got Peter'); DROP TABLE `submit` then you've just lost all your data. That's sql injection.

    magic_quotes_gpc should prevent that but if you are developing applications you want other people to use you are best handling this yourself with addslashes and stripslashes

    http://uk.php.net/manual/en/security.database.sql-injection.php
     
    streety, Mar 10, 2007 IP
  10. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #10

    UR really great !!!
    Its a wonderful reply for a newbie like me.Since I am in the starting phase I was not able to look any of the security problems that may arise.But now onwards I will try to concentrate much on it.
    Any more security proble ???
    Thankz !!!
     
    pulikuttann, Mar 10, 2007 IP
  11. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I've written about security a couple of time at my blog here and here. Ilovejackdaniels has also covered security in a number of posts. phpbuilder also has some posts worth looking at.
     
    streety, Mar 10, 2007 IP
  12. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I rememeber when I started coding first, I never escape my SQL queries.


    To work out if the person could log in, it was simply


    select * from users where username = '$_POST[user]' and '$_PASSWORD[password]'"

    You could log in as main admin by just entering the username as :

    ' or 1 = 1 -- '
     
    Kalyse, Mar 10, 2007 IP
  13. chuckd1356

    chuckd1356 Active Member

    Messages:
    770
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    70
    #13
    You have tons of security issues in that. First off, you leave all the database credentials in all the files.

    Move those to a file outside the document root, and use require_once to include them.

    Buy the book called: Essential PHP security. It's great. It's by O'Reily.
     
    chuckd1356, Mar 10, 2007 IP
  14. sadcox66

    sadcox66 Spirit Walker

    Messages:
    496
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Look at drupal.org and make a module., a lot of people want assistance there.
    To help you use the cheatsheet at http://drupal.org/node/50825
    I am biased., I think drupal has a smallest "useful" PHP API you can find., and you can do anything with it really quickly.
    On the flip-side., newbies find memorizing the forty odd functions difficult and give up to try their hand a joomla because it's easier to impress their friends with it. If your serious about being a good PHP programmer give drupal a shot.

    I have nothing against Joomla., I give it to clients if it will do their job. But if there is any I need to do from scratch I use Drupal. CakePHP is something else you may want to look at - But I find it needs far too many dependencies. There are a handful of other PHP open source projects that rock (in my opinion) ... visit sourceforge.org and freshmeat.net and look at the most active (in development) PHP projects... and the least active (stable/mature) projects
     
    sadcox66, Mar 10, 2007 IP
  15. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Thankz to all members.
    Can any own a forum or something else which can be joined for doing open source projects .......... ?
     
    pulikuttann, Mar 10, 2007 IP
  16. Rich_H

    Rich_H Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Why the hurry to release your code to the public, why not concentrate on becoming a better programmer first?

    It's obvious that you have a long way to go before you can turn out professional-quality code and there is already more than enough amateur, bug-filled, insecure open source code out there, no need to add to it.

    I gave you some good advice that would help you become a better programmer, something you need to do before you release code to the public.

    Frankly, if you can't create a simple Sudoku solver/creator on your own, then you have no business releasing code to the public.

    When you release things to the public, chances are the users won't be programmers and won't be able to tell that you've written insecure code. They'll just install it then wonder how hackers were able to wipe out their database or how spammers were able to send a few thousand spam emails through their site before their host suspended their account.

    There are plenty of resources available that will help you become a better programmer, it just takes time and dedication.

    If you truly can't wait to get into open source, volunteer for a current open source project where more experienced programmers can review your code.

    Good luck,

    Rich
     
    Rich_H, Mar 16, 2007 IP
  17. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Rich,
    Thankz for ur advice.I am on my way to become a gud programmer.As u said where can I join some new projects that can really help me to gain more knowledge ???
    I know source forge and else wat ?
     
    pulikuttann, Mar 16, 2007 IP
  18. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #18
    You may also be able to try PEAR. There would be a lot to learn before you are really ready to help with the coding side of things but studying a package and for instance extending the documentation would help you and the community. It would help you in that you would be exposed to a relatively well written codebase which follows a set of defined standards and it would help the community because in some packages the documentation is lacking.

    I don't know how much support there is available for creating plugins for blogs, forums and CMSs but this may also be worth looking into.
     
    streety, Mar 18, 2007 IP