{"id":15525418,"date":"2022-04-04T16:40:17","date_gmt":"2022-04-04T16:40:17","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/abspath-not-defined-on-checkout\/"},"modified":"2022-04-04T16:40:17","modified_gmt":"2022-04-04T16:40:17","slug":"abspath-not-defined-on-checkout","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/abspath-not-defined-on-checkout\/","title":{"rendered":"ABSPATH not defined on checkout?"},"content":{"rendered":"<p>Hi there,<br \/>\nI need to add a tiny bit of backstory here since I have made significant changes to the system my site is running on.<\/p>\n<p>I tested the checkout on my old server running Apache and PHP 5.4.<br \/>\nI have now transferred to a new server running CloudPanel on Debian 10 (NGINX) with PHP 7.4.<\/p>\n<p>After testing the checkout system today I was greeted with a message that said:<br \/>\n&#8220;It was not possible to process your order. Try again.&#8221; (translated from Dutch).<\/p>\n<p>I&#8217;ve checked the PHP logs and found a rather worrying error. Here it is:<\/p>\n<pre><code>[04-Apr-2022 14:38:47 Europe\/Berlin] PHP Warning: require(ABSPATHWPINC\/option.php): failed to open stream: No such file or directory in \/home\/cloudpanel\/htdocs\/dev.pctoppers.nl\/wp-includes\/functions.php on line 8\n[04-Apr-2022 14:38:47 Europe\/Berlin] PHP Fatal error: require(): Failed opening required &#039;ABSPATHWPINC\/option.php&#039; (include_path=&#039;.:\/usr\/share\/php&#039;) in \/home\/cloudpanel\/htdocs\/dev.pctoppers.nl\/wp-includes\/functions.php on line 8\n[04-Apr-2022 15:01:31 Europe\/Berlin] PHP Warning: Use of undefined constant ABSPATH - assumed &#039;ABSPATH&#039; (this will throw an Error in a future version of PHP) in \/home\/cloudpanel\/htdocs\/dev.pctoppers.nl\/wp-settings.php on line 33\n[04-Apr-2022 15:01:31 Europe\/Berlin] PHP Warning: require(ABSPATHwp-includes\/version.php): failed to open stream: No such file or directory in \/home\/cloudpanel\/htdocs\/dev.pctoppers.nl\/wp-settings.php on line 33\n[04-Apr-2022 15:01:31 Europe\/Berlin] PHP Fatal error: require(): Failed opening required &#039;ABSPATHwp-includes\/version.php&#039; (include_path=&#039;.:\/usr\/share\/php&#039;) in \/home\/cloudpanel\/htdocs\/dev.pctoppers.nl\/wp-settings.php on line 33<\/code><\/pre>\n<p>Here is my ABSPATH in the WP-config file:<\/p>\n<pre><code>\/* That&#039;s all, stop editing! Happy publishing. *\/\n\n\/** Absolute path to the WordPress directory. *\/\nif ( ! defined( &#039;ABSPATH&#039; ) ) {\n    define( &#039;ABSPATH&#039;, __DIR__ . &#039;\/&#039; );\n}\n\n\/** Sets up WordPress vars and included files. *\/\nrequire_once ABSPATH . &#039;wp-settings.php&#039;;<\/code><\/pre>\n<p>I don&#8217;t really see anything wrong with this. I have already tried the following things:<br \/>\n1. Rewrite all the permissions.<br \/>\n2. Deleted all files (except wp-config.php &amp; \/wp-content) and uploaded from a clean download.<br \/>\n3. Disabled (except necessary plugins (WooCommerce, Elementor, JetWooBuilder)) all plugins.<br \/>\n4. Completely restarted the server.<\/p>\n<p>You can try adding a product in the cart and go to checkout and will see it does not work.<\/p>\n<p>Here is a link to the systemreport: https:\/\/www.toptal.com\/developers\/hastebin\/udibepotaf.yaml<\/p>\n<p>Hopefully someone can help me I&#8217;ve been trying all day \ud83d\ude42<\/p>\n","protected":false},"template":"","class_list":["post-15525418","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15525418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15525418\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15525418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}