Hello,
I’ve accidentally changed /usr/bin/php file on my server by running a cp command. I know this is bad, i just don’t know how bad. Everything is working fine (websites using php), so i just wanted to know what this action could cause and also how can i restore original content.
Apache, usually, uses a PHP module rather than the PHP executable that you
tweaked. Unless you use PHP from the command line you’re probably fine to
ignore this and the next time you patch it will then be replaced with an
updated version. You could also uninstall the package holding that file
and then install it again to get things back to normal, or find the
package somewhere and extract that one file and copy it over the current
version. Post the output from the following command to see how munged
your /usr/bin/php file’s package is as a result. Doing so after fixing
things should show a difference assuming something is truly wrong with the
file:
rpm -qfV /usr/bin/php
Good luck.
On 09/14/2010 08:28 AM, peppos wrote:
>
> Hello,
> I’ve accidentally changed /usr/bin/php file on my server by running a
> cp command. I know this is bad, i just don’t know how bad. Everything is
> working fine (websites using php), so i just wanted to know what this
> action could cause and also how can i restore original content.
>
> Thanks!
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
If I were you and if things are working (especially after restarting your
web server, presumably Apache, which is probably using PHP directly) I’d
leave everything alone unless you knew that you needed /usr/bin/php. I’m
guessing that is merely a symlink to a real file from a package (perhaps
php5) which may have a file corrupted as you originally stated, but if you
do not use that actual file then it’s probably safer to just leave things
alone until the system fixes itself via a patch in the future.
Otherwise, find out which file /usr/bin/php points to and find which
package (as mentioned in a previous post) that file came from which should
then let you verify the package.
Good luck.
On 09/14/2010 11:06 AM, peppos wrote:
>
> Thanks for the reply. The output of the command you gave me is: file
> /usr/bin/php is not owned by any package…
> I can see in webmin the following:
>
> Package php5
> Class Development/Languages/Other
> Version 5.2.11-0.1.1
> Vendor openSUSE
> Architecture x86_64
>
> Don’t know if it helps…
>
> So uninstalling or updating the package will affect plesk?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/