Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
'oil refine migrate' causes PHP Fatal error
  • While following this tutorial and trying to run:
    oil refine migrate
    
    I get PHP Fatal error: In RC3
    PHP Fatal error:  Call to undefined function Fuel\Core\mysql_connect() in /opt/lampp/fuel/core/classes/database/mysql/connection.php on line 73
    Error - Call to undefined function Fuel\Core\mysql_connect() in COREPATH/classes/database/mysql/connection.php on line 73
    
    In newest versions from dev branches:
    PHP Fatal error:  Call to undefined function Fuel\Core\mysql_connect() in /opt/lampp/fuel/core/classes/database/mysql/connection.php on line 77
    Error - Call to undefined function Fuel\Core\mysql_connect() in COREPATH/classes/database/mysql/connection.php on line 77
    
    I am sure my db settings are correct.
  • Hello, maybe try finding the spicified line #77
    and try changing from mysql_connect() to \mysql_connect() (note the leading "\") Also you can try changing the database host from: localhost to 127.0.0.1 or vice-versa
  • Having similar problems using a MAC OS, with MAMP (http://www.mamp.info/en/index.html) installed. There seems to be some kind of difference with php when running from the command line, mysql_connect() simply does not work from with in Fuel or outside of Fuel. Ive been trying to check or change or make sure that php command line is running from from MAMP and not Apples default one but no solution as yet and my brain is fried - going to get lunch and forgetting about this. Some commands that might help from terminal:
    php -m
    which php
  • Jaroslav Petrusevic wrote on Wednesday 6th of July 2011:
    Hello, maybe try finding the spicified line #77
    and try changing from mysql_connect() to \mysql_connect() (note the leading "\") Also you can try changing the database host from: localhost to 127.0.0.1 or vice-versa
    Both methods don't work.
  • are you sure you're commandline php uses the same php.ini as the one that runs in your webserver?
    I've seen setups (especially the xAMP's you install seperately) where that's not the case, with the result that nothing is loading. To test, create a test.php:
    <?php
    mysql_connect();
    
    and see if you get the same error message...
  • Harro Verton wrote on Thursday 7th of July 2011:
    are you sure you're commandline php uses the same php.ini as the one that runs in your webserver?
    I've seen setups (especially the xAMP's you install seperately) where that's not the case, with the result that nothing is loading. To test, create a test.php:
    <?php
    mysql_connect();
    
    and see if you get the same error message...
    I get a blank page. Later I'll install 'normally' Apache, PHP and MySQL and check if it works that way. @EDIT
    I get it work now but by changing driver to msqli. What the difference bteween msql and msqli?

Howdy, Stranger!

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

In this Discussion