Jump to content

multiple php.ini


SFB

Recommended Posts

as many people know, I am hosted by dcole. when he had a windows server somehow i was able to have my own php.ini. it affected my folder and only my folder. now when dan has fedora core 5 with apache, my php.ini does nothing. is there a way to have a php.ini for my folder. if i figure this out dcole said he would let me have one.

Link to comment
Share on other sites

php.ini is searched in these locations (in order): SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD) HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location) The PHPRC environment variable Current working directory (for CLI) The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows) Windows directory (C:\windows or C:\winnt) (for Windows), or --with-config-file-path compile time option
Look into creating an environment variable to point to the location of your php.ini or something like that. I'm not sure what server you are running on, so your host might have to help you with that.
Link to comment
Share on other sites

Look into creating an environment variable to point to the location of your php.ini or something like that.  I'm not sure what server you are running on, so your host might have to help you with that.

i think the server has the latest versions of fedora, apache, php,... installed on it. how and where would an enviorment variable be created
Link to comment
Share on other sites

when i googled it, i got a bunch of results saying there are multiple php.ini files and where peope are asking what one to use. i never really go something that said this is how to create another php.ini file. i also found some hosts that said you had your own php.ini file. ini_set is currently blocked by the dcole server but dcole said he would allow a php.ini file if i could figure this out.

Link to comment
Share on other sites

If you can determine how to create an environment variable, you can put php.ini anywhere you want, as long as you point the environment variable to the right place.

Ok so I will admit this mabey just a few times... I dont know everything about php espessialy when it comes to installing and changin setting and things. so where should i start with creating an environment variable. like what file. not necessarly a location but a file name would be good enough for me. lets say this wasnt Linux. what would you do?
Link to comment
Share on other sites

Windows has a GUI for setting environment variables, you can also put them I think in win.ini or another startup config file, I think in the registry also. Environment variables are not a PHP option though, they are part of the operating system. An example in Windows would be %SYSTEM_ROOT% I think, which would point to c:\winnt or c:\windows. Linux might store that stuff in a .profile file or somewhere else, I'm just not sure where.

Link to comment
Share on other sites

well my testing posiblities end at apache. i do not have Fedora. dcole does. I have googled this for hours but havent came up with anything. one interesting thing i found is that people seem to say you can put things from php.ini in the .htaccess is this true?o well .htaccess doesnt work on the dcole server anyways. i should really get that old computer/server from mitch (mogaard.ath.cx) and set it up to try to set up with fedor so i can help dan. i should get my own server but my family doesnt like to leave things turned on for ever so there is a problem with that

Link to comment
Share on other sites

Try looking in "/etc/bashrc" and in "/etc/profile" for something that looks like environment variables being set.You can also try the export command. export PHPRC=/path/to/php.iniMake sure that you only specify the directory that php.ini is in, don't include the file itself in the path.Or, if you want to concentrate on web programming and leave running the servers to people who want to concentrate on running the servers, then just buy your own web space like everyone else does! The reason I don't know how to properly configure a Linux server is because I've never wanted to spend my time learning how to do that. It's a whole lot easier, and saves a lot of headaches, if you rent space on a server that is actually working and administered by professionals. But then again, if you want to learn how to administer servers, then more power to you.

Link to comment
Share on other sites

i do not have direct access to the server but i do have a lot of power on the programing side. the dcole server is really a good deal but there are lots of little problems that pop up. after all dcole and I are still in highschool and anything we have learned we have taught ourselves. I could get my own server but then i would have to fix the problems myself.

Link to comment
Share on other sites

If you rent space online, the money you pay is to make sure that you don't have to deal with problems like misconfigurations. There are a lot of subtleties in server configuration, and I personally just don't really have the desire to learn them. If you can get a server with cPanel on it or some administration tool like that, it makes it easy to do anything a programmer would generally need to do with a server, like setup email and ftp accounts or manage databases or subdomains, things like that. But even when it comes to something like upgrading PHP or MySQL to a newer version, I still leave that to the pros. But it's a personal preference thing really, if servers are your thing then that's cool. But I was at a time when I was spending almost as much time trying to get servers to work as I was writing code for them, and being a programmer, that didn't really make a lot of sense to me, especially when it costs as little as $2/month for space. I got an excellent deal for $5/month, I think my plan has unlimited databases, unlimited subdomains, up to 20 individual domains, and something like 300 email accounts and something like 700MB of space. In fact, I think I got the premium 700 plan here:http://geekhosting.com/premium_hosting.htmlBut they were running a sale when I signed up, so I got it for half price. But look at the stats on the server, it would take me personally a lot of time and energy to set that up for myself, not to even mention the costs for hardware and bandwidth.*I guess I only have 60 databases available. Oh well..

Link to comment
Share on other sites

If you think about it it would cost of electricity for a server is almost the same as the cost of a cheep host. I have a good deal currently. cost to me is nothing but yet I do run into some problems but then thats what makes programing fun.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...