6

I'm new to PHP and Apache and I think I've messed some things up that I don't know how to fix. After following a tutorial I managed to update to PHP 5.5, and then started having problems. I went to downgrade to PHP 5.4, but then I had more problems, so I tried to re-update to PHP 5.5 and now it's saying it's already installed. However, when I reload my my_phpinfo.php (localhost address) in Firefox, it only shows that I'm running PHP version 5.3.15 which is what I started out with originally.

Can someone give me step by step instructions on how to go in and delete all the PHP 5.4 and 5.5 files I've updated so I can just start over with a clean slate and re-download PHP 5.5 and start again?

  • 2
    We need to know how you installed the files – Mark Oct 8 '13 at 16:32
  • 1
  • oh ok sorry, i went to this website php-osx.liip.ch and then i copy and pasted these two different lines of code into my command prompt a few different times :/ PHP 5.4 (Old stable) curl -s php-osx.liip.ch/install.sh | bash -s 5.4 PHP 5.5 (Current stable) curl -s php-osx.liip.ch/install.sh | bash -s 5.5 – Ashley Oct 8 '13 at 18:30
  • basically i did the 5.5 one first but then started having problems...i assume i was causing them, but i didn't know that so i went ahead and then ran the 5.4 code....then decided to go back to 5.5...and now i'm recieving this message: $ curl -s php-osx.liip.ch/install.sh | bash -s 5.4 Installing package 5.4-10.8-frontenddev into root / Package 5.4-10.8-frontenddev is already installed at version 5.4.20-20130930-105609. You wanted to install version 5.4.20-20130930-105609. – Ashley Oct 8 '13 at 18:32
  • can anyone help? – Ashley Oct 9 '13 at 14:22
4

I'm assuming that the deployment/install script was put at /usr/local/packager/packager.py when it was installed. Apparently, you can use this script to list the packages that are installed:

/usr/local/packager/packager.py list

Unfortunately, the script that you used to install PHP doesn't appear to have an uninstall feature. However, you should be able to remove the installed content that was installed from /usr/local. It is probably a good idea to examine the contents of the /usr/local directory first to confirm the contents:

ls -al /usr/local

From what I can see, the script is installing the software with prefixes like "php5-*", and is linking to the 'current' version of that software using a symbolic link named "php5". The commands below will unlink the symlink, and remove the installed versions of PHP that were installed using the script mentioned above:

sudo unlink /usr/local/php5
sudo rm -rf /usr/local/php5-*

To remove the supplemental configuration file that was installed with the updated PHP software, you may be able to remove the config file at /etc/apache2/other/+php-osx.conf:

sudo rm -rf /etc/apache2/other/+php-osx.conf

Then restart Apache:

sudo apachectl restart

Note: the /usr/local folder shouldn't have much inside of it unless you've installed 3rd party software there. You may find a few PHP installs there that have names like "php5-5.3.x...", "php5-5.4.x...", and "php5-5.5.x...". The rm command above should remove any variants of this naming scheme. Removing the additional Apache configuration file should allow Apache to start normally after the module has been removed.

0

You need to delete the file /usr/local/packager/registry.log.

If you open the file you should see it just contains the different versions of PHP you have installed from php-osx.liip.ch. Type sudo rm /usr/local/packager/registry.log in the terminal window to do this.

While the steps given in Eddie's instructions are all important (https://php-osx.liip.ch/#uninstall has the official uninstall instructions), you must follow the extra step of deleting /usr/local/packager/registry.log in order to successfully reinstall a version that you've previously installed from that site.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .