Menu

#10 patch: create user and database for MySQL 5.5.29 and PHP 5.4.10

open
nobody
None
5
2013-07-23
2013-07-08
No

I've moved my dump.sql to a more informative "create_db_and_user.sql" file and added a couple of lines to WARNING drop existing DB if exists and recreate.

Don't know if anyone is interested. (Judging by activity.)

1 Attachments

Related

Patches: #10

Discussion

  • Daniel

    Daniel - 2013-07-23

    Michael Greetings.

    make your steps but I can not make it work the inventory, I have php-5.4.10, mysql 5.5, apache 2.4.4 but does not work, can you help?

    db.inc.php
    <?php

    If (isset($db)) {
    function dbquery($strSQL) {
    global $db;
    If (!$queryValue = @mysql_query($strSQL, $db)) {
    die("

    <Font color="red">Error: ".mysql_error());
    } Else {
    return $queryValue;
    }
    }

    function dbqueryWithAlert($strSQL, $adminEmail, $errorMessage) {
    global $db, $strError, $criticalTransactionError;
    If (!$queryValue = @mysql_query($strSQL, $db)) {
    if ($mail_enable) {
    mail($adminEmail, "PMI Critical Error: ".date("m-d-Y"), $errorMessage);
    }
    $strError = $errorMessage;
    $criticalTransactionError = TRUE;
    } Else {
    return $queryValue;
    }
    }

    $db = mysql_connect('localhost','phpmyinv','DbPass!');
    mysql_select_db('phpMyInventory',$db);

    }

    ?>

    _--------------------------------------------------

     

    Last edit: Daniel 2013-07-23
  • Daniel

    Daniel - 2013-07-23

    Michael Greetings.

    make your steps but I can not make it work the inventory, I have php-5.4.10, mysql 5.5, apache 2.4.4 but does not work, can you help?

    db.inc.php
    <?php

    If (isset($db)) {
    function dbquery($strSQL) {
    global $db;
    If (!$queryValue = @mysql_query($strSQL, $db)) {
    die("

    <Font color="red">Error: ".mysql_error());
    } Else {
    return $queryValue;
    }
    }

    function dbqueryWithAlert($strSQL, $adminEmail, $errorMessage) {
    global $db, $strError, $criticalTransactionError;
    If (!$queryValue = @mysql_query($strSQL, $db)) {
    if ($mail_enable) {
    mail($adminEmail, "PMI Critical Error: ".date("m-d-Y"), $errorMessage);
    }
    $strError = $errorMessage;
    $criticalTransactionError = TRUE;
    } Else {
    return $queryValue;
    }
    }

    $db = mysql_connect('localhost','phpmyinv','DbPass!');
    mysql_select_db('phpMyInventory',$db);

    }

    ?>

    _--------------------------------------------------

     
  • Michael Stoppay

    Michael Stoppay - 2013-07-23

    Daniel,

    I code was written using much older versions of PHP and MySQL. It isn't
    functional using modern versions. I spent some time trying to fix the code
    once I took over the project but didn't really make any progress.

    -Mike

    On Tue, Jul 23, 2013 at 2:11 AM, Daniel dronces@users.sf.net wrote:

    Michael Greetings.

    make your steps but I can not make it work the inventory, I have
    php-5.4.10, mysql 5.5, apache 2.4.4 but does not work, can you help?

    db.inc.php
    <?php

    If (isset($db)) {
    function dbquery($strSQL) {
    global $db;
    If (!$queryValue = @mysql_query($strSQL, $db)) {
    die("

    Error: ".mysql_error());
    } Else {
    return $queryValue;
    }
    }

    function dbqueryWithAlert($strSQL, $adminEmail, $errorMessage) {
    global $db, $strError, $criticalTransactionError;
    If (!$queryValue = @mysql_query($strSQL, $db)) {
    if ($mail_enable) {
    mail($adminEmail, "PMI Critical Error: ".date("m-d-Y"), $errorMessage);
    }
    $strError = $errorMessage;
    $criticalTransactionError = TRUE;
    } Else {
    return $queryValue;
    }
    }

    $db = mysql_connect('localhost','phpmyinv','DbPass!');
    mysql_select_db('phpMyInventory',$db);

    }

    ?>

    _--------------------------------------------------

    Attachment: C:\Apache24\htdocs\phpMyInventory\Includes\db.inc.php (840
    Bytes; application/octet-stream)


    Status: open
    Created: Mon Jul 08, 2013 02:58 PM UTC by Michael C Tiernan
    Last Updated: Mon Jul 08, 2013 02:58 PM UTC
    Owner: nobody

    I've moved my dump.sql to a more informative "create_db_and_user.sql" file
    and added a couple of lines to WARNING drop existing DB if exists and
    recreate.

    Don't know if anyone is interested. (Judging by activity.)

    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/phpmyinventory/patches/10/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Patches: #10

    • Daniel

      Daniel - 2013-07-29

      Thanks Mike, I have installed PHP 5.0.4, MySQL 5.5.29, Apache 2.0.59, I get the login page phpmyinvetory, but when entering a username and password to send me this error

      Fatal error: Call to undefined function dbquery() in C:\apache2059\Apache2\htdocs\phpMyInventory\login.php on line 19

      the code to install is as follows

       

      Last edit: Daniel 2013-07-29
  • Michael Stoppay

    Michael Stoppay - 2013-07-25

    I code was written using much older versions of PHP and MySQL. It isn't
    functional using modern versions. I spent some time trying to fix the code
    once I took over the project but didn't really make any progress.

    -Mike

    On Thu, Jul 25, 2013 at 12:43 PM, Daniel dronces@users.sf.net wrote:

    Michael Greetings.

    make your steps but I can not make it work the inventory, I have
    php-5.4.10, mysql 5.5, apache 2.4.4 but does not work, can you help?

    db.inc.php
    <?php

    If (isset($db)) {
    function dbquery($strSQL) {
    global $db;
    If (!$queryValue = @mysql_query($strSQL, $db)) {
    die("

    Error: ".mysql_error());
    } Else {
    return $queryValue;
    }
    }

    function dbqueryWithAlert($strSQL, $adminEmail, $errorMessage) {
    global $db, $strError, $criticalTransactionError;
    If (!$queryValue = @mysql_query($strSQL, $db)) {
    if ($mail_enable) {
    mail($adminEmail, "PMI Critical Error: ".date("m-d-Y"), $errorMessage);
    }
    $strError = $errorMessage;
    $criticalTransactionError = TRUE;
    } Else {
    return $queryValue;
    }
    }

    $db = mysql_connect('localhost','phpmyinv','DbPass!');
    mysql_select_db('phpMyInventory',$db);

    }

    ?>

    _--------------------------------------------------

    Attachment: C:\Apache24\htdocs\phpMyInventory\Includes\db.inc.php (840
    Bytes; application/octet-stream)


    Status: open
    Created: Mon Jul 08, 2013 02:58 PM UTC by Michael C Tiernan
    Last Updated: Tue Jul 23, 2013 06:11 AM UTC
    Owner: nobody

    I've moved my dump.sql to a more informative "create_db_and_user.sql" file
    and added a couple of lines to WARNING drop existing DB if exists and
    recreate.

    Don't know if anyone is interested. (Judging by activity.)

    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/phpmyinventory/patches/10/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Patches: #10


Log in to post a comment.