Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SagarAhmad's avatar

Use of undefined constant

Warning: Use of undefined constant CLIENT_ID - assumed 'CLIENT_ID' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\ibeehire\recruiter\pjob-social-share.php on line 130

0 likes
19 replies
Sinnbeck's avatar

And what do you have on line 130 of pjob-social-share.php ?

SagarAhmad's avatar

please anyone provide a best solution i'm new in php Laravel

Sinnbeck's avatar

@SagarAhmad is that defined inside the same file or another file? This does not seem to be laravel?

Sinnbeck's avatar

@SagarAhmad yes I can see that. So no framework?

is that defined inside the same file or another file?

Sinnbeck's avatar

@SagarAhmad no I work with plain php as well :) but to help you I need to know more. It seems that you might be setting the consts in a seperate file, but aren't loading that file in pjob-social-share.php

Sinnbeck's avatar

@SagarAhmad are you using composer for autoloading or do you just require files as needed?

Try requiring the consts file at the top of the file with the error

require './path/to/consts.php';
Sinnbeck's avatar

@SagarAhmad oh ok. I think you need to show some more. I am working completely in the blind here. As this isn't using a framework, I have no knowledge the structure or how you are autoloading. All I can say is that your defines does not seem to be loaded

Is the project public on github perhaps?

Sinnbeck's avatar

@SagarAhmad ok. Can you give anything to go by? There is no way I can guess the problem based on the error alone. I have already told you what I think is causing it, but without knowing your project it's mostly impossible to help fix :(

Please or to participate in this conversation.