Page 1 of 1

How To Apply Php.ini To Multiple Subdirectories?

Posted: Sat Sep 19, 2009 9:30 pm
by johnywhy
using cmsms verson 1.65, linux webhost (shared), php 5.x

I'm encountering difficulties trying to enable fopen, buffering, and other cmsms requirements.

i'm using a shared host, so i must create a custom php.ini in the cmsms directory. unfortunately, custom php.ini's do not flow down to subdirectories.

My options are:
  • --put a copy of the same php.ini in all subdirectories, which makes installing cmsms a bit complicated.
  • --put code into htaccess, which forces the root php.ini to apply to all subdirs. Trying to accomplish that-- hope someone here can help.
here is my cmsms install page, showing the missing buffering and fopen.
http://bit.ly/2BXcxr

the goal is to put some code into .htaccess in the app's root dir, so that the php.ini located in that same root dir will affect all subdirs.

i have tried various methods, and i'm just getting server errors-- and confused.

here are 3 articles describing methods to achieve this, but nothing seems to work:
http://bit.ly/pyOaN
http://bit.ly/udgAT
http://bit.ly/J0TUM

i'm on 1and1 shared hosting. they tell me i have cgi php. here's my info.php on the root dir:
http://bit.ly/12wch6

this root dir contains the php.ini which i want to apply to all subdirs.

please help!

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sat Sep 19, 2009 9:52 pm
by calguy1000
and HOW exactly is this a CMSMS problem?

Sorry if I appear to be rude. but we are trying to maximize a signal-to-noise-ratio here.

Please, questions like this and
how do I create a 'database' are better asked elsewhere.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sat Sep 19, 2009 11:04 pm
by johnywhy
Your characterization of my question as "noise"  is unfair. This applies to cmsms, insofar as CMSms requires fopen, and recommends buffering, neither of which are enabled by default on my typical shared host, and which require some unusual configuration to make CMSms work.

My question is not equivalent to "how do I create a database", as creating a database is common to most CMS's, and built into the control panel of every webhost. But CMSms's special requirements are neither.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sat Sep 19, 2009 11:16 pm
by calguy1000
if you want me to be any of "Unfriendly abusive disrespectful unfair unhelpful"
I can do that.

I honestly feel that I haven't done any of that so far, but if you want me to... just say the word, and I'll let loose.

I specialize in abusive and disrespectful.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sat Sep 19, 2009 11:24 pm
by Jeff
One reason he calls your question noise, is because it is stupid and pointless. In the time you wasted posting this question, you could have just copied your php.ini file and put it into the sub-directories (only three directories run code /, /install, and /admin).

Why he didn't just answer your question is to point out to others reading it to THINK before you post.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sat Sep 19, 2009 11:26 pm
by johnywhy
how am i to know only 3 directories run code? there are a lot more than 3 directories containing php files. i considered putting the ini just into the install directory, but i figured that would only trick the installer. but if you say only those 3 dirs need the ini, then that's the answer i needed. thanks. i'm not a php guru nor an advanced web developer-- that's why i wanted to use cms made simple.

just wondering now if the upgrade process to the next version of cmsms will require me to do this again, and if it will continue to be just those same 3 subdirs in future versions.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sat Sep 19, 2009 11:49 pm
by reneh
CMS Made Simple is this =>

http://www.cmsmadesimple.org/about-link/

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sun Sep 20, 2009 12:03 am
by johnywhy
not sure what you are trying to say. but the 'About' page says:

"you definately don't need indepth knowledge of PHP to use CMS Made Simple."

"Is CMS Made Simple really "simple"? Yes it is. "

i realize that, since i'm not using a dedicated host, that CMS Made Simple might be a poor choice for anyone using shared hosting, since the shared hosting environment requires one or two not-so-simple adjustments to make it work.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sun Sep 20, 2009 12:07 am
by Dr.CSS
Interesting that you are on 1and1 and it doesn't work, I've set up numerous sites on them and they all worked out of the box, may want to talk to them again, I ended up moving from them as their servers ended up going slower and slower till it made no sense to use them, switched to hostgator, mucho better...

I had shared hosting and made no adjustments, they just got too slow for me...

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sun Sep 20, 2009 12:16 am
by calguy1000
Under point 3 of the 'About' link that reneh supplied it plainly says:  If you're an experienced web developer

CMSMS does not require extra-special permissions to operate, but it does require an understanding of what you are trying to do.  And it also requires a basic understanding of the systems that you are trying to implement CMSMS under.

We cant, and won't help you with such basic problems as permissions, understanding error messages that are plainly described (alot of people ask what a 'permission denied' message means), creating databases, moving files. Or what 'some-error-message-generated-by-the-system' means.  Those issues, and yours can be easily researched, and explained with simple google searches.

CMSMS IS a simple, and flexible web development environment.  There is lots that you can do with this system. However It is NOT for people that need hand-holding through every step, and it is not for people that have just found that they need something more than front page or dream weaver.   It is also NOT for those people that can't learn to research, learn and answer simple questions for themselves (google is your friend, use it).

To sum it up in one statement:  CMSMS is designed for the experienced web developer, so that he can create a website and deliver it to an end user for routine maintenance of content.

If you are not an experienced web developer... maybe CMSMS is not for you.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sun Sep 20, 2009 12:22 am
by johnywhy
on 1and1 hosting, i had to add the following custom php.ini to fulfill the cmsms requirements and recommendations:

output_buffering = 1
allow_url_fopen = 1
max_execution_time = 60
post_max_size = 10M
upload_max_filesize = 10M

the required fopen was disabled with 1and1 default php settings.

i'm not seeking help with these settings, i'm fine with using cmsms recommended settings. Just letting Dr. CSS know where 1and1.com deviates.

and that 1and1's performance won't be an issue for the site i'm making, since will be relatively simple and low-traffic. but thanks for the hostgator tip.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sun Sep 20, 2009 12:32 am
by johnywhy
i still think my issue, which required putting the php.ini into 3 directories, is not as basic as how to make a database, set permissions, etc. fopen is a slightly atypical requirement.

google cannot tell me which 3 cmsms directories require the custom php.ini. that kind of information i can only get here-- hopefully.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sun Sep 20, 2009 12:38 am
by calguy1000
output_buffering = 1
not sure what that would be requird for, but I can believe it.
allow_url_fopen = 1
that's required so that you can see if there are new versions of CMSMS... this may be changed in the future.
max_execution_time = 60
post_max_size = 10M
upload_max_filesize = 10M
These are all site dependant... depending on the size of the content that you're going to allow people to upload, the quality of link that you're allowing them to upload from, and the amount of data that your predicting people will upload.

Honestly, if you are expecting people to upload 5mb pictures over a dialup line, and put in 64k of text, and have it all done with 60 seconds, youre probably asking too much. AND>>>
This is absolutely NOT a CMSMS problem.

it all comes down to, are you exeperienced at what you are doing? and/or are you willing to research on your own.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sun Sep 20, 2009 12:54 am
by Jeff
i still think my issue, which required putting the php.ini into 3 directories, is not as basic as how to make a database, set permissions, etc.
No, copy and paste is MUCH easier.

You're right googling wouldn't tell you that. But if you have "A basic understanding of HTML and CSS" (a requirement on the 'about' page), when you look at the website in a browser you would have noticed the URL of your browser pointing to three places, /install/index.php, /index.php, and /admin/index.php

As calguy1000 said this isn't the system/forum for holding hands. We are VERY friendly to those who can think for themselves, and look at up problems on your own. But we also think question like "How do I kill an ant with a bazooka?" is a stupid and ridiculous question.

Re: How To Apply Php.ini To Multiple Subdirectories?

Posted: Sun Sep 20, 2009 1:02 am
by johnywhy
i believe that you're incorrect that i would have seen the admin directory in my url. the only directory i noticed in the url is the Install directory, because, as i mentioned, i could not get past the installation screen.