1

Hope someone might be able to help me. So I wanted to install MediaWiki which requires magicquotes to be disabled, so I did the following:

    463  apt-add-repository ppa:ondrej/php5-oldstable
    464  sudo apt-add-repository ppa:ondrej/php5
    465  sudo apt-add-repository ppa:ondrej/php5-5.6
    466  apt-add-repository ppa:ondrej/php5-oldstable
    467  apt-get update
    468  apt-get install php5

    484  nano /etc/php5/apache2/php.ini  // went to turn off magicquotes. Didn't work.
    485  apt-get purge libapache2-mod-php5 php5 &&     apt-get install libapache2-                              mod-php5 php5
    488  service apache2 restart
    489  service apache2 stop
    490  pidof apache2
    491  skill -9 pid
    492  service apache2 start

.............and I broke Apache. Website won't work now and I'm stuck.

Here's what I've done so far:

    sudo add-apt-repository --remove ppa:ondrej/php5-oldstable
    sudo add-apt-repository --remove ppa:ondrej/php5
    sudo add-apt-repository --remove ppa:ondrej/php5-5.6
    apt-get update
    apt-get upgrade
    apt-get purge libapache2-mod-php5 php5 && apt-get install libapache2-mod-php5 php5

This did the following:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      libt1-5 suphp-common
    Use 'apt-get autoremove' to remove them.
    The following packages will be REMOVED:
      libapache2-mod-php5* php5*
    0 upgraded, 0 newly installed, 2 to remove and 3 not upgraded.
    After this operation, 9,724 kB disk space will be freed.
    Do you want to continue [Y/n]? y
    (Reading database ... 159707 files and directories currently installed.)
    Removing php5 ...
    Removing libapache2-mod-php5 ...
    php5_invoke prerm: Disable module pdo for apache2 SAPI
    php5_invoke prerm: Disable module opcache for apache2 SAPI
    php5_invoke prerm: Disable module mssql for apache2 SAPI
    php5_invoke prerm: Disable module pdo_dblib for apache2 SAPI
    php5_invoke prerm: Disable module xsl for apache2 SAPI
    php5_invoke prerm: Disable module xmlrpc for apache2 SAPI
    php5_invoke prerm: Disable module sqlite3 for apache2 SAPI
    php5_invoke prerm: Disable module pdo_sqlite for apache2 SAPI
    php5_invoke prerm: Disable module snmp for apache2 SAPI
    php5_invoke prerm: Disable module recode for apache2 SAPI
    php5_invoke prerm: Disable module pgsql for apache2 SAPI
    php5_invoke prerm: Disable module pdo_pgsql for apache2 SAPI
    php5_invoke prerm: Disable module odbc for apache2 SAPI
    php5_invoke prerm: Disable module pdo_odbc for apache2 SAPI
    php5_invoke prerm: Disable module mysql for apache2 SAPI
    php5_invoke prerm: Disable module mysqli for apache2 SAPI
    php5_invoke prerm: Disable module pdo_mysql for apache2 SAPI
    php5_invoke prerm: Disable module ldap for apache2 SAPI
    php5_invoke prerm: Disable module gmp for apache2 SAPI
    php5_invoke prerm: Disable module gd for apache2 SAPI
    php5_invoke prerm: Disable module curl for apache2 SAPI
    php5_invoke prerm: Disable module json for apache2 SAPI
    php5_invoke prerm: Disable module mcrypt for apache2 SAPI
    php5_invoke prerm: Disable module imap for apache2 SAPI
    Module php5 disabled.
    apache2_invoke prerm: Disable module php5
    apache2_reload: Your configuration is broken. Not restarting Apache 2
    apache2_reload: apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of         /etc/apache2/mods-enabled/authz_default.load: Cannot load /usr/lib/apache2/modules/mod_authz_default.so into         server: /usr/lib/apache2/modules/mod_authz_default.so: cannot open shared object file: No such file or directory
    Purging configuration files for libapache2-mod-php5 ...
    apache2_invoke postrm: Purging state for php5
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package libapache2
    E: Unable to locate package mod-php5

Now I'm stuck. Yes I broke it but any ideas how to fix this? Thanks!

  • I don't see this error or line 187 anywhere. Am I missing something here? – mchid Nov 20 '15 at 3:39
  • Add the output of the following commands here paste.ubuntu.com and give me the link... Add the repositories again and remove them in a clean way: sudo add-apt-repository ppa:ondrej/php5-oldstable; sudo add-apt-repository ppa:ondrej/php5; sudo add-apt-repository ppa:ondrej/php5-5.6; sudo apt-get update; sudo apt-get install ppa-purge; sudo ppa-purge ppa:ondrej/php5-oldstable; sudo ppa-purge ppa:ondrej/php5; sudo ppa-purge ppa:ondrej/php5-5.6; sudo apt-get install -f – A.B. Nov 20 '15 at 9:32
  • Here you go: paste.ubuntu.com/13375955 . I didn't proceed as that deletes Mailman and whole bunch of other stuff that I can't remove. – mehmeh Nov 20 '15 at 22:24
  • Any ideas how to fix this? Totally lost at this stage. – mehmeh Nov 23 '15 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.