cancel
Showing results for 
Search instead for 
Did you mean: 
kgoyena
Skilled

Add new PHP environment variable

I'm working on incorporating an email API into my site. This requires setting an API key as a PHP environment variable.  I think I need to update or create a PHP.INI file but I need help with that task.  Any help or guidance would be appreciated.

3 REPLIES
Employee
Employee

Re: Add new PHP environment variable

Hey @kgoyena

I would recommend uploading phpinfo.php  
http://php.net/manual/en/function.phpinfo.php
Youtube Guide
Under : public_html/
So it will look like this :  public_html/phpinfo.php  equal to the domainameyouhave.com/phpinfo.php
Same goes to either .user.ini or php.ini example: public_html/.user.ini

After the update: Kill PHP Processes (Guide: How to Kill) and load domainameyouhave.com/phpinfo.php
Ctrl+F find the directives you put to see if it did take effect. if no go with .user.ini then try php.ini
If it doesn't work still, there is a possibility that your directives/ code is wrong.

Hope that helps,

Warm regards,

Joven Smiley Happy

kgoyena
Skilled

Re: Add new PHP environment variable

I've tried using the .user.ini file in the HTML root folder. Still no luck. Does it matter that I'm running version 5.4 of PHP?
Employee
Employee

Re: Add new PHP environment variable

@kgoyena  hey ! 

Sorry am a bit late on responses 5.4? (It matters to php) I think you may try php5.ini 
So it it's like the legacy linux make sure to put it under web root : "/"
If no go still after a few minutes to an hour, and still won't show on phpinfo.php the updates.

I highly recommend contacting the "hosting chat support" https://uk.godaddy.com/community That Chat Support Button  on the top right hand side will be clickable during business hours via Eastern Time.

Warm regards,

Joven