uneatblepie Posted September 2, 2006 Share Posted September 2, 2006 I installed the latest version of MySql, but when i test code it writes:Fatal error: Call to undefined function sqlite_open() in C:\Program Files\Apache Group\Apache2\htdocs\cooks.php on line 17.I don't really know anything about MySql.just tried to follow this:http://www.expertsrt.com/tutorials/Matt/install-apache.html Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 2, 2006 Share Posted September 2, 2006 Did you install SQLite or MySQL? Does your server support php5? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 2, 2006 Share Posted September 2, 2006 You cannot run the sqlite functions with the MySQL database/extensions. The sqlite functions work with the sqlite extension (php_sqlite.dll) and the sqlite database serer.If you want to query a mysql database use the mysql functions. Make sure you have enabled the mysql extension (php_mysql.dll) too if are running PHP5. - This is explained in the tutorial you linked to. Quote Link to comment Share on other sites More sharing options...
uneatblepie Posted September 2, 2006 Author Share Posted September 2, 2006 enabled it.My server does support php5,its something with mysql.now i get this in another code:Parse error: parse error, unexpected T_VARIABLE in C:\Program Files\Apache Group\Apache2\htdocs\counter.php on line 2orParse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\counter.php on line 3. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 2, 2006 Share Posted September 2, 2006 Those errors are usually caused by missing semi-colons at end of lines.Post you code here. Quote Link to comment Share on other sites More sharing options...
uneatblepie Posted September 2, 2006 Author Share Posted September 2, 2006 just copied a code and edited it because,the variables were Unexpected.<? php mysql_connect("localhost","username","password")or die("cannot connect");mysql-select_db("db_name")or die("cannot select database");?>or<? php mysql_connect("localhost","username","password")or die("cannot connect");mysql-select_db("db_name")or die("cannot select database");?>the same thing.-Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\counter.php on line 3 Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 2, 2006 Share Posted September 2, 2006 Change mysql-select_db to mysql[b][color=red][size=10pt]_[/size][/color][/b]select_db ... underscore not minus :) Quote Link to comment Share on other sites More sharing options...
uneatblepie Posted September 2, 2006 Author Share Posted September 2, 2006 Damn!I feel like an idiot.When there all in notepad, one underneath each other,its hard for me to notice it....still, the error seems to be in tine 3.EDIT:i have the feeling that my MySql doesn't works AT All.i tried deleting the upper code, but the error remains the same.EDIT:yep!php info doesn't even have a MySql section.Ill try to re-install it. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 2, 2006 Share Posted September 2, 2006 You dont need to reinstall MySQL. If you ahve PHP5, which it sound like you do need to enable the MySQL extension.Go to the [url=http://www.expertsrt.com/tutorials/Matt/install-apache.html#extras]5. Some extra steps: Setting up a development environment and installing MySQL[/url] heading. Now scroll down to the MySQL heading read from then on. Fter it talks about installing mysql it talks about enabling the MySQL extension. Quote Link to comment Share on other sites More sharing options...
uneatblepie Posted September 3, 2006 Author Share Posted September 3, 2006 I enabled it, but it still doesn't work. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 3, 2006 Share Posted September 3, 2006 OKay. Is PHP using using the correct php.ini. You can check this by running the phpinfo() function in phpscript:[code=php:0]<?phpphpinfo();?>[/code]Look for the [b]Configuration File (php.ini) Path[/b] row. To the right that should be the path to the php.ini it using. Is this the correct path?Also make sure you are restarting the server too when making any changes to the php.ini. Quote Link to comment Share on other sites More sharing options...
uneatblepie Posted September 3, 2006 Author Share Posted September 3, 2006 Its sais it is in C:/windows......htere is a php.ini file there, but i'm not sure its right....How can i change the path? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 3, 2006 Share Posted September 3, 2006 Where is your php.ini located to. Move your php.ini to C:\WINDOWS\ (or C:\WINNT\ if WINDOWS doesnt exist). Restart your server. Is PHP using the correct ini now? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.