SitePoint Sponsor

User Tag List

Page 4 of 5 FirstFirst 12345 LastLast
Results 76 to 100 of 119
  1. #76
    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 Danny Fahy View Post
    Hi Kevin,
    How do I type commands into a bin directory. WHy I type mysql -u root mysql" I get "command not found"
    If MySQL is installed in /usr/local/mysql, then the bin directory is /usr/local/mysql/bin. So you must first switch to that directory:
    Code:
    cd /usr/local/mysql/bin
    …and then type the command:
    Code:
    mysql -u root mysql
    If that still doesn’t work, try being explicit about telling it to run the command in the current directory:
    Code:
    ./mysql -u root mysql
    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

  2. #77
    SitePoint Zealot sdavis2702's Avatar
    Join Date
    Sep 2007
    Location
    Austin, TX
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried for about two or three days now to figure this out on my own but I'm not having any luck.

    I'm following the individual installation steps and I am getting caught up trying to reach the localhost in my browser after installing MySQL and Apache. The "It Works" page is not happening for me.

    I made sure I apache was running. I just keep getting the "Failed to Connect" screen. I decided I would go ahead and move on to install PHP. Well the second steps says to locate the php.ini-dist file to make a copy of it. This file is nowhere to be found for me.

    I'm really sorry to ask for help... I'd just like to get these things installed so I can learn to build better sites.

    Thanks in advance!
    I build WordPress with the Volatyl Framework.

  3. #78
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi sdavids,

    I’ll do my best to help, but I need some more information first:

    Quote Originally Posted by sdavis2702 View Post
    I'm following the individual installation steps and I am getting caught up trying to reach the localhost in my browser after installing MySQL and Apache. The "It Works" page is not happening for me.
    Are you installing on Windows, Mac or Linux? Is it possible Apache was installed to run on port 8080 (in which case you should be trying the address http://localhost:8080 instead of just http://localhost).

    Well the second steps says to locate the php.ini-dist file to make a copy of it. This file is nowhere to be found for me.
    That’s very odd. What files are present in the directory where you extracted the PHP distribution’s ZIP 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

  4. #79
    SitePoint Enthusiast nonowt's Avatar
    Join Date
    May 2002
    Location
    Edmonton, Canada
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Kevin,

    Installing PHP you write:

    choose the PHP 5.2.x zip package under Windows Binaries; avoid the installer version.

    but under PHP 5.3 there appears to be 4 versions

    VC9 x86 Non Thread Safe
    VC9 x86 Thread Safe
    VC6 x86 Non Thread Safe
    VC6 x86 Thread Safe

    I will be using Apache on a 32 bit machine so which do you recommend?

    Thanks

    PS I think I need a VC6 version, but which one?
    Last edited by nonowt; Jul 15, 2009 at 15:08. Reason: Addition

  5. #80
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Gaah! Why does php.net completely change its download options every time we publish a new edition of my book?

    You want the VC6 x86 Thread Safe version.
    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. #81
    SitePoint Enthusiast nonowt's Avatar
    Join Date
    May 2002
    Location
    Edmonton, Canada
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Kevin, perhaps I can get on with my life now....

  7. #82
    SitePoint Zealot sdavis2702's Avatar
    Join Date
    Sep 2007
    Location
    Austin, TX
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot for stepping in to help, Kevin! I just finished my vacation (the day you posted a response to my questions) and since then, I have been traveling back to my unit in Iraq. So, sorry for not responding sooner.

    As you have already figured out, I downloaded the wrong package. I followed the instructions but I ended up getting the Non Thread Safe download, lol. I can't imagine your frustration with that!!! So, I'm all good now and I am about 100 pages into the book oh glorious leader Haha

    As for not being able to access localhost, I am still not sure what the issue is. I am running windows. 127.0.0.1 is just fine and that is what I have been using to get through the book. But localhost still doesn't work for me. I wish I knew why.

    Thanks in advance for your response!
    I build WordPress with the Volatyl Framework.

  8. #83
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi I just got your book and I really like it. Its extremely detailed and explains every small step (which I love because it avoids all possible confusion).

    I passed the test for "It Works" and the version number for PHP appears for Apache. I uninstalled WAMP because I want to avoid confusion and learn how Apache, PHP, MySQL, etc work as individual entities. (could avoid confusion in the text further by notifying the reader before they install these programs that there are two methods and they can pick one or the other).

    I have encountered a problem when I try my first PHP script. In the 4th edition, I create the today.php and enter the URL for Today into my browser and I experience the error:

    404 Not Found

    Not Found

    The requested URL /today.php was not found on this server.

  9. #84
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A lot of information there thanks everyone

  10. #85
    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 Alex Pugmire View Post
    I have encountered a problem when I try my first PHP script. In the 4th edition, I create the today.php and enter the URL for Today into my browser and I experience the error:
    404 Not Found
    Hi Alex,

    A 404 error means that the file you are requesting doesn’t exist. There are two possibilities here: 1) You have placed today.php in the wrong directory. It should go in the htdocs directory in your Apache installation. 2) The file is actually named something like today.php.txt, and your computer is configured to hide its filename extension, so that it looks like today.php. Follow the instructions in the book to avoid this issue.
    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

  11. #86
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, all fixed now... onto chapter 2!!

  12. #87
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm on to chapter 2... since there is no chapter 2 thread yet, I'm going to invade for a bit:

    I followed the directions all the way through in my command prompt. I hit a wall at Creating a Database. Could someone please help me with this error:



    Microsoft Windows [Version 6.0.6002]
    Copyright (c) 2006 Microsoft Corporation. All rights reserved.

    C:\Windows\system32>mysql --version
    mysql Ver 14.14 Distrib 5.1.36, for Win64 (unknown)

    C:\Windows\system32>mysql -u root -p
    Enter password: *********
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 5.1.36-community MySQL Community Server (GPL)

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | mysql |
    | test |
    +--------------------+
    3 rows in set (0.03 sec)

    mysql> drop database test;
    Query OK, 0 rows affected (0.10 sec)

    mysql> drop database test;
    ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist
    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | mysql |
    +--------------------+
    2 rows in set (0.00 sec)

    mysql> \c
    mysql> drop database\c
    mysql> quit
    Bye

    C:\Windows\system32>create database ijdb;
    'create' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Windows\system32>

  13. #88
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Sorry to have led you astray, there, Alex! Once you issued the 'quit' command, you were out of the MySQL command prompt and back at the Windows Command Prompt. You need to log back into the MySQL command prompt to continue trying out MySQL commands like "create database ijdb".
    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

  14. #89
    SitePoint Enthusiast nonowt's Avatar
    Join Date
    May 2002
    Location
    Edmonton, Canada
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Hi Kevin,

    If I use wampserver and then do (from page 45) in a command box;

    mysqladmin -u root -p password "newpassword"

    I can no longer open phpmyadmin from wampserver?

    Do I need to change something else somewhere?


  15. #90
    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 nonowt View Post
    Hi Kevin,

    If I use wampserver and then do (from page 45) in a command box;

    mysqladmin -u root -p password "newpassword"

    I can no longer open phpmyadmin from wampserver?

    Do I need to change something else somewhere?

    Yep, if you want to use the built-in copy of phpMyAdmin in WampServer, you’ll need to put your MySQL root password into the c:\wamp\phpmyadmin\config.inc 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

  16. #91
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Kevin,

    I'm new to linux but have followed your instructions very carefully. I'm using a fresh install of Ubuntu 9.04. It seems that everything goes well up until the step where I need to use

    root@machine:/usr/local/mysql# scripts/mysql_install_db --user=mysql

    I get a fatal error that mysql_install_db cannot be found. and that /usr/bin /usr/sbin and /usr/libexec were searched.

    Do I need to place the mysql linked folder in those directories instead? Not really sure as I'm new to linux.

  17. #92
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hmm that’s a strange one, rmzDev.

    Take a look in /usr/local/mysql/scripts. Do you see a file called mysql_install_db in there?
    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

  18. #93
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It'd probably be easier, as you're beginning with PHP and Linux, that you use XAMPP for Linux.

    It installs MySQL, PHP, Perl and Apache in one - configured to work together.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  19. #94
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi Kevin..
    thanx a lot for this book...i really loved it...thanks a lot..
    i reached the last chapter, but now i'm having a problem..
    when i'm using a php code with mysqli_connect(), the following error appears:

    Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 2

    i donno y this is happening..i tried a lot..but i can't fix it...i even reinstalled mysql, php and apache. but still this is appearing...

    i'm stuck in here. pls help

  20. #95
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Kevin,
    I was using php 5.2.10. i removed this and used php 5.3. now mysqli_connect() is working perfectly.
    but i know that the problem wasn't with php 5.2.10, because i was using that till now and i didn't have any problem with mysqli functions.
    i think it was something which i did that might have created this problem. can you pls tell me what went wrong.

  21. #96
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kevin Yank View Post
    Hmm that’s a strange one, rmzDev.

    Take a look in /usr/local/mysql/scripts. Do you see a file called mysql_install_db in there?
    Yes, I looked in that directory and see the file. I don't quite understand why I can't run the command. Today I made my laptop dual boot with Linux/Win and gave the installation another try in Linux. MySQL installed without any problems. Maybe I missed something afterall...

    I'll give installing on my Linux desktop another shot. If it doesn't work out I'll give XAMP a try since I already have it set correctly on my laptop.

    I appreciate your response Kevin!

  22. #97
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey this question relates to Chapter 3 (page 89 in the 4th edition):

    I am successfully able to load the HTML, but when I click into the link, nothing displays on the next screen. I have used the correct php example copied from the book and saved it as a php file in the correct directory.

    I am confused because the example provided in the book is an excerpt and doesn't work:

    <?php
    $firstname = $_GET[ 'firstname' ];
    $lastname = $_GET['lastname'];
    echo 'Welcome to our web site, ' .
    htmlspecialchars($firstname, ENT_QUOTES, 'UTF-8') . ' ' .
    htmlspecialchars($lastname, ENT_QUOTES, 'UTF-8') . '!' ;
    ?>

    I have also downloaded the file packet provided by the book (official files) and used the welcome3.php file here. This file doesn't work either:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "htp :// ww. w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="htp: // ww . w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>Query String Link Example</title>
    <meta http-equiv="content-type"
    content="text/html; charset=utf-8"/>
    </head>
    <body>
    <p>
    <?php
    $firstname = $_GET['firstname'];
    $lastname = $_GET['lastname'];
    echo 'Welcome to our web site, ' .
    htmlspecialchars($firstname, ENT_QUOTES, 'UTF-8') . ' ' .
    htmlspecialchars($lastname, ENT_QUOTES, 'UTF-8') . '!';
    ?>
    </p>
    </body>
    </html>

    Also... How or where can i learn to use the special html coding at the beginning of the excerpt? :
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "htp:// ww. w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="thp:// ww . w3.org/1999/xhtml" xml:lang="en" lang="en">

    I'm not sure if this was extensively covered in the book and it is confusing me... sorry for all the questions and I hope I'm clear with this. Basically, welcome 3/4 php files aren't working for me... I believe my server is set up correctly.

    Thank you!!

  23. #98
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    1. If you go to the page and press ctrl+u (in most browsers, alt+v+c in IE), what is the output? If you see the PHP code there, your PHP parser isn't working. Are you going through localhost? If you don't see PHP code there, then the parser is working but there must be an error it is ignoring, so put the following at the top:
    PHP Code:
    <?php
    error_reporting
    (E_ALL);
    ini_set('display_errors'2);
    ?>
    This should give you an error which you can use to find your problem.


    2. That isn't special HTML coding - that's standard doctyping, which should be done in all HTML documents. I have to ask why you're learning a server side language if you don't know HTML yet? Generally you should fully learn HTML, then CSS (and learn how to lay out pages with CSS not tables), then optionally JS before even touching PHP.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  24. #99
    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 Alex Pugmire View Post
    I am successfully able to load the HTML, but when I click into the link, nothing displays on the next screen. I have used the correct php example copied from the book and saved it as a php file in the correct directory.
    Based on what you’re seeing, it sounds like you are loading the example files into your browser directly from your hard drive (using a URL beginning with file://). This doesn’t work because your browser cannot understand the PHP code contained in the file. Instead, you need to load the examples through your web server (using a URL beginning with http://localhost), which can interpret the PHP code before sending the page to your browser.

    Also... How or where can i learn to use the special html coding at the beginning of the excerpt? :
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    That code is the doctype and the opening <html> tag of the document. Here are the pages of the SitePoint HTML Reference that cover these two things:

    Doctypes
    html element
    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. #100
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Kev, thanks again... local host did the trick, I will review the links to better my understanding of html... so far my basic html knowledge hasn't hampered my learning too much =)


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
  •