Jump to content

MySql won't work


uneatblepie

Recommended Posts

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


Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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 2
or
Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\counter.php on line 3
.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

OKay. Is PHP using using the correct php.ini. You can check this by running the phpinfo() function in phpscript:
[code=php:0]<?php
phpinfo();
?>[/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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.