Welcome Guest, Not a member yet? Register   Sign In
video tutorial problems
#11

[eluser]TheFuzzy0ne[/eluser]
I'd be interested to know if you see any change if you use the mysqli driver. Failing that, you should consider connecting to the MySQL database manually, with mysql_connect(), and seeing if that helps figure out what's going on.
#12

[eluser]psolms[/eluser]
mysqli driver: no change.

as for msql_connect(), where would i call it? in the index function is where im going to try first, but im not 100% on where it should go.

Code:
function index()
  {
    $link = mysql_connect('localhost', 'root', 'pass');
    if (!$link) {
      die('Could not connect: ' . mysql_error());
    }
    echo 'Connected!';
    mysql_close($link);
    #$data['title'] = "My Blog Title";
    #$data['heading'] = "My Blog Heading";
    #$data['todo'] = array('clean house', 'eat lunch', 'call mom');
    
    #$this->load->view('blog_view', $data);
  }

this is the error:
Fatal error: Call to undefined function mysql_connect() in D:\server\system\application\controllers\blog.php on line 14
#13

[eluser]TheFuzzy0ne[/eluser]
OK, that's just plain weird... It would appear that your version of PHP doesn't have database support compiled into it, although that does seem very unlikely.
#14

[eluser]psolms[/eluser]
so.. should i check the php.ini or something?
#15

[eluser]bretticus[/eluser]
Why don't you do a test page with a one liner:

Code:
<?php phpinfo() ?>

and look for database support.
#16

[eluser]bretticus[/eluser]
Do you have:

extension=php_mysql.dll

in your php.ini? Is it commented?
#17

[eluser]psolms[/eluser]
aha... there is no line like that in php.ini....

adding it now...

hmm... there is no php_mysql.dll in the php program file... or anywhere.
should i find one and dl it?

edit: it did nothing. no change.
#18

[eluser]psolms[/eluser]
ok, ive got the 1 line page loaded, i cant find anything about database support on the page. if you want to try and help me further, i can give you the domain name and port number that should let you see exactly what im seeing...
i just dont want to display my port number in an open forum. i will pm it to you if you ask me for it.
#19

[eluser]bretticus[/eluser]
Okay, I was wondering so I installed PHP via the windows installer. I noticed a few things:

1. You need to install MySQL Server and Apache first.
2. You need to select the mysql extension from the Windows installer.

Even after installing php, you can run the installer again to make changes (add support for mysql, etc.) The installer just sets up php.ini for you with the defaults.
#20

[eluser]psolms[/eluser]
oh this looks very promising....

i defiantly installed through the windows installer and had none of the extensions installed... ran it and added mysql, checking now to see if it works...

WOO!

got the connected from the test connection... now trying the other way...

zamo! thank you so much. i greatly appreciate everything.
now continuing with the tutorial.




Theme © iAndrew 2016 - Forum software by © MyBB