Hi,
just installed Dolphin 7. But i get now every minute a Email of the Cornjob which says :
<font color="red">safe_mode is On, disable it</font> <br /> Please go to the <br /> <a href="http://www.boonex.com/trac/dolphin/wiki/GenDolTShooter">Dolphin Troubleshooter</a> <br /> and solve the problem.
Well...i turned safe_mode in my hosting admin panel for the whole domain off. I also put this text into the .htacces in the dolphin directory:
php_flag safe_mode Off
php_flag magic_quotes_gpc On php_value upload_max_filesize 300M php_value post_max_size 300M php_value max_input_time 3000 php_value max_execution_time 3000 php_value memory_limit 128M php_value short_open_tag On
Options -MultiViews
<IfModule mod_php4.c> php_flag register_globals Off </IfModule> <IfModule mod_php5.c> php_flag allow_url_include Off php_flag register_globals Off
</IfModule>
<IfModule mod_rewrite.c> RewriteEngine on
...also tried to put the php_flag safe_mode Off between the IfModule brackets.
Another try was to put a php.ini into the main Dolphin directory which says that safe_mode is Off. I started every time the Apache Server again.
But i get this email again and again....
Do i have to turn the safe_mode globally off ?? But then it will react to all my domains ? Is there any other way to do this ? Thanks for help.
|
Hi
You can try an easy solution that may work for you that is to remove the local/ from your cron command.
i.e
Change:
cd /home/yoursite/public_html/periodic; /usr/local/bin/php -q cron.php
To:
cd /home/yoursite/public_html/periodic; /usr/bin/php -q cron.php
Or:
/usr/bin/php -q /home/yoursite/public_html/periodic/cron.php
This should fix it as local/ may not be needed.
Regards
Dave..
|
For some hosting setups the php.ini file used by your website is not the same as the one used by cron jobs. You have no control over that one.
Contact your hosting provider.
https://www.deanbassett.com |
Hi
You can try an easy solution that may work for you that is to remove the local/ from your cron command.
i.e
Change:
cd /home/yoursite/public_html/periodic; /usr/local/bin/php -q cron.php
To:
cd /home/yoursite/public_html/periodic; /usr/bin/php -q cron.php
Or:
/usr/bin/php -q /home/yoursite/public_html/periodic/cron.php
This should fix it as local/ may not be needed.
Regards
Dave..
Hi,
thx for reply....but my Cron is already running without the "local" in it...and it still doesn't work.
For some hosting setups the php.ini file used by your website is not
the same as the one used by cron jobs. You have no control over that
one.
Contact your hosting provider.
...well is there another php.ini which i can't see ?? I have a server and full control to it, also to php 5...so i am able to see and edit all important global php.ini's.
I am not able to solve this one. ...how to tell my Cronjob that safemode is already off....the question is where does the Cron take this information from ???
Regards
Luke
|
try placing a copy of php.ini in your periodic folder |
You did not say you had a dedicated server.
In that case don't bother with over riding php settings in the .htaccess file.
You can change all your settings directly in the servers main phi.ini file. For most servers that is located in /etc
But they can be located in a sub directory in /etc also. Common on ubuntu. like /etc/php5/apache2
Where it is for your specific OS is something you will have to get from a support forum for your OS.
You can also run find / -name php.ini from a shell and it will show you where all the php.ini files are if there are more then one.
https://www.deanbassett.com |
You did not say you had a dedicated server.
In that case don't bother with over riding php settings in the .htaccess file.
You can change all your settings directly in the servers main phi.ini file. For most servers that is located in /etc
But they can be located in a sub directory in /etc also. Common on ubuntu. like /etc/php5/apache2
Where it is for your specific OS is something you will have to get from a support forum for your OS.
You can also run find / -name php.ini from a shell and it will show you where all the php.ini files are if there are more then one.
Hi,
thx for that...and sry, yes I have a dedicated server. That was what i was thinking, but my question is if i change something in etc/php5/apache2 for example won't it take effect on all of my websites on that server ?? Yes, or ? Why can't the Cronjob "read" the php.ini in the Dolphin directory which says that safe_mode is Off ?
Does someone know which php.ini a Cronjob is using for reference ?
try placing a copy of php.ini in your periodic folder
thx....will try that.
Regard
|
Ok, yes it will affect all sites.
As for placing a php.ini file in the directory, that may or may not work depending on the server. If php is running as an apache module, it most likely will not work.
But you can also try this.
Create a different php.ini file with a different name and add the -c peram to your command line with a path to the custom php.ini file like so.
/usr/bin/php -q -c /custom/directory/custom-file.ini /home/blabla/public_html/periodic/cron.php
https://www.deanbassett.com |
Ok, yes it will affect all sites.
As for placing a php.ini file in the directory, that may or may not work depending on the server. If php is running as an apache module, it most likely will not work.
But you can also try this.
Create a different php.ini file with a different name and add the -c peram to your command line with a path to the custom php.ini file like so.
/usr/bin/php -q -c /custom/directory/custom-file.ini /home/blabla/public_html/periodic/cron.php
Hi,
thx for that...the custom php.ini...what's its content ? The same like the php.ini in the etc/php5/... directory ? Or just an empty file which will copy the content of the "real" one ?
Regards
|
Ok, yes it will affect all sites.
As for placing a php.ini file in the directory, that may or may not work depending on the server. If php is running as an apache module, it most likely will not work.
But you can also try this.
Create a different php.ini file with a different name and add the -c peram to your command line with a path to the custom php.ini file like so.
/usr/bin/php -q -c /custom/directory/custom-file.ini /home/blabla/public_html/periodic/cron.php
Hi,
thx for that...the custom php.ini...what's its content ? The same like the php.ini in the etc/php5/... directory ? Or just an empty file which will copy the content of the "real" one ?
Regard
the copy brings in all variables and constants, from the home ini if you would like to call it that, and then any variances that are on the local ini are processed in conjunction with the root ini procedures.
could be wrong, matter of fact it is 2010, and i think i have not been wrong YET. wooohooooo
how long can i say that one (hello)
Regards, DosDawg
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
And another error was also this here :
At first the domain was running as FastCGI, but at the end of my
installation of Dolphin 7, after the "Change permission of /inc folder
step", i got a strange error,...telling me that safe_mode is on, php is
not version 5.2 (I have 5.2.11) and some more things...but i got there
already the php.ini in the main directory. Well it looks like this:
register_globals is On (warning, you should have this param in Off state, or your site will unsafe)';
$aErrors[] = (ini_get('safe_mode') == 0) ? '' : 'safe_mode is On, disable it';
//$aErrors[] = (ini_get('allow_url_fopen') == 0) ? 'Off (warning,
better keep this parameter in On to able register Dolphin' : '';
$aErrors[] = (((int)phpversion()) < 4) ? 'PHP version too old, update server please' : '';
$aErrors[] = (! extension_loaded( 'mbstring')) ? 'mbstring extension not installed. Warning! Dolphin cannot work without mbstring extension.' : '';
if (version_compare(phpversion(), "5.2", ">") == 1) {
$aErrors[] = (ini_get('allow_url_include') == 0) ? '' : 'allow_url_include is On (warning, you should have this param in Off state, or your site will unsafe)';
};
$aErrors[] = (get_magic_quotes_gpc()) ? '' : 'get_magic_quotes_gpc is Off, enable it';
if (((int)phpversion()) >= 5) { //PHP v5
$aErrors[] = (class_exists('XsltProcessor')) ? '' : 'XsltProcessor is Off, you should install XsltProcessor';
} else { //PHP v4
$aErrors[] = (function_exists('domxml_xslt_stylesheet_file')) ? '' : 'XsltProcessor is Off, you should install XsltProcessor';
$aErrors[] = (function_exists('xslt_create')) ? '' : 'XsltProcessor is Off, you should install XsltProcessor';
}
$aErrors = array_diff($aErrors, array('')); //delete empty
if (count($aErrors)) {
$sErrors = implode(" ", $aErrors);
echo << Please go to the Dolphin Troubleshooter and solve the problem.
EOF;
exit;
}
}
//check correct hostname
$aUrl = parse_url( $site['url'] );
if( isset($_SERVER['HTTP_HOST']) and $_SERVER['HTTP_HOST'] != $aUrl['host'] and $_SERVER['HTTP_HOST'] != $aUrl['host'] . ':80' )
{
header( "Location:http://{$aUrl['host']}{$_SERVER['REQUEST_URI']}" );
exit;
}
// check if install folder exists
if ( !defined ('BX_SKIP_INSTALL_CHECK') && file_exists( $dir['root'] . 'install' ) )
{
$ret = <<
Please, remove INSTALL directory from your server and reload this page to activate your community site.
I didn't quite manage it to solve that
problem under FastCGi and switched to "php running as Apache module".
Is there also a solution under FastCGI to get things running? As i
said, i copied a php.ini into the main directory with all settings as
they should be...but installation process gave me that error page. :(
Regards
|
Finally....PROBLEM SOLVED !!!!
At first thx to all here who gave me very good ideas how to reach the "goal".
And here the solution....
There are 3 php.ini files in the /etc folder
etc/php5/fastcgi/php.ini
etc/php5/cli/php.ini
etc/php5/apache2/php.ini
Well, as I already said i turned safe_mode in cpanel off, and I also places a php.ini in the main dolphin folder. But, nothing did work out,...my CronJob always told me that safe_mode is On !! I didn't want to turn it off in the etc/php5/apache2/ folder, because then all of my domains would have the same setting. But after a loooong afternoon i thought i give it a try and changed it globally. But i got no reaction...safe_mode still on !! Hmmmmm...and then I started to check the other php.ini's...and turned safe_mode On and Off....and guess what....the CronJob didn't use /apache2/ ...it used the /cli/ folder with its php.ini. (Command Line). After changing safe_mode into Off in /cli/ all worked...i got no error mail from CronJob.
But it bothered me still...because now every domain has the same setting in the /cli/.
So now the question was....How to tell the CronJob that it has to use the /cli/ folder, but telling him that safe_mode is off just for 1 domain ??
The answer is simple...
# php --help|grep -- -d -d foo[=bar] Define INI entry foo with value 'bar'
That means...inserted into the CronJob:
cd /srv/www/vhosts/domain/httpdocs/directory; /usr/bin/php -q -d safe_mode=Off cron.php
Hope this one helps out everyone with some CronJob errors or similar ones.
Regard
|