Questions tagged [php-safe-mode]
20 questions
42
votes
4 answers
Can't write to /tmp with php, despite 777 permissions and no open_basedir value
I'm trying to write a file to my /tmp directory (on an apache server) with the php fopen function, but it fails:

Anders Sundnes Løvlie
- 826
- 2
- 8
- 11
5
votes
5 answers
php function doesn't return a value
I have a class which works fine with php 5.3 (XAMPP 1.7.3, windows 7) but doesn't work in my server(php 5.2.17 - Safe mode On):
connection =…

undone
- 7,857
- 4
- 44
- 69
3
votes
3 answers
Setting safe mode to OFF in .htaccess file does not work
I'm on a server with safe mode on.
Now the server allows .htaccess files.
I have one in my public_html folder with settings of Wordpress.
Now in a sub-domain i want to insert an .htaccess file that dsiables safe mode.
i Tried theese:
php_value…

eric.itzhak
- 15,752
- 26
- 89
- 142
2
votes
2 answers
Is there an alternative to php readfile() in safe mode server?
I host my site on a shared hosting, which lately changed the server to safe mode (without even notifying that).
I use a feature that download files from the server, using the readfile() function (I use php).
Now, in safe_mode, this function is no…

Maor Barazany
- 761
- 2
- 11
- 21
2
votes
2 answers
Migrating from PHP 5.4 to PHP 5.6 (CodeIgniter code)
Currently, I'm working with php 5.4, and would like to move to 5.6 and also PHP 7. I'm checking the code hosted on my server and realized that there is CodeIgniter code that might outdated.
@ini_get("safe_mode")
Because from what I have searched,…

Evelyn
- 656
- 7
- 29
2
votes
1 answer
Create a symlink without shell access and in safe mode?
On a shared hosting package running the LAMP stack and PHP, with no shell access and PHP in safe mode (= exec() being disabled), with only FTP access, do I have a chance of creating a symbolic link somehow?
I just checked, I can't even use the…

Pekka
- 442,112
- 142
- 972
- 1,088
2
votes
1 answer
Where to start with Deprecated: Directive 'safe_mode' on line 0 in Apache error logs
We are inundated with the entry:
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive…

DMCoding
- 1,167
- 2
- 15
- 30
1
vote
1 answer
Turning off php4 safe mode - what to consider?
I'm maintaining a website running a highly modified old version of osCommerce. My web host offers several flavours of PHP on a per-domain basis (although I think I recall seeing an option to set the PHP version per-directory). Those are PHP4 safe…

avramov
- 2,119
- 2
- 18
- 41
1
vote
4 answers
What's the difference whether or not to run PHP in safe mode?
Can you list any specific difference that can be perceived?

Gtker
- 2,237
- 9
- 29
- 37
1
vote
1 answer
PHP/cURL script requesting another PHP script and exiting before response
I'd like a browser-initiated PHP script A on Server A to send a cURL request for a PHP resource B located on Server B, but not wait for a reply (it's only supposed to start script B and die). Will script B abort if it notices that the requesting…

suissidle
- 191
- 5
1
vote
0 answers
PHP: Turn off safe mode at runtime
Is there anyway to turn off PHP`s safe mode at runtime?
Its disabled by default but everytime a cronjob or I start a script over ssh it's activated.
I don't know what to change in the php.ini, because all safe_mode entries are already set to…

mercsen
- 692
- 1
- 5
- 21
1
vote
1 answer
PHP session with safe_mode on
I have a custom cms that uses sessions o store some data. The webserver I'm on suddenlt changed turned safe_mode on in PHP. This means I can't use sessions anymore. Is there a workaround for this when putting safe_mode off is no option?

waterschaats
- 994
- 3
- 18
- 32
0
votes
1 answer
PHP safe_mode default value in PLESK 8.4 is ON. WHY?
I am wondering why is the default value of the PHP safe_mode ON in PLESK. I suspect it is a security issue but how exactly is this useful?
p.s. As an inexperienced web-developer I spend some hours wondering why the .php files were downloaded instead…

chosta
- 448
- 10
- 19
0
votes
5 answers
Call Visitors web stat program from PHP
I've been looking into different web statistics programs for my site, and one promising one is Visitors. Unfortunately, it's a C program and I don't know how to call it from the web server. I've tried using PHP's shell_exec, but my web host (NFSN)…

Kyle Cronin
- 77,653
- 43
- 148
- 164
0
votes
3 answers
How to use shell_exec() function in a php domain?
I found the shell_exec() function is disabled in my remote server.
Is there is any other way or tips to execute the shell_exec() function?

sirin k
- 373
- 4
- 14