New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overwriting of php's default settings by Ossn not working on some servers #965
Comments
i agree, we need to generate php.ini as we generate .htaccess upon installation. |
Could you please provide sample valid php.ini file and .htaccess file for OSSN |
I don't understand your intention, jimmydmehta. |
Thanks for the reply. (1) MOD_REWRITE REQUIRED (2) CONFIGURATION DIRECTORY IS NOT WRITEABLE I am installing and using the 1st time OSSN and PHP and struggling in completing the setup since 1 week to overcome above 2 errors. I think once these error gets resolved, the .htaccess file will be automatically generated. please help Just for the info., I have read almost all the related posts/articles for both the above issues but still facing the same issue. |
Yes, your missing something. And for future issues: Please start your own thread for your own issues and don't jump into an already existing thread created by someone else - even more if you have a completely different problem. |
@jimmydmehta make sure your webserver can resolve whatever hostname you are accessing the installer from. The curl statement that tests the rewrite uses that hostname. I was forcing the hostname in my local hosts file to run the install on the server and getting the same error as you. |
Honestly, I'm not really happy with the change made to Ossn 5.1 because it'll prevent a lot of people from at least trying out Ossn. No question, that apachehandler is the more versatile way to configure php settings via .htaccess. But that doesn't mean that cgi-fcgi or fpm-fcgi won't work at all. The configuration is different, yes. And most of the times it would need consulting the provider and ask which way things can be accomplished. Some may have a cpanel configurator, others may allow to write your own php.ini file. |
The current handling is based on the assumption that PHP is running as an apache module which is not true in all cases.
In other words: all lines in the .htaccess section "" will be IGNORED, if php is NOT running as a module but CGI/Fast CGI mode
Or to put it this way:
if(PHP_SAPI != 'apache2handler') { echo 'we cannot make use of current .htaccess php settings'; }
As a result users may run into problems when uploading larger images for example if the server's default php values are too small.
And that's why we need an additional way of setting up Ossn's php values reliably. One working way I tried yesterday could be to make the installer create a php.ini file in the root of Ossn, and add the lines
<IfModule mod_suphp.c>
suPHP_ConfigPath /INSTALLATION_PATH_OF_OSSN
<-- no trailing slash here!</IfModule>
<Files php.ini>
order allow,deny
deny from all
</Files>
at the bottom of .htaccess
The text was updated successfully, but these errors were encountered: