<p>Had a plugin installed which had been using CRAFT_BUILD and as its been deprecated it was throwing the error, problem was could access admin to update plugin.</p>

<p>Manually, entered CRAFT_BUILD and other deprecated info into <code>craft/app/Info.php</code> and it let me login to fix.</p>

CC BY-SA 3.0
2017-02-01T15:59:47.227Z
2017-02-02T06:50:51.847Z
2017-02-02T06:50:51.847Z
Harry Mee
<p>I ran into this error when updating a live Craft site. My local update had gone fine. So I ended up editing my <code>craft/app/Info.php</code> file (live) from:</p>

<pre><code>define('CRAFT_VERSION', '2.6');
define('CRAFT_BUILD', '2949');
</code></pre>

<p>to just:</p>

<pre><code>define('CRAFT_VERSION', '2.6.2949');
</code></pre>

<p>I then ran into the error:</p>

<blockquote>
  <p>Internal Server Error Use of undefined constant CRAFT_MIN_VERSION_REQUIRED</p>
</blockquote>

<p>So again, I updated my <code>craft/app/Info.php</code> to add the line:</p>

<pre><code>define('CRAFT_MIN_VERSION_REQUIRED', '2.1.2570');
</code></pre>

<p>It then logged me in and and asked me to finish updating SEOmatic, so I clicked <code>Update</code> and it was running fine again but showing the following depreciation errors:</p>

<blockquote>
  <p>craft()->getBuild() has been deprecated. As of Craft 2.6.2951,
  craft()->getVersion() returns the complete version number
  (X.Y.Z).  /var/www/craft/app/etc/behaviors/AppBehavior.php (149)</p>
</blockquote>

CC BY-SA 3.0
2017-04-16T07:45:32.143Z
2017-04-16T09:30:18.317Z
2017-04-16T09:30:18.317Z
Dan Christian
<p>Accessing my /admin of a craft site and i get this error.</p>

<pre><code>Internal Server Error

Use of undefined constant CRAFT_BUILD - assumed 'CRAFT_BUILD'
</code></pre>

<p>Never happened before today, I'm running PHP v5.6.30.</p>

<p>Thanks</p>

<admin><error>
What does the error "Use of undefined constant CRAFT_BUILD - assumed 'CRAFT_BUILD'?" mean?
# What does the error "Use of undefined constant CRAFT_BUILD - assumed 'CRAFT_BUILD'?" mean?

(Asked by: username_0 on 2017-02-01)

Accessing my /admin of a craft site and i get this error.
Internal Server Error

Use of undefined constant CRAFT_BUILD - assumed 'CRAFT_BUILD'

Never happened before today, I'm running PHP v5.6.30.
Thanks

**Tags:** admin, error


---

## 2 answers

### Answer by username_0 on 2017-02-01. Score: 2 | Accepted answer

Had a plugin installed which had been using CRAFT\_BUILD and as its been deprecated it was throwing the error, problem was could access admin to update plugin.

Manually, entered CRAFT\_BUILD and other deprecated info into `craft/app/Info.php` and it let me login to fix.


---

### Answer by username_1 on 2017-04-16. Score: 1

I ran into this error when updating a live Craft site. My local update had gone fine. So I ended up editing my craft/app/Info.php file (live) from:
define('CRAFT_VERSION', '2.6');
define('CRAFT_BUILD', '2949');

to just:
define('CRAFT_VERSION', '2.6.2949');

I then ran into the error:

Internal Server Error Use of undefined constant CRAFT_MIN_VERSION_REQUIRED

So again, I updated my craft/app/Info.php to add the line:
define('CRAFT_MIN_VERSION_REQUIRED', '2.1.2570');

It then logged me in and and asked me to finish updating SEOmatic, so I clicked Update and it was running fine again but showing the following depreciation errors:

craft()->getBuild() has been deprecated. As of Craft 2.6.2951,
  craft()->getVersion() returns the complete version number
  (X.Y.Z).  /var/www/craft/app/etc/behaviors/AppBehavior.php (149)


---

