SitePoint Sponsor

User Tag List

Results 1 to 25 of 25
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    MySQL not being recognized?

    I installed Apache, PHP, and MySQL last summer on my PC for developement work. Apache and PHP are running fine, and it appears that MySQL is running fine (I followed instructions in Kevin Yank's book, "Build Your Own Database Driven Web Site Using PHP & MySQL".

    But, I decided to try Joomla, and it is not recognizing that I have MySQL support. Then, from another article I read today on MySQL installation, it said to run the phpinfo() and scroll down the page. If you see a section on MySQL, you know it's installed. Well, I didn't see anything on MySQL at all in that list.

    Apache is installed in C:/Program Files/Apache Software Foundation/Apache 2.2

    PHP5 is installed in C:/PHP

    MySQL is installed in C:/program Files/MySQL (Version, MySQL Server 5.1)

    Any ideas why it's not being recognized? I can log into MySQL from the MySQL Command Line Client, and "play" (Created the Internet Joke Database)

    Thanks in advance.

    Bill O
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It sounds like you don't have the MySQL extensions for PHP installed. MySQL is fine and there, but PHP can't communicate with it because it doesn't have the code to do so installed. I think there's a section in the book about installing that?

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    It sounds like you don't have the MySQL extensions for PHP installed. MySQL is fine and there, but PHP can't communicate with it because it doesn't have the code to do so installed. I think there's a section in the book about installing that?
    Here is what I have in php.ini (and I just enabled extension=php_dba.dll now, so I don't know yet if that will make a difference):

    ; Windows Extensions
    ; Note that ODBC support is built in, so no dll is needed for it.
    ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
    ; extension folders as well as the separate PECL DLL download (PHP 5).
    ; Be sure to appropriately set the extension_dir directive.

    ;extension=php_bz2.dll
    ;extension=php_curl.dll
    extension=php_dba.dll
    ;extension=php_dbase.dll
    ;extension=php_exif.dll
    ;extension=php_fdf.dll
    ;extension=php_gd2.dll
    ;extension=php_gettext.dll
    ;extension=php_gmp.dll
    ;extension=php_ifx.dll
    ;extension=php_imap.dll
    ;extension=php_interbase.dll
    ;extension=php_ldap.dll
    extension=php_mbstring.dll
    ;extension=php_mcrypt.dll
    ;extension=php_mhash.dll
    ;extension=php_mime_magic.dll
    ;extension=php_ming.dll
    extension=php_msql.dll
    extension=php_mssql.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    ;extension=php_oci8.dll
    ;extension=php_openssl.dll
    ;extension=php_pdo.dll
    ;extension=php_pdo_firebird.dll
    ;extension=php_pdo_mssql.dll
    ;extension=php_pdo_mysql.dll
    ;extension=php_pdo_oci.dll
    ;extension=php_pdo_oci8.dll
    ;extension=php_pdo_odbc.dll
    ;extension=php_pdo_pgsql.dll
    ;extension=php_pdo_sqlite.dll
    ;extension=php_pgsql.dll
    ;extension=php_pspell.dll
    ;extension=php_shmop.dll
    ;extension=php_snmp.dll
    ;extension=php_soap.dll
    ;extension=php_sockets.dll
    ;extension=php_sqlite.dll
    ;extension=php_sybase_ct.dll
    ;extension=php_tidy.dll
    ;extension=php_xmlrpc.dll
    ;extension=php_xsl.dll
    ;extension=php_zip.dll

    I thought that I followed the instructions in Kevin's book to the letter, but I may have missed or overlooked something.

    Otherwise, I'm very happy with the way my server is running on my PC. But I'd like to use some of these other programs (I have a client that I think Joomla would be right for).

    Thanks, Dan.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  4. #4
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,029
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    Did you restart the server after making changes to php.ini
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  5. #5
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    Did you restart the server after making changes to php.ini
    I did forget that this morning, but it has been restarted in the past several times, so certainly the changes should have taken effect.

    What do you think of the settings? Do they look correct? Is there anything else you can think of?

    Thanks for the reply.

    By the way, I think Kevin is right about installing manually. I have indeed learned a lot by doing it. I have no doubt that I will ge these programs talking to each other, but I have reviewed everything, and I have not spotted the error. But, I suppose it's like proofing your own writing. Better to have someone else do it.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  6. #6
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,029
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    When you try to connect to MySQL from PHP, are any errors thrown up?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  7. #7
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    When you try to connect to MySQL from PHP, are any errors thrown up?
    Not sure what you mean "to connect to MySQL from PHP". However, I think I'm on the path to solving the problem.

    Here is where I'm at:

    Dan Grossman suggested that PHP was not properly configured to communicate with MySQL, and I think he's right.

    I had downloaded (previously) phpMyAdmin, and went ahead and extracted the files to Apache2.2/htdocs. Following instructions to get it set up, I typed http://localhost/phpMyAdmin. I got a Error 503. Hmmmm. After much thinking, became suspicious about having Virtual Hosts set up. So, I went to httpd.conf and disabled (commented out) #Include conf/extra/httpd-vhosts.conf, restarted Apache, and then type in the address bar: http://localhost/phpMyAdmin. Bingo. But I got an error (phpMyAdmin - ErrorCannot load mysql extension. Please check your PHP configuration. - Documentation), which basically tells me what Dan had said. But, at least it opened the program.

    So, now I have to firgure out how to get them talking (I've verified the extensions are enabled, and put the libmysql.dll in the Windows path, restarted everything (including my computer), but still get the error.

    That's where I am right now.

    Is it possible to have Virtual Hosts enabled and have phpMyAdmin? Must be, but I'm not sure how to solve that one yet (I was getting the Error 503 when typing http://localhost/phpMyAdmin with Virtual Hosts enabled).

    Thanks for the help. Sooner or later, I'll get it. I'm learning a lot along the way.

    Regards,
    Bill O.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  8. #8
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    When you try to connect to MySQL from PHP, are any errors thrown up?
    While perusing other forums and thinking of Kevin Yanks book, the lightbulb suddenly went on as to what you meant! Duh! You mean with a PHP script to connect. I have not tried that (at this point, I'm not sure I know how).

    I've tried a few things today that I came across other places. It seems that I'm not the only one that has trouble, since PHP5 needs to be configured manually for MySQL support.

    At this particular moment, I'm at a loss. When I run phpinfo.php, nothing comes up about MySQL. They aren't talking (like a wife and a mother-in-law!)

    Both seem to be running. I run php scrips in my websites and they work. I can access MySQL with the command prompt, and it works. "They just aint talkin' to each other".

    Computers are funny things. When I find the problem, I know it's going to be a "Duhh" moment. Usually when something doesn't work for me, it's either spelling or syntax. Syntax is everthing (and, of course, so is spelling). But, as I said before, I'm learning lots of things along the way that I wouldn't have otherwise learned (at least not now). I do want to get this resolved, however, so I can move forward.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  9. #9
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BillO View Post
    Not sure what you mean "to connect to MySQL from PHP". However, I think I'm on the path to solving the problem.

    Here is where I'm at:

    Dan Grossman suggested that PHP was not properly configured to communicate with MySQL, and I think he's right.

    I had downloaded (previously) phpMyAdmin, and went ahead and extracted the files to Apache2.2/htdocs. Following instructions to get it set up, I typed http://localhost/phpMyAdmin. I got a Error 503. Hmmmm. After much thinking, became suspicious about having Virtual Hosts set up. So, I went to httpd.conf and disabled (commented out) #Include conf/extra/httpd-vhosts.conf, restarted Apache, and then type in the address bar: http://localhost/phpMyAdmin. Bingo. But I got an error (phpMyAdmin - ErrorCannot load mysql extension. Please check your PHP configuration. - Documentation), which basically tells me what Dan had said. But, at least it opened the program.

    So, now I have to firgure out how to get them talking (I've verified the extensions are enabled, and put the libmysql.dll in the Windows path, restarted everything (including my computer), but still get the error.

    That's where I am right now.

    Is it possible to have Virtual Hosts enabled and have phpMyAdmin? Must be, but I'm not sure how to solve that one yet (I was getting the Error 503 when typing http://localhost/phpMyAdmin with Virtual Hosts enabled).

    Thanks for the help. Sooner or later, I'll get it. I'm learning a lot along the way.

    Regards,
    Bill O.
    Replying to my own post just to note that I did get the Virtual host thing solved, and my hunch was right: I set up "localhost" as a "Virtual host". Found that by searching Google on the issues I'm having.

    I'm getting closer and closer to getting this licked, and have learned tons of urealated things in the process. It's only a matter of time.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  10. #10
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    When you try to connect to MySQL from PHP, are any errors thrown up?
    Yes: "Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\MyWebsites\dreammakergraphics\test.php on line 3" using following script from the SitePoint book:

    <?php

    $link= mysqli_connect('localhost', 'root', 'flamenco');
    if (!$link) {
    $output = 'Unable to connect to the database server.';
    include 'output.html.php';
    exit();
    }

    ?>

    As noted previously, there is no problem accessing db using MySQL Command Line Client.

    This is really getting frustrating. I have Googled for answers, and I see many, many people have trouble getting PHP5 to work with MYSQL. Some have found solutions (which I have tried, including copying libmysql.dll into Windows/System32 which is not recommended by anyone ); it still does not work.

    I have moved a copy of php.ini over to Windows, have moved extension files from C:/PHP/ext into C:PHP. Restarted Apache, restarted my computer. Nothing seems to work

    This moring I notice in phpinfo() Session.save_Path shows "no value", which is odd because I do have it set to, session.save_path = "C:/Windows/Temp" (I changed the backslashes to forward slashes to see if that had an effect nada!)

    There must be an answer out there somewhere.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  11. #11
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Configuring PHP in Windows can be a pain. Never have such problems in Linux.

    I would simply uninstall apache and mysql, and install WAMP or XAMPP. One click and your whole environment is created for you (apache+mysql+PHP+perl+phpmyadmin). Everything's put in the right place so you don't have to figure it out yourself.

  12. #12
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read through this doc, http://www.ricocheting.com/server/ which I've had success with.

    One thing to note about WAMP/XAMPP installs (unless things have changed), you'll be able to connect to mysql fine. The thing is they use ROOT as the user and no password.

    This is how mysql installs by default. if you create another account and assign it a password you still have to go in and change the file phpmyadmin points to in order to get it to work.

    I have used both in the past. Found installing them separately and following the link I provided gave more understanding of how the pieces worked together.

  13. #13
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guelphdad View Post
    Read through this doc, http://www.ricocheting.com/server/ which I've had success with.

    One thing to note about WAMP/XAMPP installs (unless things have changed), you'll be able to connect to mysql fine. The thing is they use ROOT as the user and no password.

    This is how mysql installs by default. if you create another account and assign it a password you still have to go in and change the file phpmyadmin points to in order to get it to work.

    I have used both in the past. Found installing them separately and following the link I provided gave more understanding of how the pieces worked together.
    Well, this is what SitePoint (Kevin Yank) recommends in his book, which is why I chose to go that route. I have indeed learned a lot, and I'm not having a problem with PHP or Apache. It's MySQL that is the problem (and by extension, phpMyAdmin).

    Since there is no urgency in my getting this working on my PC, I may still try to solve it. Other people have. It seems that everyone finds a different solution, probably because of different errors in their particular configuration.

    I really hate to undo everything and re-install. I'm always afraid that when I'm done, nothing will work.

    I have been just trying to go back through with a fine tooth comb and make sure everthing matches up properly.

    One thing I'm not clear about: When to use the backslash and when to use the forward slash. I thought that Kevin Yank had said to always use forward slashes. Then somewhere I saw (don't remember where) and example that showed the backslash being used. One person reported that when he corrected his .ini files to use the forward slash, his problem was solved. Any thoughts? What is the proper rule?

    Bill
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  14. #14
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    Configuring PHP in Windows can be a pain. Never have such problems in Linux.

    I would simply uninstall apache and mysql, and install WAMP or XAMPP. One click and your whole environment is created for you (apache+mysql+PHP+perl+phpmyadmin). Everything's put in the right place so you don't have to figure it out yourself.
    Point well taken, and I may end up doing that, though I don't want to (it's become a challenge ). But you're right; everyone everyplace has said it is a pain.

    I really think my problem is that there is one, maybe two things that I have done (file location, or something) that it doesn't like.

    I did notice that phpinfo() showed extension_dir C:\php5, when I had PHP installed in C:\PHP (I had changed this at one point to simply C:\PHP). So, I'm tring to go through and clean up such things, as I strongly suspect this is my problem. I renamed that directory C:\PHP5, and changed it everywhere else.

    Also, I have two php.ini files, one in C:\WINDOWS, and one in C:\PHP5, so there may have been some conflict. I had read that it should not be in C:\WINDOWS, then a number of threads said that when they put it there, it solved their problem. There is a lot of confusion out there. I know I need to have it one place or the other, not both.

    Since there is really no urgency in me getting this solved, I'm going to keep playing with it for a while. If I get it working, the educational value to me will have been worth it.

    Thanks for your reply.

    Bill
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  15. #15
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    More on this:

    Some research, reading many blogs and forums on this problem reveals that the real problem is that PHP is not loading the php.ini file (and therefore, no extensions).

    A look at phpinfo() confirms, no php.ini file loaded. It seems PHP does not care. If it can't find it, it shrugs and uses all the defaults.

    Now the problem is, why can't it find my php.ini file?

    I have tried everyting to no avail. One person posted that when he reinstalled php, his problem went away ... till he made some changes to the .ini file and then the problem appeared once again.

    This really is frustrating, and installing WAMP is not the solution either, as some of these people had done that.

    Bill O.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  16. #16
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,029
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    In phpinfo() what values do you have for Configuration File (php.ini) Path and Loaded Configuration File ?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  17. #17
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    In phpinfo() what values do you have for Configuration File (php.ini) Path and Loaded Configuration File ?


    Configuration File (php.ini) Path: C:\WINDOWS

    Loaded Configuration File: (None)

    This is what evreyone with this problem is reporting. Further, I find out that (this in the installation documentation) C:\Windows is the default directory where PHP looks for the php.ini file. However most agree that it is not wise to place the file in the Windows directory, but to leave it in the PHP direcory and put the PHP directoy in the PATH via enviromental variables.

    Secondly, the Directive in the httpd.conf file
    PHPIniDir "c:/php5/"
    is supposed to point PHP to look for the file there. That is it's purpose.

    It is now my conclusion, and that of others, that this problem is a PHP bug.

    Evidence of this is that some have reported that after struggling with this for a long time, things have mysteriously started working, and they don't know why.

    I have also read on other forums, that installing WAMP makes no difference. Many have reported this problem with that installation as well, and also on iMac installations.

    I should also point out that there is nothing wrong with the instructions in Kevin Yank's book. They are right from the PHP installation guide bundled with the software.

    Summary: PHP is not loading the custom php.ini file, which means that it loads none of the extensions you have set, and therefore, neither Joomla, phpMyAdmin, nor any other program that requires PHP and MySQL to communicate, will run.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  18. #18
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So way back, many posts ago, I provided a link that will walk you through, step-by-step, setting up php, apache, mysql and then how to configure php to work with mysql correctly.

    Did you follow the link and try everything?

  19. #19
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guelphdad View Post
    So way back, many posts ago, I provided a link that will walk you through, step-by-step, setting up php, apache, mysql and then how to configure php to work with mysql correctly.

    Did you follow the link and try everything?
    Yes, I did. Those are the exact same instructions that I have found everywhere, and are also shipped with PHP.

    However, as explained above, the php.ini file does not load. Moreover, this is a problem that is cropping up no matter what your platform.

    I'm reading another thread today http://wiki.cementhorizon.com/displa...d+not+be+found

    which is saying that some of these extensions must be loaded first before they will work.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  20. #20
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,029
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    In the Apache folder on the server there should be a folder called "bin" try copying php.ini into that (the bin) folder then restart the server.
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  21. #21
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    In the Apache folder on the server there should be a folder called "bin" try copying php.ini into that (the bin) folder then restart the server.
    Thanks, I will (but I think I may have tried that before, based on info from another forum. I'll try again though.)

    I'm thinking I may be better off to go to php4, as there are no reported problems like this with the old version.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  22. #22
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No no no, that's kind of like saying "I'll just run Windows 98".. it's really not an option!

  23. #23
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,029
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    Which version of php did you install. Have you seen the corrections and typos page for the book:

    • p.12 Installing PHP Although this book provides download and installation instructions for PHP 5.2, the newly-released (at the time of this writing) PHP 5.3 includes some new download options that aren’t covered in the book.
      There are four different versions of PHP 5.3. for Windows: VC6 Non Thread Safe, VC6 Thread Safe, VC9 Non Thread Safe, and VC9 Thread Safe. Talk about confusing!
      First of all, you definitely want a Thread Safe version of PHP. The Non Thread Safe versions are not suitable for use as a plugin for Apache.
      Secondly, assuming you will install (or have already installed) a version of the Apache HTTP Server from httpd.apache.org (see page 13), you will need the VC6 version of PHP.
      In short, to follow the instructions in this book, you need the VC6 Thread Safe version of PHP 5.3 for Windows.
    • p.138 2nd paragraph The first sentence should read "... by letting you insert special headers into the response sent to the browser."
    • p.15 Step 2 As of PHP 5.3, the file you want to duplicate is called php.ini-development, not php.ini-dist.
    • p.17 code block 3 In PHP 5.3, the extension_dir line of php.ini-development is commented out by default, so you need to remove the semicolon from the beginning of the line when adding the directory information.
    • p.206 code listing Halfway down the page, the variable $jokeId is created with $jokeId = $row[0];. On the next line (after the comment), this variable is incorrectly referenced in the SQL DELETE statement as $jokeid (lowercase 'i'). It should be $jokeId in both places.
    • p.42 2nd code block As of PHP 5.3, the file you want to duplicate is called php.ini-development, not php.ini-dist. So the last line of code should be:
      cp php.ini-development php.ini
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  24. #24
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    Which version of php did you install. Have you seen the corrections and typos page for the book:
    Thanks so much for this info. I was not aware of any typos or corrections to the book.

    I currently have php5.2.13, which I upgraded to recently in the hope that it would make a difference. It did not.

    I will immediately this morning download the php5.3 version you suggest.

    I don't know what the terms "thread safe" or "non-thread safe" mean. It's possible I have on both occassions downloaded the wrong version.

    Thanks again. I'll let you know the result.
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/

  25. #25
    SitePoint Zealot
    Join Date
    Oct 2008
    Location
    NE Ohio
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Success! It works!

    After answering your post, I immediately started download of suggested php5.3. Installed it, configured it, checked phpinfo() and there it was, the loaded php.ini file and all of the MySQL data that everyone said I should be seeing.

    Only glitch was a typo in the session.save_path which threw me an error when trying to start phpMyAdmin (different error this time) telling me to check my PHP configuration. A quick Google pointed me to check the session.save_path, and sure enough, I had a typo there.

    The only other thing I had to do was set the timezone, as it was throwing me an error on a date function I use on a Website I'm creating where I use the date functions to establish what day of the week it is for a "daily specials" menu.

    It's a great day in North East Ohio, and the sun is shinning, and the daffodils are beginning to bloom. Best of all, I've got my programs running, and I did it myself (with a little help from my friends at SitePoint)!

    Dang, I think I'm becoming a "geek", and I love it!

    Thanks to all of you who contributed time to help and advise me. I'll be on here often, perusing the threads, and probably other questions in the future.

    By the way, I think SitePoint has the best books available at great prices for everything realated to Web development, CSS etc. Thanks for those. I wish I could thank the authors personally, Kevin Yank, Rachel Andrew and the rest.

    Best Regards,
    Bill O.
    Kinsman, Ohio
    William Otis
    Flamenco aficionado and Freelance Web designer
    www.dreammakergraphics.com/


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
  •