Nov 21, 2009
Pages: 1, 2

What Is The MySQL Version @ Asta ? - MySQL 4.0.26-Max

free web hosting

Read Latest Entries..: (Post #16) by nightfox on Nov 30 2006, 01:36 AM.
You guys could try getting Xisto to update MySQL on the server to a 4.1.X version if it is secure and stable enough (in their opinion of course). Just ask at http://www.xisto.com/helpdesk (follow the instructions there since they've been having spam problems).[N]F
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion & Free Web Hosting > Astahost > Hosted Members Support

What Is The MySQL Version @ Asta ? - MySQL 4.0.26-Max

faulty.lee
Hi,

A few question here,

1. Just wondering, the MySQL hosted on astahost.com is actually version "4.0.26-Max" according to phpmyadmin. But why is cPanel showing "4.1.21-standard"?

2. Actually i've existing codes that need function introduced after version 4.1.1, is there by any chance astahost or xisto is going to upgrade the MySQL package?

Thanks

Comment/Reply (w/o sign-up)

TavoxPeru
QUOTE(faulty.lee @ Nov 21 2006, 02:42 AM) *

Hi,

A few question here,

1. Just wondering, the MySQL hosted on astahost.com is actually version "4.0.26-Max" according to phpmyadmin. But why is cPanel showing "4.1.21-standard"?

2. Actually i've existing codes that need function introduced after version 4.1.1, is there by any chance astahost or xisto is going to upgrade the MySQL package?

Thanks

Hi,

In my case cPanel shows that i have MySql version 4.0.27-standard but according to phpMyAdmin i have 4.0.26-Max, its very strange, may be an admin can tell us why exists this differences.

Best regards,

Comment/Reply (w/o sign-up)

faulty.lee
Hi,

I have another question. My web page needs to use a few mysql function that's introduce after v4.1.1, since our hosting only provide v4.0.26, just wondering is there any alternative function for :
1. DATEDIFF
2. TIMEDIFF
3. ADDTIME
4. SUBTIME

Most important is actually TIMEDIFF. I've googled and no result. Really sad, never thought that i'll actually use a function that's not available in common hosting server sad.gif

Comment/Reply (w/o sign-up)

Ed :P
QUOTE(faulty.lee @ Nov 22 2006, 04:21 AM) *

Hi,

I have another question. My web page needs to use a few mysql function that's introduce after v4.1.1, since our hosting only provide v4.0.26, just wondering is there any alternative function for :
1. DATEDIFF
2. TIMEDIFF
3. ADDTIME
4. SUBTIME

Most important is actually TIMEDIFF. I've googled and no result. Really sad, never thought that i'll actually use a function that's not available in common hosting server sad.gif

Those don;t sound like functions but board names. If google can't help you, and they've cached all of the mysql handbook then there minor, changable things. Decipher the php (i assume) your using and just figure out how they work. If all else fails, follow original instructions completly.

 

 

 


Comment/Reply (w/o sign-up)

faulty.lee
QUOTE(Ed :P @ Nov 22 2006, 12:29 PM) *

Those don;t sound like functions but board names. If google can't help you, and they've cached all of the mysql handbook then there minor, changable things. Decipher the php (i assume) your using and just figure out how they work. If all else fails, follow original instructions completly.


Those are MySQL's functions. I wrote the web software myself. It was working on my machine and on hosting server that provides MySQL version higher than 4.1.1. As also mentioned in MySQL reference manual, those function are only introduce after 4.1.1

Comment/Reply (w/o sign-up)

TavoxPeru
QUOTE(faulty.lee @ Nov 21 2006, 11:48 PM) *

Those are MySQL's functions. I wrote the web software myself. It was working on my machine and on hosting server that provides MySQL version higher than 4.1.1. As also mentioned in MySQL reference manual, those function are only introduce after 4.1.1

Well, a few months ago i need the same functions exactly for the same reasons as you and lucky me i found this php code but i dont remember where i found it sad.gif so i hope it helps you.

CODE
<?php
function datediff($interval, $datefrom, $dateto, $using_timestamps = false) {
    /*
    $interval can be:
    yyyy - Number of full years
    q - Number of full quarters
    m - Number of full months
    y - Difference between day numbers
    (eg 1st Jan 2004 is "1", the first day. 2nd Feb 2003 is "33". The datediff is "-32".)
    d - Number of full days
    w - Number of full weekdays
    ww - Number of full weeks
    h - Number of full hours
    n - Number of full minutes
    s - Number of full seconds (default)
    */

    if (!$using_timestamps) {
        $datefrom = strtotime($datefrom, 0);
        $dateto = strtotime($dateto, 0);
    }

    $difference = $dateto - $datefrom; // Difference in seconds

    switch($interval) {
        case 'yyyy': // Number of full years
            $years_difference = floor($difference / 31536000);
            if (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom), date("j", $datefrom), date("Y", $datefrom)+$years_difference) > $dateto) {
                $years_difference--;
            }
            if (mktime(date("H", $dateto), date("i", $dateto), date("s", $dateto), date("n", $dateto), date("j", $dateto), date("Y", $dateto)-($years_difference+1)) > $datefrom) {
                $years_difference++;
            }
            $datediff = $years_difference;
            break;

        case "q": // Number of full quarters
            $quarters_difference = floor($difference / 8035200);
            while (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom)+($quarters_difference*3), date("j", $dateto), date("Y", $datefrom)) < $dateto) {
                $months_difference++;
            }
            $quarters_difference--;
            $datediff = $quarters_difference;
            break;

        case "m": // Number of full months
            $months_difference = floor($difference / 2678400);
            while (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom)+($months_difference), date("j", $dateto), date("Y", $datefrom)) < $dateto) {
                $months_difference++;
            }
            $months_difference--;
            $datediff = $months_difference;
            break;

        case 'y': // Difference between day numbers
            $datediff = date("z", $dateto) - date("z", $datefrom);
            break;

        case "d": // Number of full days
            $datediff = floor($difference / 86400);
            break;

        case "w": // Number of full weekdays
            $days_difference = floor($difference / 86400);
            $weeks_difference = floor($days_difference / 7); // Complete weeks
            $first_day = date("w", $datefrom);
            $days_remainder = floor($days_difference % 7);
            $odd_days = $first_day + $days_remainder; // Do we have a Saturday or Sunday in the remainder?
            if ($odd_days > 7) { // Sunday
                $days_remainder--;
            }
            if ($odd_days > 6) { // Saturday
                $days_remainder--;
            }
            $datediff = ($weeks_difference * 5) + $days_remainder;
            break;

        case "ww": // Number of full weeks
            $datediff = floor($difference / 604800);
            break;

        case "h": // Number of full hours
            $datediff = floor($difference / 3600);
            break;

        case "n": // Number of full minutes
            $datediff = floor($difference / 60);
            break;

        default: // Number of full seconds (default)
            $datediff = $difference;
            break;
    }
    return $datediff;
}
//echo datediff('d','9/7/2006','12/7/2006')
//this will return the interval of day between the 2 days
?>

Best regards,

Comment/Reply (w/o sign-up)

faulty.lee
Thanks, that sure helps.

Actually I was also looking for a way to do it in mysql itself, cause my query involve some recursive calculation on date/time. If it were to read the result then process by php, performance will be greatly reduce. Well, if there's no alternative, then that might have to be the only way out.

Thanks again

Comment/Reply (w/o sign-up)

NoMore
according to my script
MySQL Version:4.0.26-Max
MySQL client Version:4.1.21
my script chackes server details (homepage -> Server Details) based on MySQL conection to a user

NoMore

Comment/Reply (w/o sign-up)

CaptainRon
Why don't we put up a request to the admin that to upgrade to MySQL 5?
Is there any way by which backward compatibility be maintained?

Comment/Reply (w/o sign-up)

TavoxPeru
QUOTE(faulty.lee @ Nov 23 2006, 12:02 AM) *

Thanks, that sure helps.

Actually I was also looking for a way to do it in mysql itself, cause my query involve some recursive calculation on date/time. If it were to read the result then process by php, performance will be greatly reduce. Well, if there's no alternative, then that might have to be the only way out.

Thanks again

You are welcome, and if you want a way to do it in mysql well you can check the store procedures and functions -it works since version 5.0- or you can create your own functions using the UDF interface or also you can add functions as native (built in) mysql functions, this what i found at the mysql manual:
QUOTE
  • You can add functions through the user-defined function (UDF) interface. User-defined functions are compiled as object files and then added to and removed from the server dynamically using the CREATE FUNCTION and DROP FUNCTION statements. See Section 24.2.2, “CREATE FUNCTION Syntax”.
  • You can add functions as native (built-in) MySQL functions. Native functions are compiled into the mysqld server and become available on a permanent basis

Best regards,

Comment/Reply (w/o sign-up)

Latest Entries

nightfox
You guys could try getting Xisto to update MySQL on the server to a 4.1.X version if it is secure and stable enough (in their opinion of course). Just ask at http://www.xisto.com/helpdesk (follow the instructions there since they've been having spam problems).

[N]F

Comment/Reply (w/o sign-up)

TavoxPeru
QUOTE(faulty.lee @ Nov 27 2006, 10:54 PM) *

That 2 function TIME_TO_SEC/SEC_TO_TIME is actually very useful for calculating interval. Divide by 60, then you get minute and so on. Really flexible, can get into anything you want to do with date/time

I have both the 1st and 2nd edition of the Php Cookbook. The 1st targeting 3.x and 4.x while the 2nd targeting 5.x. Am i allowed to upload pirated/illegal item in this forum? I don't mind to upload. If i'm not allowed to, then i can email to you

The posibilities that offers these functions are very helpul, i think that can be used in a lot of cases involving time and date calculations, such as adding or substracting date/time intervals, etc. and most important is that they are backward compatibility.

I don't mind to upload either but we are not allowed to upload such things to the forum, so please email me or send me a PM.

Best regards,

Comment/Reply (w/o sign-up)

faulty.lee
QUOTE(TavoxPeru @ Nov 28 2006, 03:26 AM) *

Well first time i listen about this 2 mysql functions, that's because when i found a solution for something only sometimes i continue searching another solution wink.gif

And about the O'Reilly's Cookbook series i agree with you, there are really good, right now i'm reading the PHP Cookbook but i'm not sure which PHP version was used, i guess 4.x, could someone share an updated version of this book????

Best regards,

That 2 function TIME_TO_SEC/SEC_TO_TIME is actually very useful for calculating interval. Divide by 60, then you get minute and so on. Really flexible, can get into anything you want to do with date/time

I have both the 1st and 2nd edition of the Php Cookbook. The 1st targeting 3.x and 4.x while the 2nd targeting 5.x. Am i allowed to upload pirated/illegal item in this forum? I don't mind to upload. If i'm not allowed to, then i can email to you

Comment/Reply (w/o sign-up)

TavoxPeru
QUOTE(faulty.lee @ Nov 26 2006, 02:21 PM) *

Hi,

I've found the way to do what i wanted in the first place.

TIMEDIFF(t1, t2) can be replace with
CODE
SEC_TO_TIME(TIME_TO_SEC(t2) - TIME_TO_SEC(t1))

simple as that. Never thought of it that way

Found that in O'Reilly: MySQL Cookbook. The O'Reilly's series is really good, very thoughtful and well suited problem/solution type of book for programmers.

Just have to replace all occurrences of TIMEDIFF with the above. At least that solved part of my problem, now my code can run on MySQL older that 4.1.1. Will have to remember to stick to the lowest possible denominator all time, for portability.

Hooray!!!!!

Well first time i listen about this 2 mysql functions, that's because when i found a solution for something only sometimes i continue searching another solution wink.gif

And about the O'Reilly's Cookbook series i agree with you, there are really good, right now i'm reading the PHP Cookbook but i'm not sure which PHP version was used, i guess 4.x, could someone share an updated version of this book????

Best regards,

Comment/Reply (w/o sign-up)

faulty.lee
Hi,

I've found the way to do what i wanted in the first place.

TIMEDIFF(t1, t2) can be replace with
CODE
SEC_TO_TIME(TIME_TO_SEC(t2) - TIME_TO_SEC(t1))

simple as that. Never thought of it that way

Found that in O'Reilly: MySQL Cookbook. The O'Reilly's series is really good, very thoughtful and well suited problem/solution type of book for programmers.

Just have to replace all occurrences of TIMEDIFF with the above. At least that solved part of my problem, now my code can run on MySQL older that 4.1.1. Will have to remember to stick to the lowest possible denominator all time, for portability.

Hooray!!!!!



Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2
Similar Topics

Keywords : Mysql Version Asta Mysql 4026 Maxbr

  1. Mysql Connect Error, Too Many Connections. - (1)
    Just to begin with I want to say that I am not here necessarily to complain about it lol. I'm
    not sure but if my site is possibly helping to contribute to the problem, I'd like to know if
    anyone knows any good articles or tutorials that might have information on what to look out for that
    could contribute to these sort of problems. I know my site may not have anything to do with it (as
    I don't think it is overly popular or anything or even close), but knowing what to look out for
    when messing with PHP/mySQL would be great. I personally haven't found too...
  2. Connecting To Astahost's Mysql - (8)
  3. Mysql Server Not Stable After Hard Disk Swap On April 6th - (2)
    Hi... All are aware of the server issues happened on April 6th:
    http://www.astahost.com/current-server-iss...ade-t15435.html I'm still facing the issue with
    the MySQL Server after the server problems!! I'm using phpBB forum for my site, and it often
    shows some error message after losing connection with the Database server! Its happening many times
    in a minute! Its not at all stable after the server issues! I had tried repairing the databases and
    optimizing the databases! But nothing helped me! Still facing the issues! Its showing like:
    DEBUG MODE ...
  4. Site Not Opeing ( Phpbb Forum) :: Can't Connect To Local Mysql - (3)
    Hi all, Please help me! My site was working fine! ( www.fun.niranvv.com ) But now, its showing
    one error message as: Warning: mysql_connect() : Can't connect to local MySQL server
    through socket '/var/lib/mysql/mysql.sock' (2) in
    /home/niranvv/public_html/fun/db/mysql4.php on line 48 Warning: mysql_error(): supplied argument is
    not a valid MySQL-Link resource in /home/niranvv/public_html/fun/db/mysql4.php on line 330 Warning:
    mysql_errno(): supplied argument is not a valid MySQL-Link resource in
    /home/niranvv/public_html/fun/db/mysql4.php on line...
  5. Problem With MySQL - (5)
    I tried to visit my website today and I recieved the dreadful page from my php-nuke site "There
    seems to be a problem with the MySQL database" First I thought, "no big deal server is probably
    rebooting or down for a little bit" So i logged into my cpanel and clicked on "Server Status".
    Thats when I started worrying. It said the MySQL servers were up and runnign fine. I went back to my
    main page and looked at my MySQL server count and instead of saying 2/99 it now says NA/99 I am
    unable to create a new database and I recieve this error when I click on PHPmyadmin QUO...
  6. Php And Mysql Version. - (7)
    Is there any plan to upgrade or see if it can be upgraded to PHP5 and mySQL5 in the future?...
  7. Mysql Error Never Seen On My Site Before (too Many Connections). - (13)
    I just tried to visit my site to see if anything had changed on my forums and such and I got this
    message: Warning: mysql_connect(): Too many connections in /xxxx/xxxxx/xxxxxx_xxxxx/xxx/xx_xxxx.php
    on line 7 Error! Could not connect: Too many connections. I have never recieved this error before,
    does this mean someone is mucking with my site somehow??? The particular php file it mentions is
    the one that defines variables like db username etc and connection to the site's database that I
    include wherever it is needed in various file for the site. EDIT: I managed t...
  8. Help Me! - Frontpage & phpBB with MySQL (3)
    I was just approved an Astahost account with the starter package. I explored the Cpanel a bit
    and have got the following problems : 1.Frontpage Extensions The Cpanel states that the
    Frontpage Extensions have been installed. But when I uploaded my site on frontpage at
    "ftp://ftp.mysitename.astahost.com/public_html/" it stated an error that Fronpage Extensions are not
    installed on this server! When I opened my site online, I can see the page, but I cannot see any
    graphics/images! Also, my forms and other stuff isn't working either. Please help me out and let
    me...
  9. Weird MySQL Message - (4)
    wenever i assign priviledges to a MySQL databases, it seems to work properly but this message is
    always there QUOTE bitshift_wforumu (Privileges: ALL PRIVILEGES) Connection Strings
    Perl $dbh = DBI->connect("DBI:mysql:bitshift_wforum:localhost","bitshift_wforumu"," ");
    PHP $dbh=mysql_connect ("localhost", "bitshift_wforumu", " ") or die ('I cannot connect to the
    database because: ' . mysql_error()); mysql_select_db ("bitshift_wforum"); My database
    name is: bitshift_wforum the username is: bitshift_wforumu What does all that maen, it ...
  10. Problem With MySQL Not Being Able To Connect - Anyone know the reason for this error... (9)
    Hello everyone, Im currently having a problem with mySQL, I wrote a PHP login script that
    doesnt seem to be working for some reason. I created a database and everything looks correct, is
    this a server issue or is the issue related to my script? But anyway this is my error, hope someone
    can help Ive tried to search forum for answer but none of the posts seems to answer my question:
    QUOTE Warning: mysql_connect(): Host 'gamma.xisto.com' is not allowed to connect to this
    MySQL server in /home/hp2001/public_html/ucscKGD/checklogin.php on line 10 cannot co...
  11. MySQL - Can't Connect - Cristal Report (1)
    From http://thoaionline.com (hosted by Astahost) QUOTE Warning: mysql_connect(): Can't
    connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in
    /home/pheart/public_html/thoaionline/includes/database.mysql.inc on line 31 Can't connect to
    local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) In cPanel Mysql
    databases 0 / 99 But I have 5 MySQL databases in my account (maybe more). All of them become
    unusable now. Some more messages from http://website.thoaionline.com QUOTE Warning: 
    mysql_pc...
  12. Can I Access MySQL Database From Outsite, Directly - (10)
    I'm going to make an OFFLINE FORUM. So I want to know is that possible or not. My paid host
    don't allow that. How about astahost?...
  13. MySQL Database - Important Report (3)
    I'm writing this to report about a error. One of my mySQL database has been droped and my site
    stop working. I don't know the reason. I'm hosted on gamma server. I think you (admin)
    should check it. PS: One of my paid hosting provider also met this problem a few day ago....
  14. IPS Driver Error / MySQL Database - What in the world? How is this possible? (1)
    Just several hours ago, I couldn't access my website/forum because of some error with an SQL
    socket or something like that. I need desperate help because I don't want to reformat everything
    again. Well, here is what comes up: IPB WARNING mysql_connect(): Can't connect to local
    MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (Line: 114 of
    /ips_kernel/class_db_mysql.php) There appears to be an error with the database. You can
    try to refresh the page by clicking here. Error Returned: SQL error: Can't connect to local
    M...
  15. General Problems With New Account - MySQL problems and quota issues (2)
    I just got a new account and CPanel reports that I have -380.2 MB of quota space and using 400.2MB.
    This disables some of Cpanel's functions. It would have been nice to use the automated Mambo
    installer, but no biggy. I uploaded the latest Mambo .tar.gz from my FTP program and unpacked it
    via Cpanel's file manager with no problem. When I first logged into the system I created a new
    Database for mambo and a new user for that database and linked the two from Cpanel. I logged off to
    watch something on TV and came back and that database isn't being reported...
  16. Problem With Mysql - Cannot connect to database.... (6)
    Hi, this is the first time after I got my hosting to try and use MySQL. My site is
    http://abhiram.astahost.com . I created a user in CPanel -> 'MySQL Databases' as root. So,
    the new user created will be 'abhiram_root'. Similarly I created a database called
    'webpage' (which changes to 'abhiram_webpage'). I set up the database and the tables
    using phpMyAdmin and uploaded the files after making changes to the user name and the database. But
    it's not opening the database. It's connecting to MySQL without any problems, but it
    isn'...
  17. Mysql Error - (5)
    Hey i got this error trying to install something on my database CODE mysql error: You have an
    error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the
    right syntax to use near 'rpg_class` (`name`, `folder`, `regatt`, `magicatt`, `magicdef` mysql
    error number: 1064 can anyone tell me what this means or how i fix it?? thanks in advance...
  18. MySQL Errors? - Error 13! - (0)
    Recently been attacked by "Can't create/write to file '/tmp/#sql_28e2_0.MYI' (Errcode:
    13)"? Then its a simple fix, please DELETE (backup first) your SOURCE files that talk to the MySQL
    database, and re-upload them This will purge them from the system and force them to recreate the
    temporary files. Do NOT delete your database, just backup your files, delete them, re-upload them
    and youll be fine. This is due to MySQL crash. Easily fixed and no data has been lost. Sorry guys
    Details: MySQL crashed while writing data, it seems the temporary file has bee...



Looking for mysql, version, mysql, 4, 0, 26, max

See Also,

*SIMILAR VIDEOS*
Searching Video's for mysql, version, mysql, 4, 0, 26, max
advertisement



What Is The MySQL Version @ Asta ? - MySQL 4.0.26-Max

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com