Skip to main content
Help Center
The GoDaddy Community will undergo maintenance starting on Tuesday, August 3rd at 3pm PST / 6pm EST. Learn more
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kgoyena
Getting Started

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 3
3fk
Former Employee

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 🙂

kgoyena
Getting Started

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?
3fk
Former Employee

@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