Problem with /usr/bin/php

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 SIGNED MESSAGE-----
Hash: SHA1

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/

iQIcBAEBAgAGBQJMj4pDAAoJEF+XTK08PnB5qMsP/jyrAqDRK5aILMi/nFnMZlDY
h7eQGrZ+DOUVp0KGYaBP3kk0JC6vdHeZDh6W1uC1Rokmrj4OdV2x3GhcmVOHr/za
Tu8V/40fPVsy5XIPNPIjtREl+SnzBceWYxNDut1Ib7HFujrL75BqC7vMTaIN0nJk
ze05YamrvdFhMOiuYSd1Lok4lS7hY4e2oUsa6Ho2cp9+bBUSSqBxXaDPmUu0QUxV
MKseMCXte6BcZfSq4h/IOYlzPJZklBG4PTvBd8DASlshZW6PK4VyLFbdnjCu5K8N
vpqNZY7guRD+EvIp/hw99BiXTar6uo6wr0S23Y1/X9ooIi5n5LKRloGq0XaB4b2l
GvKUVBf3tABBYvxPjuPOhtutLf8+AEtEhzaiuUQzTlGRO02yD8pX99/PPp2S+qAB
FfZbDWtZ6JRYD2DtQMu07E6rcJsl8YGgEA/ADegI4otXyVe5odLU3XoK3i9L2ccF
Ni3rvkcnDa7SBtMraPCXCM9IH+6k4J5va7nZIFhfwDyrxEA4Ti8N8LyynjcQN+1F
LrhgUAQIdsouV/+AmCSFAAhSdpZSTSqsNqVKpsWsce1FX9jquwVpZl70iQM2Hf9o
0iDw2CMPLKM0kNWrmo0lrPMWqdZu8zxgErt/8mklMzKgGnwaFqXvQEkhuFpqqxo/
yREd+jDquvFVBn4EbPFW
=iz1t
-----END PGP SIGNATURE-----

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 SIGNED MESSAGE-----
Hash: SHA1

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/

iQIcBAEBAgAGBQJMj7PEAAoJEF+XTK08PnB5eugQAMykfwmxhGuRL2hfAECn4EGZ
2fP+bFIVcw+nPFjKbsmyHJ6Hnr846a/79vQfd3CQcD1VaBXdet+d4WuET207UQa/
kLDecuYHCmGa90ka3XQW44uyIrjIUlFi1/TS9QQeQHVmmz7ycVhUZs7bd5uIHkxT
hJh9CH6SVklH2F3mqi5J2BYglXLb7fpiQQg5w7hkCJME45wO817h0GIh9hAGKvEi
4E9E0LSUTSNTrJfFMiaS4bOQqmwZM8IunYzG+1w9R8hsS09xmgmWR33kaap7NV0a
k1ofRV1DvzE94wuCgqVWjvZZzHpqm8OsFeOdy36/JvfDhF64mIGkc3CCKUm+zKm/
BJShYYoYf1rKBL/gYGwe1JvhjxTSsfplZ6RgyTIqjZxCPXPqZUQZduFEzEpqTswG
mniIPT6n2qVdp4A0XEJyFS4nQnPIJYmS0h5b/5oEFE00U+tYlUMcLgOOta1VyeyZ
ttBJe+VivD/7aD1unblw3PNP9xn0sqIUVq9uca0B+Q0OsaB9GotrmrKL5ZTs8Bar
q8Qcjq91kVSNh8ibFsjPtLW1K10+RChIQD/7kBUUhIFI70yohWUxN2lA2kHsw8B+
G4dV01+gKCNoY8hPprdhAr2qgUSj06yNDDzmr2WZK+F5P8PhDnevyT6JjRkfbngX
JV4TczYTv6N3OwKkB6vU
=zQPI
-----END PGP SIGNATURE-----

OK thank you for your help. I’ll take no action for now as i’m not using the specific command. Thanks again…