{"id":498,"date":"2011-07-13T04:00:54","date_gmt":"2011-07-13T10:00:54","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=498"},"modified":"2026-03-26T05:57:32","modified_gmt":"2026-03-26T11:57:32","slug":"how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/","title":{"rendered":"How to Fix \u201cPHP Is Not Recognized as an Internal or External Command\u201d in Windows"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">&nbsp;If you see this error in Command Prompt:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'php' is not recognized as an internal or external command<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">it means Windows cannot find the PHP executable file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This happens when the PHP installation directory is not added to the system <strong>PATH environment variable<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s understand why this happens and how to fix it properly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why This Error Occurs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Windows uses a special environment variable called <strong>PATH<\/strong> to locate executable files when you run commands in Command Prompt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If PHP was:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Installed manually<\/li>\n\n\n\n<li>Extracted from a ZIP archive<\/li>\n\n\n\n<li>Installed without automatic configuration<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">then its installation directory may not have been added to PATH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When that happens, Windows doesn\u2019t know where <code>php.exe<\/code> is located \u2014 and the command fails.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">What Is the PATH Variable?<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">The PATH variable is a list of directories that Windows searches when you type a command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\system32\\wbem<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>C:\\php<\/code> is not included in this list, Windows will not find <code>php.exe<\/code>.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Solution: Add PHP to the PATH Variable<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">You need to add your PHP installation folder (for example, <code>C:\\php<\/code>) to the system PATH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Current PATH<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\system32\\wbem;C:\\Program Files\\Intel\\DMIX<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Corrected PATH (PHP Added)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\php;%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\system32\\wbem;C:\\Program Files\\Intel\\DMIX<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Placing <code>C:\\php<\/code> at the beginning ensures Windows checks that directory first.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Step-by-Step Instructions (Windows 10 \/ 11)<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Open System Properties<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Press:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Win + R<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sysdm.cpl<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Press Enter.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Go to Advanced Tab<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>Advanced<\/strong> \u2192 <strong>Environment Variables<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Edit System PATH<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Under <strong>System Variables<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Find <strong>Path<\/strong><\/li>\n\n\n\n<li>Click <strong>Edit<\/strong><\/li>\n\n\n\n<li>Click <strong>New<\/strong><\/li>\n\n\n\n<li>Add:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">(Replace with your actual PHP installation directory)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Save Changes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>OK<\/strong> on all windows.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Restart Command Prompt<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Close and reopen Command Prompt.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Verify the Fix<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If configured correctly, you will see your installed PHP version instead of an error.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">How to Confirm PHP Location<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re unsure where PHP is installed:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check where you extracted it<\/li>\n\n\n\n<li>Look inside <code>C:\\Program Files<\/code><\/li>\n\n\n\n<li>Use File Explorer search for <code>php.exe<\/code><\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">Common Mistakes to Avoid<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">Adding the wrong folder<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure you add the folder containing <code>php.exe<\/code>, not the file itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Correct:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Wrong:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\php\\php.exe<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Not Restarting Command Prompt<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Environment changes require a new terminal session.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Multiple PHP Versions in PATH<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you have multiple PHP versions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The first one listed in PATH takes priority<\/li>\n\n\n\n<li>Remove unused versions<\/li>\n\n\n\n<li>Reorder paths carefully<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">Advanced Tip: Check Current PATH via Command Line<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">You can see your current PATH using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo %PATH%<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This helps identify duplicates or incorrect entries.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">FAQ<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Why does PHP work in XAMPP but not in Command Prompt?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Because XAMPP runs PHP internally and does not require a global PATH entry. For system-wide access, PHP must be added to PATH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Do I need to restart my computer?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">No. Restarting Command Prompt is usually enough.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Can this issue happen on Windows Server?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. The solution is the same &#8211; update the system PATH variable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In case of any doubt, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\" title=\"\">contact SupportPro<\/a>.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/www.supportpro.com\/freecheckup.php\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size wp-block-paragraph\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;If you see this error in Command Prompt: it means Windows cannot find the PHP executable file. This happens when the PHP installation directory is not added to the system&hellip;<\/p>\n","protected":false},"author":4,"featured_media":15603,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-498","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server-tweaking"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"SupportPRO Admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Server Management Tips | SupportPRO Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Fix PHP Not Recognized Error in Windows CMD\" \/>\n\t\t<meta property=\"og:description\" content=\"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2011\/07\/internalerror-e1771830337249.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2011\/07\/internalerror-e1771830337249.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t\t<meta property=\"og:image:height\" content=\"923\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-07-13T10:00:54+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-03-26T11:57:32+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Fix PHP Not Recognized Error in Windows CMD\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2011\/07\/internalerror-e1771830337249.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#article\",\"name\":\"Fix PHP Not Recognized Error in Windows CMD\",\"headline\":\"How to Fix \\u201cPHP Is Not Recognized as an Internal or External Command\\u201d in Windows\",\"author\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/07\\\/internalerror-e1771830337249.jpg\",\"width\":1024,\"height\":923,\"caption\":\"photo of a developer(Black shadow) using Windows Command Prompt on a desktop computer, environment variables window open on screen\"},\"datePublished\":\"2011-07-13T04:00:54-06:00\",\"dateModified\":\"2026-03-26T05:57:32-06:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#webpage\"},\"articleSection\":\"Server Tweaking\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.supportpro.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/server\\\/#listItem\",\"name\":\"Server\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/server\\\/#listItem\",\"position\":2,\"name\":\"Server\",\"item\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/server\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/server\\\/server-tweaking\\\/#listItem\",\"name\":\"Server Tweaking\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/server\\\/server-tweaking\\\/#listItem\",\"position\":3,\"name\":\"Server Tweaking\",\"item\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/server\\\/server-tweaking\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#listItem\",\"name\":\"How to Fix \\u201cPHP Is Not Recognized as an Internal or External Command\\u201d in Windows\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/server\\\/#listItem\",\"name\":\"Server\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#listItem\",\"position\":4,\"name\":\"How to Fix \\u201cPHP Is Not Recognized as an Internal or External Command\\u201d in Windows\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/server\\\/server-tweaking\\\/#listItem\",\"name\":\"Server Tweaking\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\",\"name\":\"SupportPRO\",\"description\":\"SupportPRO Blog\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/\",\"telephone\":\"+18476076123\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/\",\"name\":\"SupportPRO Admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13d2f63048d631e03a432375448be5eb7861069df4fef10f0cb1c7b36554c225?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"SupportPRO Admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#webpage\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/\",\"name\":\"Fix PHP Not Recognized Error in Windows CMD\",\"description\":\"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/07\\\/internalerror-e1771830337249.jpg\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#mainImage\",\"width\":1024,\"height\":923,\"caption\":\"photo of a developer(Black shadow) using Windows Command Prompt on a desktop computer, environment variables window open on screen\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\\\/#mainImage\"},\"datePublished\":\"2011-07-13T04:00:54-06:00\",\"dateModified\":\"2026-03-26T05:57:32-06:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/\",\"name\":\"Server Management Tips\",\"description\":\"SupportPRO Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>Fix PHP Not Recognized Error in Windows CMD<\/title>\n\n","aioseo_head_json":{"title":"Fix PHP Not Recognized Error in Windows CMD","description":"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step","canonical_url":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#article","name":"Fix PHP Not Recognized Error in Windows CMD","headline":"How to Fix \u201cPHP Is Not Recognized as an Internal or External Command\u201d in Windows","author":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"publisher":{"@id":"https:\/\/www.supportpro.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2011\/07\/internalerror-e1771830337249.jpg","width":1024,"height":923,"caption":"photo of a developer(Black shadow) using Windows Command Prompt on a desktop computer, environment variables window open on screen"},"datePublished":"2011-07-13T04:00:54-06:00","dateModified":"2026-03-26T05:57:32-06:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#webpage"},"isPartOf":{"@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#webpage"},"articleSection":"Server Tweaking"},{"@type":"BreadcrumbList","@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.supportpro.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/server\/#listItem","name":"Server"}},{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/server\/#listItem","position":2,"name":"Server","item":"https:\/\/www.supportpro.com\/blog\/category\/server\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/server\/server-tweaking\/#listItem","name":"Server Tweaking"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/server\/server-tweaking\/#listItem","position":3,"name":"Server Tweaking","item":"https:\/\/www.supportpro.com\/blog\/category\/server\/server-tweaking\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#listItem","name":"How to Fix \u201cPHP Is Not Recognized as an Internal or External Command\u201d in Windows"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/server\/#listItem","name":"Server"}},{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#listItem","position":4,"name":"How to Fix \u201cPHP Is Not Recognized as an Internal or External Command\u201d in Windows","previousItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/server\/server-tweaking\/#listItem","name":"Server Tweaking"}}]},{"@type":"Organization","@id":"https:\/\/www.supportpro.com\/blog\/#organization","name":"SupportPRO","description":"SupportPRO Blog","url":"https:\/\/www.supportpro.com\/blog\/","telephone":"+18476076123"},{"@type":"Person","@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author","url":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/","name":"SupportPRO Admin","image":{"@type":"ImageObject","@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/13d2f63048d631e03a432375448be5eb7861069df4fef10f0cb1c7b36554c225?s=96&d=mm&r=g","width":96,"height":96,"caption":"SupportPRO Admin"}},{"@type":"WebPage","@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#webpage","url":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/","name":"Fix PHP Not Recognized Error in Windows CMD","description":"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.supportpro.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#breadcrumblist"},"author":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"creator":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2011\/07\/internalerror-e1771830337249.jpg","@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#mainImage","width":1024,"height":923,"caption":"photo of a developer(Black shadow) using Windows Command Prompt on a desktop computer, environment variables window open on screen"},"primaryImageOfPage":{"@id":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/#mainImage"},"datePublished":"2011-07-13T04:00:54-06:00","dateModified":"2026-03-26T05:57:32-06:00"},{"@type":"WebSite","@id":"https:\/\/www.supportpro.com\/blog\/#website","url":"https:\/\/www.supportpro.com\/blog\/","name":"Server Management Tips","description":"SupportPRO Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.supportpro.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Server Management Tips | SupportPRO Blog","og:type":"article","og:title":"Fix PHP Not Recognized Error in Windows CMD","og:description":"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step","og:url":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/","og:image":"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2011\/07\/internalerror-e1771830337249.jpg","og:image:secure_url":"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2011\/07\/internalerror-e1771830337249.jpg","og:image:width":1024,"og:image:height":923,"article:published_time":"2011-07-13T10:00:54+00:00","article:modified_time":"2026-03-26T11:57:32+00:00","twitter:card":"summary","twitter:title":"Fix PHP Not Recognized Error in Windows CMD","twitter:description":"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step","twitter:image":"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2011\/07\/internalerror-e1771830337249.jpg"},"aioseo_meta_data":{"post_id":"498","title":"Fix PHP Not Recognized Error in Windows CMD","description":"Learn how to fix the PHP is not recognized error in Windows by correctly adding PHP to the system PATH environment variable step by step","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"seo_analyzer_scan_date":"2026-03-26 12:21:01","breadcrumb_settings":null,"limit_modified_date":false,"open_ai":null,"ai":{"faqs":[],"keyPoints":[],"titles":[],"descriptions":[],"socialPosts":{"email":[],"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2021-12-10 16:14:49","updated":"2026-06-30 23:27:14"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.supportpro.com\/blog\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.supportpro.com\/blog\/category\/server\/\" title=\"Server\">Server<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.supportpro.com\/blog\/category\/server\/server-tweaking\/\" title=\"Server Tweaking\">Server Tweaking<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tHow to Fix \u201cPHP Is Not Recognized as an Internal or External Command\u201d in Windows\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.supportpro.com\/blog"},{"label":"Server","link":"https:\/\/www.supportpro.com\/blog\/category\/server\/"},{"label":"Server Tweaking","link":"https:\/\/www.supportpro.com\/blog\/category\/server\/server-tweaking\/"},{"label":"How to Fix \u201cPHP Is Not Recognized as an Internal or External Command\u201d in Windows","link":"https:\/\/www.supportpro.com\/blog\/how-to-fix-error-php-has-encountered-an-access-violation-at-7d611952\/"}],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=498"}],"version-history":[{"count":13,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/498\/revisions"}],"predecessor-version":[{"id":16683,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/498\/revisions\/16683"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/15603"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}