patch: create user and database for MySQL 5.5.29 and PHP 5.4.10
Brought to you by:
stoppay
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.)
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
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);
}
?>
_--------------------------------------------------
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:
Related
Patches: #10
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
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:
Related
Patches: #10