Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

php-mysql

  Date: Jan 04    Category: Unix / Linux / Ubuntu    Views: 824
  

I have been trying to get php to work with mysql, I have apache, php, and
mysql installed.

I have done sudo apt-get install php5-mysql

and it says it wont install cos of the following;

The following packages have unmet dependencies:
php5-mysql: Depends: php5-common (= 5.2.1-0ubuntu1) but
5.2.1-0ubuntu1.4is to be installed
E: Broken packages

I tried installing php5-common and it says 'newest version already
installed'.

I really dont know what to do now, at this point if I was a kid, i did be
crying already.

Share: 

 

11 Answers Found

 
Answer #1    Answered On: Jan 04    

PHP is all ready installed and there is nothing much els. It is easy to tie in
PHP and Mysql. You can start programming PHP just by opening up the text editor
and away you go.

 
Answer #2    Answered On: Jan 04    


This gives the following error;

*Fatal error*: Call to undefined function mysql_connect() in *
/var/www/php/testconnect.php* on line *2

not that i used that as a program its just for debugging.

in windows I just installed everything individually and they work together,
i guess its a lil diff here.

 
Answer #3    Answered On: Jan 04    

I've been googling since yesterday, and most people that got that error,
just solved it by installing php5-mysql,
I dont know why its different for me.


 
Answer #4    Answered On: Jan 04    


I just tried phpinfo(), I have php5 installed and it does not seem to
support mysql by default.

How do i get it to support mysql.?

What was wrong with my initial php5 install procedure that made it exclude
mysql support
cos I dont mind reinstalling php.

Everything else works fine.

 
Answer #5    Answered On: Jan 04    

Try just req php which is not a really big diff between the two and see if it
resolves the problem. I just use reg old php.

 
Answer #6    Answered On: Jan 04    

Do this. Do not use apt-get. Use the super cow powers of aptitude
instead.
sudo aptitude install php5-mysql
I fail to look at the depends issue. That should solve that.... I hope

 
Answer #7    Answered On: Jan 04    

Hey that was cool, wuz the diff btw that and apt-get??

Finally installed php5-mysql, after it fixed the problem by down grading my
php5 (wow).

But I stil get the error :

*Fatal error*: Call to undefined function mysql_connect() in *
/var/www/php/testconnect.php* on line *2 .

when attempting to connect to mysql via php, although I retarted the apache
server after all the aptitude adjustments.

phpinfo() doesn't still make any refrences to mysql

 
Answer #8    Answered On: Jan 04    

What the difference between apt-get and aptitude. Very simple. Apt-get just gets
the package to install. When you use aptitude. It gets the package and all the
depends for the package.
The next issue. Well I am still a new guy with sql. I would go to ubuntu forums
http://ubuntuforums.org/forumdisplay.php?f=39
And sign up and post at that link.

 
Answer #9    Answered On: Jan 04    

PS look at this link. It is very new
http://ubuntuforums.org/showthread.php?t=118890

 
Answer #10    Answered On: Jan 04    

could someone pls tell me how to uninstall php5
just tried
sudo apt-get remove php5

but its still there??

 
Answer #11    Answered On: Jan 04    

I just installed phpMyAdmin and when I tried to start it it says cannot load
mysql extensions.

how do i locate these extensions?

there's a part in the php.ini file that says extension_dir and the result is
"./"

does anyone what directory that is?

I seem to have tried a lot of things here they just seem not to work.

 
Didn't find what you were looking for? Find more on php-mysql Or get search suggestion and latest updates.




Tagged: