Results 1 to 10 of 12
Hello.
My system used to have php4.
I 'm currently developing a php app that needs php5.
I issued:
apt-get remove php4
apt-get install php5
I suppose php4 was removed ...
- 06-27-2007 #1Just Joined!
- Join Date
- Mar 2007
- Posts
- 15
PHP4 -> 5 upgrade in Debian 3.1
Hello.
My system used to have php4.
I 'm currently developing a php app that needs php5.
I issued:
apt-get remove php4
apt-get install php5
I suppose php4 was removed correctly (no error msg). When configuring the php5 package, i was asked if i wanted to keep my modified apache config files (apache2.conf and the vhosts conf), and i answered yes. Apache was restarted. What i had: a php5 installation, that didn't have php-mysql module and i suppose it was not configured properly. I issued
apt-get install php5-mysql. Now, i seem to have mysql module loaded on php, but: in phpmyadmin, i log in correctly (before it reported that mysql module wasn't loaded). But when i access my homepage, i get this:
Fatal error: Call to undefined function mysql_connect() in /home/alex/public_html/index.php on line 37
What am i doing wrong?
I also tried to completely remove the php installation, so it asks me for configuration again, but i didn't achieve it. apt-get remove --purge php5 doesn't do the work for me. Any ideas?
Here is my phpinfo: phpinfo()
EDIT: there is also no php.ini :s
- 06-28-2007 #2
php5 and php5-mysql will need mysql-server-5.0 to funtion correctly.
- 06-28-2007 #3Just Joined!
- Join Date
- Mar 2007
- Posts
- 15
Thanks for the reply

I know this. I also did apt-get install php5-mysql. It updated mysql server from 4 to 5.
But it doesn't work..
- 06-28-2007 #4
try removing mysql .
apt-get remove --purge mysql-server-5.0
then reinstall it
apt0get install mysql-server-5.0
- 06-28-2007 #5Just Joined!
- Join Date
- Mar 2007
- Posts
- 15
i suppose it's a php problem. it doesn't load the mysql library :s
i 'll try this though. do i need to take backup of the db?
- 06-28-2007 #6
yes yes back up you db's first. I have encountered your problem in the past with servers I alway end up upgrading to debian 4.0. its not a php thing but a mysql thing.
- 06-28-2007 #7Just Joined!
- Join Date
- Mar 2007
- Posts
- 15
ok i ll try this.. thank you very much
- 06-29-2007 #8Just Joined!
- Join Date
- Mar 2007
- Posts
- 15
Man i can't get it working. Any idea?
- 06-29-2007 #9
Sorry this should have fixed the issue. During your upgrade of the OS did you see any messages that any thing was being removed like mysql or php.
Did you try reloading ether of the two programs after the upgrade.
- 06-29-2007 #10Just Joined!
- Join Date
- Mar 2007
- Posts
- 15
it finally worked
I removed and reinstalled everything a couple of times and it finally worked.. Sometimes i really don't understand how computers work


Reply With Quote
