SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 48
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Kevin Yank : Php and Mysql query.

    Hi,
    I wonder if you can help me please.
    I've purchased a copy if Kevin's "Build your own database driven web site using php and mysql" (an excellent book) but I do seem to be having some trouble with running a "While" clause.

    On page 143 of the book, Kevin describes the following while clause :-

    while ($row = mysqli_fetch_array($result))
    {
    $jokes[] = array('id' => $row['id'], 'text' => $row['joketext']);

    }

    Whenever I try to execute this my browser just "hangs". I can comment out the while loop and everything runs as expected.
    If I comment out the $jokes[] assignment and substitue in a basic assignment ( $count=0; ) the browser still "hangs" which is leading me to think that the

    $row = mysqli_fetch_array($result)
    statement is causing the issue.

    All other scripting examples up until this point have worked flawlessly.

    I am currently running :
    mysqladmin Ver 8.42 Distrib 5.1.43, for Win32 on ia32
    php-5.2.12-Win32
    IE8: version 8.0.7600.16385

    and I have 5 rows in my joke database (inserted using the insertjoke routine).

    I have checked the book's Errata web page - no joy.

    Any advice would be greatly appreciated.

    Thanks,

    Chris.

  2. #2
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I can't remember the fix here off hand. Do a search for joke database, something with the title, this question is asked like once a month
    Ryan B | My Blog | Twitter

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    The fix is to check that you have enabled the mysqli drivers.

    Secondly, it helps to check that the database connection is valid before making use of it.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the tips.
    If I had problems with the mysql drivers or database connection would the other scripts described earlier in Kevin's book have worked successfully ?

    Apologies if these seem daft questions - hopefully I'll get up to speed with php and mysql soon !

  5. #5
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Define "hangs".
    If it really hangs, like any other application, so you could not press any button? Or it just shows blank page and continue loading something?
    First one is not PHP issue and latter one usually means infinite loop in your script.
    But this code doesn't seem to be infinite.
    To detect it, add an incrementing counter variable and a condition, like this:
    if ($counter++ > 10) die($counter);
    inside your loop

    To check if something wrong with mysqli_fetch_array function, substitute whole loop with just one call
    $row = mysqli_fetch_array($result);

  6. #6
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,027
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    mingkwong, check your Apache error log, what shows up around the time that your trying the script?
    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 Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apologies for the slow reply...

    rguy84:
    ======
    Thanks you. I found a thread that suggested upgrading the version of php would be the answer. Unfortunately that didn't work for me - so have reverted back to my original.

    Shrapnel_N5:
    ==========
    You're right - "hang" is incorrect. The page attempts to load and after maybe 10-15 seconds then displays the standard page "internet explorer cannot display the web page"
    I replaced the while loop with your suggested $row = mysqli_fetch_array($result); but the result was the same - "internet explorer cannot display the web page"

    It does seem strange as the statement in Kevin's addjoke works perfectly.
    while ($row = mysqli_fetch_array($result))
    {
    $jokes[] = $row['joketext'];
    }

    As for your count suggestion within the while loop - again "internet explorer cannot display the web page"

    One thing I did find in my search thru the forum was that it was noted that this issue only seemed to happen when there was more than one column being selected from the database - i.e. when using
    $result = mysqli_query($link, 'SELECT id, joketext FROM joke');
    the page won't load - the while clause appears to be the issue (deletejoke)

    when using $result = mysqli_query($link, 'SELECT joketext FROM joke');
    the page loads (addjoke)

    SpacePhoenix:
    ===========
    My log file shows the following :-
    [Fri Feb 26 17:11:46 2010] [notice] Parent: child process exited with status 255 -- Restarting.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    [Fri Feb 26 17:11:46 2010] [notice] Apache/2.2.14 (Win32) PHP/5.2.12 configured -- resuming normal operations
    [Fri Feb 26 17:11:46 2010] [notice] Server built: Sep 28 2009 22:41:08
    [Fri Feb 26 17:11:46 2010] [notice] Parent: Created child process 4092
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    [Fri Feb 26 17:11:46 2010] [notice] Child 4092: Child process is running
    [Fri Feb 26 17:11:46 2010] [notice] Child 4092: Acquired the start mutex.
    [Fri Feb 26 17:11:46 2010] [notice] Child 4092: Starting 64 worker threads.
    [Fri Feb 26 17:11:46 2010] [notice] Child 4092: Starting thread to listen on port 80.
    [Fri Feb 26 17:11:47 2010] [notice] Parent: child process exited with status 255 -- Restarting.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    [Fri Feb 26 17:11:47 2010] [notice] Apache/2.2.14 (Win32) PHP/5.2.12 configured -- resuming normal operations
    [Fri Feb 26 17:11:47 2010] [notice] Server built: Sep 28 2009 22:41:08
    [Fri Feb 26 17:11:47 2010] [notice] Parent: Created child process 4016
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    [Fri Feb 26 17:11:47 2010] [notice] Child 4016: Child process is running
    [Fri Feb 26 17:11:47 2010] [notice] Child 4016: Acquired the start mutex.
    [Fri Feb 26 17:11:47 2010] [notice] Child 4016: Starting 64 worker threads.
    [Fri Feb 26 17:11:47 2010] [notice] Child 4016: Starting thread to listen on port 80.

    I will continue to search the forum as if this is a regular problem - there must be a solution - but as always - any advise would be gratefully received !

    Thanks guys.....

  8. #8
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Run this code please
    <?php wrongg() ?>
    I am sure you won't see an error message, and that's the problem

    There is problem somewhere but without PHP error messages it cannot be found.
    I'd suggest to put these lines at the top of your script
    PHP Code:
    ini_set('display_errors',1);
    error_reporting(E_ALL); 
    and run it without hanging part(mysqli_fetch_array)
    PHP Code:
    var_dump($result);
    and echo 
    mysqli_error(); 
    also valuable

    Beside this, i remember some problem with this code from the book.
    What's the structure of jokes table?

  9. #9
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok.....

    <?php wrongg() ?>
    ==============
    Fatal error: Call to undefined function wrongg() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Test\index.php on line 1



    var_dump($result);
    echo mysqli_error();
    ===============

    object(mysqli_result)#2 (0) { }
    Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 94

    Add your own joke

    Here are all the jokes in the database:


    Notice: Undefined variable: jokes in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\jokes.html.php on line 12

    Warning: Invalid argument supplied for foreach() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\jokes.html.php on line 12

    I am guessing that the undefined variable is now because I have commented out the (mysqli_fetch_array)


    The table structure is defined as:-
    ==========================
    # Code to create a simple joke table

    CREATE TABLE joke (
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    joketext TEXT,
    jokedate DATE NOT NULL
    ) DEFAULT CHARACTER SET utf8;

  10. #10
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    seems very strange to me.
    from the object(mysqli_result)#2 we can see then query was executed properly
    please, add this line to the code, uncomment mysqli_fetch_array and take a look into webserver error_log again:
    PHP Code:
    ini_set('log_errors',1); 

  11. #11
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok - the log file now shows :

    [Fri Feb 26 18:06:56 2010] [notice] Parent: child process exited with status 255 -- Restarting.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    [Fri Feb 26 18:06:56 2010] [notice] Apache/2.2.14 (Win32) PHP/5.2.12 configured -- resuming normal operations
    [Fri Feb 26 18:06:56 2010] [notice] Server built: Sep 28 2009 22:41:08
    [Fri Feb 26 18:06:56 2010] [notice] Parent: Created child process 4040
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    [Fri Feb 26 18:06:56 2010] [notice] Child 4040: Child process is running
    [Fri Feb 26 18:06:56 2010] [notice] Child 4040: Acquired the start mutex.
    [Fri Feb 26 18:06:56 2010] [notice] Child 4040: Starting 64 worker threads.
    [Fri Feb 26 18:06:56 2010] [notice] Child 4040: Starting thread to listen on port 80

  12. #12
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    umm. seems strange.
    there must be all the errors you see in the browser.
    though I whas in hope to see an error from the mysqli_fetch_array

    even more strange thing I just noticed: as you said the same query goes fine just with fewer number of fields.
    Can you try it on this very script?
    SELECT joketext FROM joke
    instead of
    SELECT id, joketext FROM joke

  13. #13
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if i just select the joketext and leave the while statement as it currently is
    ( $jokes[] = array('id' => $row['id'], 'text' => $row['joketext']); )


    object(mysqli_result)#2 (0) { }
    Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 94

    Notice: Undefined index: id in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 100

    Notice: Undefined index: id in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 100

    Notice: Undefined index: id in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 100

    Notice: Undefined index: id in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 100

    Notice: Undefined index: id in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 100

    Notice: Undefined index: id in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 100

    Add your own joke

    Here are all the jokes in the database:

    why did the chicken cross the road ? to get to the other side !

    got the database working on the server at last.

    here's another naff joke

    can't think of another one !



    if I remove the reference to id in the array assignment then I get :

    object(mysqli_result)#2 (0) { }
    Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 94

    Add your own joke

    Here are all the jokes in the database:

    why did the chicken cross the road ? to get to the other side !

    got the database working on the server at last.

    here's another naff joke

    can't think of another one !



    ok - so not really jokes as I don't know any ! but it kinda proves the application works/fails.

  14. #14
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am giving up.
    It seems impossible to me.
    Nothing of general debugging techniques can help here, if error really depends on the requested field's list - it shouldn't! It's just nonsense.

  15. #15
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i've spent a week a "novice beginner" level trying to sort it !
    i'll keep looking thru the forum and surf around and see if i find anything.
    it worries me too that others seem to have fixed the issue - but by having to upgrade to a newer version of php - which for me hasn't worked. i would have hoped that php would have been stable at this level across releases.
    I need to leave this for now - but will look at it again tomorrow.

    thank you for your time and effort.

  16. #16
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They would beat me for this but I'd say anyway.
    I think it's a mysqli library problem
    if you switch to mysql (everything the same but just without trailing i) - everything will be fine, I am sure.
    At least you can try it.

  17. #17
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    I will try to obtain Kevin Yanks book and try things out on a local wamp server some time tomorrow.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  18. #18
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,169
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    The "mysqli_error() expects exactly 1 parameter" error message suggests you are losing the resource. The $link from mysqli_connect() or mysqli_init() http://php.net/manual/en/mysqli.error.php

    Although I don't know what would cause the loss in some instances and not others. Can you look at the table's contents? (got phpMyAdmin ??)

    It works when you only SELECT 'joketext' but not for SELECT 'id', 'joketext'
    How about only SELECT 'id' ??

  19. #19
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shrapnel_N5
    =========

    it didn't work.....

    I tried a number of combinations.......

    I retained the original setting in the php.ini file keeping the I extension.
    extension=php_mysqli.dll

    and then ran the query without the I
    $result = mysql_query($link, 'SELECT id, joketext FROM joke');

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

    I then amended the php.ini file to set the extension to mysql
    extension=php_mysql.dll

    I retained the I on the mysql query:
    and got the following message:
    Fatal error: Call to undefined function mysqli_connect() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\deletejoke\index.php on line 30

    I finally set the php.ini setting to
    extension=php_mysql.dll
    and ran the query without the I - changing all references in the script from mysqli_ to mysql_

    web page showed the "Internet Explorer cannot display the webpage"

    am starting to get disheartened now.....

    Mittineague
    ========
    i can go into mysql and select from the table without problems
    mysql> select * from joke;
    +----+-----------------------------------------------------------------+--------
    ----+
    | id | joketext | jokedat
    e |
    +----+-----------------------------------------------------------------+--------
    ----+
    | 1 | why did the chicken cross the road ? to get to the other side ! | 2009-04
    -01 |
    | 2 | got the database working on the server at last. | 2010-02
    -20 |
    | 3 | here's another naff joke
    | 2010-02-20 |
    | 8 | can't think of another one ! | 2010-02
    -21 |

    +----+-----------------------------------------------------------------+--------
    ----+
    4 rows in set (0.00 sec)

    mysql>
    mysql> select id, joketext from joke where joketext like '%naff%';
    +----+----------------------------+
    | id | joketext |
    +----+----------------------------+
    | 3 | here's another naff joke
    |
    +----+----------------------------+
    1 row in set (0.03 sec)

    mysql>

    I have tried the same setup on two different machines now - 1 laptop and 1 pc - exactly the same problems.

    Would it be possible to post the version numbers of Apache / Mysql / PHP that you guys have working correctly and I will try installing those combinations.

    Thanks,

    Chris.

  20. #20
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,169
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    The first couple of errors make sense, they should have happened
    If the ini has the two dll's mysql and mysqli
    and you enable one and disable the other (remember to restart the server)
    then try to use the one you disabled
    you will get the Fatal Error

    Off Topic:

    You may need to take a short break and get away from this for a while. Being frazzled doesn't help, I know from my own experience. Sometimes I get so into trying to solve a problem and get so wound up I become inefficient. I stop, get a cup of tea, come back to it, and 9 times out of 10 there the answer is staring me in the face.


    Your asking about AMP versions triggered a memory. So I searched for old threads. No joy finding the one I was looking for, but I think it was something about a particular version of PHP not playing nicely with mysqli

    I think what would be easiest is to:
    enable both the mysql and mysqli dll's
    restart the server
    try using only the mysql functions
    try using only the mysqli functions

    If the code using only the mysql functions works, and the code using only the mysqli functions doesn't, then you can hopefully find out what versions you need, or change the code used by the book to use mysql functions.

  21. #21
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've got an idea!
    mingkwong, can you post here exact copy of the script you're running?
    Run it, watch browser freeze, and copy it as is?

  22. #22
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shrapnel_N5
    =========
    I have now reset my php.ini file to set
    extension=php_mysqli.dll

    I have rebooted and restarted.
    I have replaced all references to mysql_ to mysqli_

    The php script I am running is based on Kevin's example but now includes all the hints and tips you have given me. Excuse the size - but here it is in full..

    ===============================================
    <?php
    ini_set('display_errors',1);
    error_reporting(E_ALL);



    if (get_magic_quotes_gpc())
    {
    function stripslashes_deep($value)
    {
    $value = is_array($value) ?
    array_map('stripslashes_deep', $value) :
    stripslashes($value);

    return $value;
    }

    $_POST = array_map('stripslashes_deep', $_POST);
    $_GET = array_map('stripslashes_deep', $_GET);
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
    $_REQUEST = array_map('stripslashes_deep', $_REQUEST);
    }

    if (isset($_GET['addjoke']))
    {
    include 'form.html.php';
    exit();
    }

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

    if (!mysqli_set_charset($link, 'utf8'))
    {
    $output = 'Unable to set database connection encoding.';
    include 'output.html.php';
    exit();
    }

    if (!mysqli_select_db($link, 'joke_db'))
    {
    $error = 'Unable to locate the joke database.';
    include 'error.html.php';
    exit();
    }

    if (isset($_POST['joketext']))
    {
    $joketext = mysqli_real_escape_string($link, $_POST['joketext']);
    $sql = 'INSERT INTO joke SET
    joketext="' . $joketext . '",
    jokedate=CURDATE()';
    if (!mysqli_query($link, $sql))
    {
    $error = 'Error adding submitted joke: ' . mysqli_error($link);
    include 'error.html.php';
    exit();
    }

    header('Location: .');
    exit();
    }

    if (isset($_GET['deletejoke']))
    {
    $id = mysqli_real_escape_string($link, $_POST['id']);
    $sql = "DELETE FROM joke WHERE id='$id'";
    if (!mysqli_query($link, $sql))
    {
    $error = 'Error deleting joke: ' . mysqli_error($link);
    include 'error.html.php';
    exit();
    }

    header('Location: .');
    exit();
    }

    $result = mysqli_query($link, 'SELECT id, joketext FROM joke');
    if (!$result)
    {
    $error = 'Error fetching jokes: ' . mysqli_error($link);
    include 'error.html.php';
    exit();
    }


    var_dump($result);
    echo mysqli_error();
    ini_set('log_errors',1);

    while ($row = mysqli_fetch_array($result))
    {
    $jokes[] = array('id' => $row['id'], 'text' => $row['joketext']);
    }


    include 'jokes.html.php';

    ?>

    ====================================================

    The included jokes.html.php file is as follows :-

    ====================================================
    <!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">
    <head>
    <title>List of Jokes</title>
    <meta http-equiv="content-type"
    content="text/html; charset=utf-8"/>
    </head>
    <body>
    <p><a href="?addjoke">Add your own joke</a></p>
    <p>Here are all the jokes in the database/p>
    <?php foreach ($jokes as $joke): ?>
    <form action="?deletejoke" method="post">
    <blockquote>
    <p>
    <?php echo htmlspecialchars($joke['text'], ENT_QUOTES,
    'UTF-8'); ?>
    <input type="hidden" name="id" value="<?php
    echo $joke['id']; ?>"/>
    <input type="submit" value="Delete"/>
    </p>
    </blockquote>
    </form>
    <?php endforeach; ?>
    </body>
    </html>
    ===================================================

    The lastest attempt still fails and the error log is reporting :-

    at Feb 27 21:06:17 2010] [notice] Parent: child process exited with status 255 -- Restarting.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    [Sat Feb 27 21:06:17 2010] [notice] Apache/2.2.14 (Win32) PHP/5.2.12 configured -- resuming normal operations
    [Sat Feb 27 21:06:17 2010] [notice] Server built: Sep 28 2009 22:41:08
    [Sat Feb 27 21:06:17 2010] [notice] Parent: Created child process 3464
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName
    [Sat Feb 27 21:06:17 2010] [notice] Child 3464: Child process is running
    [Sat Feb 27 21:06:17 2010] [notice] Child 3464: Acquired the start mutex.
    [Sat Feb 27 21:06:17 2010] [notice] Child 3464: Starting 64 worker threads.
    [Sat Feb 27 21:06:17 2010] [notice] Child 3464: Starting thread to listen on port 80.


    Mittineague
    =========
    Thank you for the suggestion.
    I did try that earlier. I know that too failed - but I don't recall the exact problems now. I will repeat and let you know.

    Once again - thanks to all for your help....

  23. #23
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I tried it and no luck - everything goes fine... As it should

  24. #24
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well - looking at the SQL it's spot on - so I'm not surprised. It has to be something to do with the setup here.
    It seems really strange that I can select a single column from the table - but not multiple columns. It just doesn't make sense.

    the fact that I've got the problem on more than one machine does seems to suggest it's not "installation specific".

    Can you tell me what versions of PHP and MYSQL you are using please ?

  25. #25
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    As it seems that some types of selects work while other don't, I would like to see some details about your table structure.

    From the mysql prompt

    Code:
    mysql -u root -p
    can you connect to the ijdb database

    Code:
    mysql> use ijdb
    and show us the result when you ask to describe the joke table?

    Code:
    mysql> describe joke;
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •