Dragoa Posted May 12, 2008 Share Posted May 12, 2008 I'm trying to set-up PHP 5.2.5 and Apache 2.something to run on an HP-Unix 11 Box. I've got both of these working and running, but now I see my configuration is slightly off for php(I didn't include mySql or oci8 when I first built it and now php breaks whenever I try to do a query...) While it might be possible to salvage my install and get this working, I'd much prefer to just wipe it out and re-install everything fresh again(Since I'll have to do this about 3 more times on different machines so the more practice I can get installing the better.) So this brings me to my question: How do I uninstall PHP and apache2? Any help would be greatly appreciated, and if this has been addressed before I'm sorry, I did a quick search and didn't find anything more then a passing mention to uninstalling and reinstalling something. (Also I tried a general search and most results I found seemed to be teaching me how to install, always missing out on the ever important "un" aspect of my search..) Also sorry if this is really really basic, but I've never used PHP or Apache or Unix before, and I've just been kind of thrust this work and told to make it happen.(Yaaaa for being a co-op.) Thanks in advance. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 12, 2008 Share Posted May 12, 2008 Sorry I am not an experience unix user. But How was PHP installed initially? from the source code or some Unix package manager. If you installed from source code then just run the ./config, make, make install procedure to recompile the PHP binaries with your amendments and everything should be updated. You should be able to run 'make uninstall' to remove the compiled binaries though If you used a package manager then no need to unistall/recompile PHP everything is handled by the package manager itself. Jst select what extensions you want installed and it'll do all the work for you. Quote Link to comment Share on other sites More sharing options...
Dragoa Posted May 12, 2008 Author Share Posted May 12, 2008 I'm not quite sure how it was installed. Pretty sure it was source(used /configure <options>, make, and make install, to install it initially) What would the package manager be called? I will try the make uninstall though. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 12, 2008 Share Posted May 12, 2008 The package manger will be whatever came with your linux distribution. I think running '/configure <options>, make, and make' install again would be better then running 'make uninstall'. Quote Link to comment Share on other sites More sharing options...
Dragoa Posted May 12, 2008 Author Share Posted May 12, 2008 Make uninstall doesn't seem to exist, so I'll have to go with the overwriting, I think I found a new error that's helping me backtrack through this problem so hopefully this will solve my problem. Quote Link to comment Share on other sites More sharing options...
trq Posted May 12, 2008 Share Posted May 12, 2008 Unfortunately removing programs built from source isn't always easy. If you didn't delete your Makefile, you may be able to remove the program by running make uninstall from within the source directory, otherwise you'll need to manually remove each installed file by hand. If Ive got to compile something for my machine I normally do it within a chroot, I then pack the relevant files into a tar.gz file keeping track of where they unpack too, from there I simply exit the chroot and unpack the tar.gz file into my root file system. Of course, this is the kind of thing that a package manager normally handles. There is however no harm in simply overriding your current install with a newly configured one. Quote Link to comment Share on other sites More sharing options...
Dragoa Posted May 13, 2008 Author Share Posted May 13, 2008 Well, I got the new version of PHP installed(php -version gives me the right version number), although when I do phpinfo() from my apache server it still gives me 5.2.5 and my original build date. Should the phpinfo() be updated to reflect the new version of php?[i'm thinking it should, in which case I've got another problem I think...] Quote Link to comment Share on other sites More sharing options...
trq Posted May 13, 2008 Share Posted May 13, 2008 php -version gives you the version for the php command line interface. Are you sure you compiled php as an Apache module? Have you updated your Apache configuration to point to the new *.so file? have you restarted Apache? Quote Link to comment Share on other sites More sharing options...
trq Posted May 13, 2008 Share Posted May 13, 2008 Is there a particular reason your compiling from source instead of using a package manager? I'm not sure what OS HP-Unix uses, but it might be something to look into. Will make installing / removing software alot less painfull. Quote Link to comment Share on other sites More sharing options...
Dragoa Posted May 13, 2008 Author Share Posted May 13, 2008 Compiling from source since I really have no idea what I'm doing. (Not the best reasoning but it's generally what I've got to work with) I don't have any idea on how to use the package manager, let alone how to access it. And the people here that do know Unix that are helping me are kind of referring to me to know how to install it. Although I will look into a package manager though, which I have found and am going to try in a little bit if I can't fiddle this correctly(Although since I've already installed Apache2 and PHP from the source I don't know if this will have any sort of effect) As for my php install I am running this command: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-oci8=$ORACLE_HOME --with-pdo-oci=$ORACLE_HOME Then make, make test, and make install. Which I found the basics for from the php site, and then the oracle additions from another. I have restarted Apache a few times, although I do not know how to get it to point towards the new *.so file, mostly because I do not know where that is. And my search for *.so on the system only returns one libphp5.so, and that's the one I'm pointing at. Quote Link to comment Share on other sites More sharing options...
trq Posted May 13, 2008 Share Posted May 13, 2008 You'll need to run... ./configure --help Your missing a hell of alot of options you will probably want including the one that builds the apache module. I'm not sure what it is off the top of my head whcih is why I refer you to the help. Quote Link to comment Share on other sites More sharing options...
Dragoa Posted May 13, 2008 Author Share Posted May 13, 2008 Looking through the help the only commands I see that work with Apache 2 are the apxs2 command and the apxs2filter. The rest build modules for Apache 1.x, which I'm guessing I don't want to do. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 13, 2008 Share Posted May 13, 2008 Maybe the tutorials/guides on this site help you. They are guides HP-Unix 11 Quote Link to comment Share on other sites More sharing options...
Dragoa Posted May 14, 2008 Author Share Posted May 14, 2008 They are quite helpful, I've been looking over them for a while. But at the same time they are quite complicated(He's installing php4 and php5 to work at the same time, while including a lot of modules which I don't want), and I'm having a hard time trying to adapt the constant use of variables to my own system. Although on the plus side I've gotten Apache to update my version of PHP finally(So I know how to get around that little problem now), and now I've got a semi-standard error that I again have no idea on how to fix...cheer. Also if your curious the error is: Warning: linker path does not have real file for library -l:librt.sl. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with lib:librt.sl and none of the candidates passed a file format test using a file magic. Last file checked: /ora01/app/oracle/product/10203/lib32/liblntsh.sl.10.1 <repeats for -l:libcl.sl, -l:libnss_dsn.1, libdldl.sl, libnsl.sl> Occurs during the make step, and then if I try a make install is gripes at me about there not being a libphp5.so file(which it should be creating) Thanks a lot for all the help so far. It's been quite enlightening. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.