Jump to content

where is php.ini


SN1P3R_85

Recommended Posts

This will probably sound really ignorant to some of you guys, but im wondering where i can access my php.ini file. Today i set my domain name up to be hosted on a server, with 1and1.com. The timezone is off, and i would like to go into the php.ini file and change that setting. I can't figure out how to find it. Bear with my php-noobishness. thanks

Link to comment
Share on other sites

To update your php.ini on a 1&1 server you need to do so via .htaccess mods.

 

Simple upload them to the domains root folder as .htaccess and they will pick up.

 

I believe you might be able to do it by also uploading mods to php.ini in the same fashion but I know you can do it as .htaccess mods for 1&1 because I have done it myself.

Link to comment
Share on other sites

If you are on shared hosting, the master php.ini is not accessible. In this case you should be able to put settings into a .htaccess file (when php is running as an Apache module) or in a local php.ini (when php is running as a CGI wrapper/application.)

 

If you are on VPS or dedicated hosting, you would have access to the master php.ini. If you cannot locate it through browsing the directory structure, use a phpinfo(); statement. The line for "Loaded Configuration File" will indicate where the php.ini is getting loaded from.

Link to comment
Share on other sites

k, thanks. So, should i include everything that is normally in a php.ini folder? If i dont' will it overwrite the old php.ini file? For example, if i want to change the time-zone, then if i did this:

 

<?php

 

date.timezone = "timezone_here"

 

?>

 

would it work, without messing up the rest of my php.ini settings?

Link to comment
Share on other sites

I know that many Linux/Unix systems buries the php.ini file some where in the /etc/ or /usr/local/etc/ directories. You can always use this command to find it: find /etc/ -iname '*php.ini*' or find /usr/local/etc/ -iname '*php.ini*'. You do not really need the wildcards but some systems have things such as php.ini.distribution and no php.ini by default.

 

I hope that helps. However, for what I read above, this might not help with this particular hosting service.

Link to comment
Share on other sites

What exact error did you get?

 

Please read my post above (and the FAQ at 1and1.com). You need to start by determining how php is implemented on the web server. Php settings don't work (and in fact cause server errors) when put into a .htaccess file when php is running as a CGI wrapper.

Link to comment
Share on other sites

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, webadmin@kundenserver.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

---------------------------------------------------------------------------------------------------------------------------------

 

that is my error. I have no clue what kind of hosting it is, how can i find out? Or should i just attempt to make my own php.ini file?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.