{"id":9749,"date":"2020-01-30T11:31:34","date_gmt":"2020-01-30T11:31:34","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=9749"},"modified":"2021-11-13T06:03:04","modified_gmt":"2021-11-13T06:03:04","slug":"how-to-link-php-from-xampp-installation-to-use-php-command-from-user-or-any-other-directory-in-ubuntu-or-linux","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-link-php-from-xampp-installation-to-use-php-command-from-user-or-any-other-directory-in-ubuntu-or-linux\/","title":{"rendered":"How to link php from XAMPP  installation to use php command from user or any other directory in Ubuntu or Linux"},"content":{"rendered":"\n<p><strong>Assumption:<\/strong><br>I assume that you have already installed XAMPP in your Ubuntu OR Linux machine.<br>If not, then you may follow this link to do so:  <a href=\"https:\/\/www.devopsschool.com\/blog\/installing-xampp-7-4-xxx-on-ubuntu\/\">https:\/\/www.devopsschool.com\/blog\/installing-xampp-7-4-xxx-on-ubuntu\/<\/a> <\/p>\n\n\n\n<p><strong>How I got the error:<\/strong><br>After installing XAMPP, I tries to check if I am able to access php command by running the below command:<br><code>php -v<\/code><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p> <strong>The above command gave me following error: <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"190\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-57.png\" alt=\"\" class=\"wp-image-9753\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-57.png 628w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-57-300x91.png 300w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/figure>\n\n\n\n<p> <strong>Solution:<\/strong> <br><strong>sudo ln -s \/opt\/lampp\/bin\/php \/usr\/bin\/php<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"364\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-58.png\" alt=\"\" class=\"wp-image-9754\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-58.png 824w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-58-300x133.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-58-768x339.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/figure>\n\n\n\n<p>Thanks for reading, I hope you enjoyed this article.<\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_17692\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_17067\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_17692\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Assumption:I assume that you have already installed XAMPP in your Ubuntu OR Linux machine.If not, then you may follow this link to do so: https:\/\/www.devopsschool.com\/blog\/installing-xampp-7-4-xxx-on-ubuntu\/ How I got the error:After installing XAMPP, I tries to check if I am able to access php command by running the below command:php -v The above command gave me&#8230;<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[4957],"tags":[],"class_list":["post-9749","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=9749"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9749\/revisions"}],"predecessor-version":[{"id":24983,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9749\/revisions\/24983"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=9749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=9749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=9749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}