Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
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 ...
  1. #1
    Just 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

  2. #2
    Linux Newbie objuan's Avatar
    Join Date
    Jul 2006
    Location
    california
    Posts
    218
    php5 and php5-mysql will need mysql-server-5.0 to funtion correctly.

  3. #3
    Just 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..

  4. #4
    Linux Newbie objuan's Avatar
    Join Date
    Jul 2006
    Location
    california
    Posts
    218
    try removing mysql .
    apt-get remove --purge mysql-server-5.0
    then reinstall it
    apt0get install mysql-server-5.0

  5. #5
    Just 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?

  6. #6
    Linux Newbie objuan's Avatar
    Join Date
    Jul 2006
    Location
    california
    Posts
    218
    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.

  7. #7
    Just Joined!
    Join Date
    Mar 2007
    Posts
    15
    ok i ll try this.. thank you very much

  8. #8
    Just Joined!
    Join Date
    Mar 2007
    Posts
    15
    Man i can't get it working. Any idea?

  9. #9
    Linux Newbie objuan's Avatar
    Join Date
    Jul 2006
    Location
    california
    Posts
    218
    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.

  10. #10
    Just 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

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •