top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to turn off safe mode in php 5.6.7 [CLOSED]

+3 votes
3,084 views

I'm getting a disparity in results when setting safe_mode in php 5.6.7.

This is what I have set in my php.ini file:

$ grep safe_mode /etc/php.ini | grep -i -v -e gid -e
exec -e allowed -e sql -e protected -e include

safe_mode = Off

Yet when I grep the output of php -i I only see sql_safe_mode:

$ php -i | grep safe_mode
sql.safe_mode => Off => Off

Any ideas on this?

closed with the note: None
posted Apr 14, 2015 by Tarun Singhal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Go to the control panel for the specific domain where you want to turn off safe mode, click on the Websites & Domains tab. At the bottom will be a listing of the domain names, click on an individual name to see it's hosting settings. There should be a checkbox for PHP, and another one for whether or not to use safe mode.

See also: https://manage.grabweb.in/knowledgebase.php?action=displayarticle&id=86

answer Apr 15, 2015 by Vrije Mani Upadhyay
Similar Questions
+2 votes

Is it possible to use PHP 5.2.5 with Apache/2.4.6?

I have an application that was written in WAMP5 using PHP 5.2.5, and I am trying to get the application onto a CentOS server and I can't get it to work with 5.4.16.

Are there any good tutorials on using an older version of PHP with Apache?

+1 vote

Do we have any users of Php say 5.6 on a FreeBSD 10.3 system installed from ports?

If so, can you get in touch with me? I'm trying to install pear and not having much luck, getting an error about a missing peclcmd.php file and a zlib extension that make is complaining about but which is in my php install.

0 votes

Is print thread safe? That is, if I have two threads that each call print, say:

print "spam spam spam" # thread 1
print "eggs eggs eggs" # thread 2

I don't care which line prints first, but I do care if the two lines are mixed in together, something like this:

spam spaeggs eggs m seggspams

Does print perform its own locking to prevent this?

0 votes

It was easy in PHP 5.3 as long as you were building the CLI by itself. In the PHP 5.4 configure script there is a new PHP_BINARIES variable being used instead of setting PHP_SAPI=cli and thus the "#define ENABLE_CHROOT_FUNC 1" is never written to the output file. I have been able to manually enable it by adding the define to the main/php_config.h after running configure. The issue seems to be a line: if test
"program" = "program". This comparison being true is what causes the configure script to add "cli" to the PHP_BINARIES variable instead of setting the PHP_SAPI variable. The other prerequisites (HAVE_CHROOT and ZTS) are all at the required settings. It is only the ENABLE_CHROOT_FUNC which is causing the function to not be compiled into the resulting binary. Any information or explanation would be very helpful.

For the record, I know what the chroot() function does and does not do. I am experimenting with using chroot() to isolate an already running script to a particular subset of the filesystem for file operations.

...