Finding php.ini file

I’m trying to install ionCube on my server and they’re telling me that my php.ini file is located at the following address, but in my FTP I cannot seem to find this directory. Can someone help me find it?

php.ini file /usr/lib/php5/php.ini

With 1and1 hosting you can create your own php.ini and it will override the default that they have set up. The downside is it only works in the directory that the file is in. You can however create references to point to the root directory (or wherever the php.ini ends up) so you will only have to update the one file. Hope that helps :slight_smile:

If you’re talking ionCube, I found this in their FAQ

Q. I/my client has no access to php.ini. What can I do?
A. On many systems, encoded files can automatically install the Loader when needed. We call this runtime loading, and it requires no changes to php.ini or server restart. The Loader packages contain a script that can test whether a server supports this mechanism.

You might be able to override the section in question, kinda depends on what you are trying to do.

If you’re talking localhost server, then it will be wherever the server is.

But as you say “FTP” I’m guessing you’re talking hosted online server.

And if it’s a shared host, it’s very unlikely you will be able to get at the ini file directly yourself. They’re kept outside of the individual site directories and neither HTTP nor FTP can get at them. This is something you need to discuss with the hosting provider.

That said, is it something you can deal with using .htaccess or ini_set() ??

it’s on 1and1 so I assume that’s what you’re considering a shared server.

Looks like I’ll be looking for a different server.