SitePoint Sponsor

User Tag List

Page 1 of 5 12345 LastLast
Results 1 to 25 of 119
  1. #1
    ********* Articles ArticleBot's Avatar
    Join Date
    Apr 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Discussion thread for Build your own Database Driven Website using PHP & MySQL - Part 1: Installatio

    This is a dedicated thread for discussing the SitePoint article 'Build your own Database Driven Website using PHP & MySQL - Part 1: Installation'

  2. #2
    Anonymous
    SitePoint Community Guest
    A great tutorial - well explained and thorough. Covers Windows as well as Linux/Mac OS X - something missing on other tutorials.

    One word of warning though, there are a few cases where the instructions differ between this article and the PDF file I downloaded (first 4 chapters of the book). I think the PDF file had the correct info, as well as more details.

  3. #3
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The article was written in 2001 and served as the starting point for the first edition of the book.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog · Twitter · Contact me
    Neon Javascript Framework · Jokes · Android stuff

  4. #4
    Anonymous
    SitePoint Community Guest
    Absolute blunder ................ if anyone says that this tutorial is of no use ...

  5. #5
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    We're in the process of updating the article version of these sample chapters to coincide with the print version and the downloadable PDF.
    Last edited by Kevin Yank; Nov 30, 2003 at 23:28.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  6. #6
    Anonymous
    SitePoint Community Guest
    Very good. Thank you very much for this article.

  7. #7
    Anonymous
    SitePoint Community Guest
    Real good article. got me started on PHP and MSQL in no time.

  8. #8
    Anonymous
    SitePoint Community Guest
    Can i get all the chapter remaining for free? ; )

  9. #9
    Daesung Kim
    SitePoint Community Guest
    Great. Good details to get you started

  10. #10
    Chris
    SitePoint Community Guest
    Thanks from starting from the beginning. I've used php before but your tutorial filled in a lot of gaps in my understanding of how it works. I look forward to chapter 2!

  11. #11
    SitePoint Guru
    Join Date
    Jun 2004
    Location
    Finland
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Note: PHP experts may tell you that you'll achieve better performance with register_globals set to Off, but that setting exposes you to hackers attempting SQL injection attacks on your Website if you are not very careful to write scripts that protect themselves from such malicious behavior. Until you fully understand PHP and the types of security issues that scripts must combat, leave this setting On.
    You're talking about magic_quotes_gpc, right? (3rd edition [the article version], part 1, page 4, "Why should I bother?")

  12. #12
    Anonymous
    SitePoint Community Guest
    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\Program Files\Apache Group\Apache2\htdocs\today.php on line 2

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\Program Files\Apache Group\Apache2\htdocs\today.php on line 2

    Parse error: syntax error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\today.php on line 2

  13. #13
    cliff
    SitePoint Community Guest
    when seting up the root password what about the ERROR 1044: Access denied for user @localhost to database root?

  14. #14
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sorccu
    You're talking about magic_quotes_gpc, right? (3rd edition [the article version], part 1, page 4, "Why should I bother?")
    Yep, that's right. It was an error in the adaptation from the book to the article. Fixed now.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  15. #15
    Mondor
    SitePoint Community Guest
    CGI Error
    The specified CGI application misbehaved by not returning a complete set of HTTP headers.

  16. #16
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    CGI Error
    That error message indicates you have (incorrectly) installed the CGI version of PHP. If you follow the instructions in the article, you will install the module version of PHP, which cannot produce this error message.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  17. #17
    SitePoint Member
    Join Date
    Jun 2005
    Location
    Portland, Oregon, USA
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi...I have the 2nd edition of your excellent book, and have tried to install everything, but PHP does not appear to be working. It's on a Debian/Sarge system. Here is what I've done:

    - Installed MySQL 4.1 from tarball. That was successful, can log in at command prompt and do basic DB manipulation.
    - Installed Apache2 via apt-get. Also installed apache2-dev as instructed in book.
    - Compiled PHP 5 from source following book instructions. In order to make this work I had to install flex, xml2, xml2-dev, gcc and make, all of which I did via apt-get.

    Then, still following instructions, I moved php.ini-dist and php.ini-recommended to /usr/local/php/lib and copied php.ini-dist to just plain php.ini
    I added in values for doc_root and extension_dir as follows:
    doc_root = /var/www
    (I also tried /var/www/apache2-default, but still no luck)
    extension_dir = "/usr/local/php"

    And in the apache2-config file, I changed the DirectoryIndex line to include index.php index.php3 and index.phtml

    And added the following two lines to the end:

    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps

    That's all, then I made the sample web page from the book (today.php), and tried to load it from another machine on my network...but it wanted to download the PHP file, which I suppose means the server never tried to render it but just passed it through.

    The URL for the PHP file is:
    http://sneakypete.is-a-geek.com/apac...ault/today.php

    Any suggestions?? I feel like I'm almost there...at least, I hope so!! Can't wait to get cracking on the exercises in the book!

    -Pete

  18. #18
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Definitely sounds like you're close. Any chance you neglected the 'make install' stage of PHP installation, and only did the 'make'?

    Check your Apache 2 config file... does it contain a LoadModule line for the PHP5 shared library (.so) file?
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  19. #19
    SitePoint Member
    Join Date
    Jun 2005
    Location
    Portland, Oregon, USA
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WOW that was quick, thanks!!

    I do not have such a line in there, no.

    This looks familiar - I think I found a similar suggestion on another forum this afternoon and tried it, but can't remember exactly what I did. Whatever it was, I undid it!

  20. #20
    SitePoint Member
    Join Date
    Jun 2005
    Location
    Portland, Oregon, USA
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just tried this, which I found on a Gentoo forum. But it gave me an error. I put this line right before the AddType lines near the end of the apache2-config file:
    LoadModule php5_module libexec/libphp5.so

    and got this error when I tried to restart apache2:

    Syntax error on line 398 of /etc/apache2/apache2.conf:
    Cannot load /etc/apache2/libexec/libphp5.so into server: /etc/apache2/libexec/libphp5.so: cannot open shared object file: No such file or directory

  21. #21
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yep, it definitely sounds like you missed the 'make install' step. If you look in the book, the build process for PHP is two steps: make and then make install. The first one compiles PHP, the second one copies the libphp5.so file to your Apache module directory and adds the LoadModule line to your apache configuration file.

    So I'd suggest getting the PHP5 source package and redoing the compilation step, then making sure you do the 'make install', watching carefully for any errors in this second process.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  22. #22
    SitePoint Member
    Join Date
    Jun 2005
    Location
    Portland, Oregon, USA
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, can do. I am sure I did both "make" and "make install" - I remember the first gave pages and pages of output, and the second only 20 lines or so. But I must confess I didn't pore over it for errors, I didn't know what to look for.

    I am (obviously) a total newbie to compiling from source...this is my first attempt to compile anything! Sorry my questions are so basic, I know this is pretty off-topic.

    If I am to go back, is there anything I need to "undo" first? And what step should I start at - do I need to do the configure stuff again?

    Many thanks,
    Pete

  23. #23
    SitePoint Member
    Join Date
    Jun 2005
    Location
    Portland, Oregon, USA
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I tried going back to the tarball, and I found that there were indeed errors of some kind at the "make" stage.

    Since I haven't the slightest idea what to do about them, I'm thinking I'm over my head at this point, and maybe should choose something simpler than PHP for my first compile.

    So, I used apt-get to install libapache2-mod-php4 and then used the configuration suggestions from your book...and it works!

    Since my only goal from this PC at this point is to learn, I expect that's good enough for now, and I'll just use it as is. It would probably take much coaching to get the compile-from-source approach to work.

    Thanks for your help though! Got me out of my rut. And if my decision do use the Debian package is a bad one for any reason, feel free to let me know!

    -Pete

  24. #24
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    PHP4 should do just fine for now, yep. If at any stage you decide to re-attempt the compilation, let me know and I should be able to help you nut out the error messages. Usually it's just a package or two you need to apt-get.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  25. #25
    SitePoint Member
    Join Date
    Jun 2005
    Location
    Portland, Oregon, USA
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a question about numeric data types.

    In a different book, it says that "Numeric" and "Decimal" types are interchangeable, and while they are intended for numeric values they "cannot be used for mathematical purposes."

    Can anybody shed any light on what this limitation means in practical sense? What is an example of the kind of operation you could perform with a "Float" or "INT" field, but would not be able to do with data in a "Numeric" field?


Bookmarks

Posting Permissions

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