Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
oil refine migrate on ubuntu with xampp mysql server undefined function ..
  • HI every one ..
    I am working with ubunto / xampp
    running perfectly more sites with mysql .. nothing fancy Now just discovered fuel actually can't figure it out why it does not work with my config. . MySql works fine .. only oil refine migrate gives me this error.
    Error - Call to undefined function Fuel\Core\mysql_connect() in
    COREPATH/classes/database/mysql/connection.php on line 73 Cant find .. php 5.3+ installed .. maybe something with my xampp install . looked at the code .. but nothing wrong with it .. I guess .. :-) I have made the tables via my Admin and the generated " scaffolded " code works perfect
    .. what to do ? more info needed? Thanks a lot .. and thanks for this wonderful code so far ..
    any help appreciated ..
  • installed the PHP mysql extensions? On Redhat I have to install those separately, same as with mbstring and mcrypt. Never used ubuntu, but something like 'apt-get php-mysql'? It works here, both with 'mysql' and 'mysqli', so it must have something to do with your local install.
  • Harro Verton wrote on Sunday 12th of June 2011:
    installed the PHP mysql extensions? On Redhat I have to install those separately, same as with mbstring and mcrypt. Never used ubuntu, but something like 'apt-get php-mysql'? It works here, both with 'mysql' and 'mysqli', so it must have something to do with your local install.

    just did sudo apt-get install php5-mysql and returned already installed .. just reinstalled my whole server .. new start
    phpmyadmin works does this not mean mysql mods installed properly ? donno .. :) No doubt is something on my install but what ?
    after new installation : php oil refine migrate
    - > returns Error: Migration: already in use. where can I find some info on that .. ? :-) haha shall I paste my phpinfo .. maybe someone can see something not right inthere ?
    Anyway .. __ Thanks __ a lot for your message ..
    eventually it will work .. :-) i can make the tables with my phpmyadmin .. and then it works as well .. but .. :-) thanks in advance for all the trouble ..
  • Agreed, if PHPMyAdmin works, there's nothing wrong with your PHP installation. I've noticed in the error message that it tries to load the function from the \Fuel\Core namespace, which will not work, since all internal PHP functions are defined in the global namespace. To test if this is the issue, could to change COREPATH/classes/database/mysql/connection.php, line 73 and add a backslash in front of the function ( so it reads \mysql_connect() ) to force it to call it in the global namespace? If this is the case, it would be strange as PHP would automatically fall back to the global namespace if it can't find a function. Which version of PHP are you using?
  • Harro Verton wrote on Monday 13th of June 2011:
    Agreed, if PHPMyAdmin works, there's nothing wrong with your PHP installation. I've noticed in the error message that it tries to load the function from the \Fuel\Core namespace, which will not work, since all internal PHP functions are defined in the global namespace. To test if this is the issue, could to change COREPATH/classes/database/mysql/connection.php, line 73 and add a backslash in front of the function ( so it reads \mysql_connect() ) to force it to call it in the global namespace? If this is the case, it would be strange as PHP would automatically fall back to the global namespace if it can't find a function. Which version of PHP are you using?

    now I can 't generate the same error ..
    gives me Error : Migration already in use .. since i reinstalled my whole system .. php -ver PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May 2 2011 23:18:30) before was working with xampp now lamp-server..
    installed with tasksel - then apt-get install for checking php5-mysql
    manualy instaalation of phpmyadmin Should work because on other systems works fine ..
    - thanks!!! oh ..
    made the change you suggested but no effect .. not the case any more . changed it back
  • Gabriel Cirstea wrote on Monday 13th of June 2011:
    Harro Verton wrote on Monday 13th of June 2011:
    Agreed, if PHPMyAdmin works, there's nothing wrong with your PHP installation. I've noticed in the error message that it tries to load the function from the \Fuel\Core namespace, which will not work, since all internal PHP functions are defined in the global namespace. To test if this is the issue, could to change COREPATH/classes/database/mysql/connection.php, line 73 and add a backslash in front of the function ( so it reads \mysql_connect() ) to force it to call it in the global namespace? If this is the case, it would be strange as PHP would automatically fall back to the global namespace if it can't find a function. Which version of PHP are you using?

    now I can 't generate the same error ..
    gives me Error : Migration already in use .. since i reinstalled my whole system .. php -ver PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May 2 2011 23:18:30) before was working with xampp now lamp-server..
    installed with tasksel - then apt-get install for checking php5-mysql
    manualy instaalation of phpmyadmin Should work because on other systems works fine ..
    - thanks!!! oh ..
    made the change you suggested but no effect .. not the case any more . changed it back
    already found it .. my problem changed into Error: migration already in use
    after re installation of my system (now on xubuntu ) changed:
    line #44 of /fuel/core/tasks/migrate.php
    else if ($version == $current_version) To:
    else if (!is_null($version) && $version == $current_version) According to a brilliant mind in the oil issues on the github should work .. and it did ..
    and i will happily ever after refine migrate . thanks !!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion