PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Suhosin und class_xml.php + vbProject


Wildthinks
31.03.2008, 22:27
Hi,

1. ich habe das halbe Board gelesen und die Einstellungen für die ini-Datei von Suhosin hier aus dem Forum übernommen.
2. Falls ich was überlesen habe... sorry

Problem:
Meldung Suhosin
script tried to increase memory_limit to 4294967295 bytes which is above the allowed value (attacker 'xx.xxx.xx.xx', file '...includes/class_xml.php


Also ändern wir die Zeile in der Class_xml.php
von @ini_set('memory_limit', -1);
zu @ini_set('memory_limit', 256 );

dann ist zwar suhosin still, aber beim Aufruf des ACP
Allowed memory size of 262144 bytes exhausted (tried to allocate 72 bytes) in .../includes/class_bitfield_builder.php on line 408

Hier noch meine Suhosin- Config:
; configuration for php suhosin module
extension=suhosin.so

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
; the following values are the internal default settings and set implicit
; feel free to modify to your needs

[suhosin]
; Logging Configuration
suhosin.log.syslog.facility = 9
suhosin.log.syslog.priority = 6
suhosin.log.script = 0
suhosin.log.phpscript = 0
suhosin.log.script.name =
suhosin.log.phpscript.name =
suhosin.log.use-x-forwarded-for = off
suhosin.log.file = 511
suhosin.log.file.name = ....suhosin.log

; Executor Options
;suhosin.executor.max_depth = 0
;suhosin.executor.include.max_traversal = 0
;suhosin.executor.include.whitelist =
;suhosin.executor.include.blacklist =
;suhosin.executor.func.whitelist =
;suhosin.executor.func.blacklist =
;suhosin.executor.eval.whitelist =
;suhosin.executor.eval.blacklist =
;suhosin.executor.disable_emodifier = off
;suhosin.executor.allow_symlink = off

; Misc Options
suhosin.simulation = on
;suhosin.apc_bug_workaround = off
;suhosin.sql.bailout_on_error = off
;suhosin.sql.user_prefix =
;suhosin.sql.user_postfix =
;suhosin.multiheader = off
;suhosin.mail.protect = 0
;suhosin.memory_limit = 0

; Transparent Encryption Options
;suhosin.session.encrypt = on
;suhosin.session.cryptkey =
;suhosin.session.cryptua = on
;suhosin.session.cryptdocroot = on
;suhosin.session.cryptraddr = 0
;suhosin.session.checkraddr = 0
;suhosin.cookie.encrypt = on
;suhosin.cookie.cryptkey =
;suhosin.cookie.cryptua = on
;suhosin.cookie.cryptdocroot = on
;suhosin.cookie.cryptraddr = 0
;suhosin.cookie.checkraddr = 0
;suhosin.cookie.cryptlist =
;suhosin.cookie.plainlist =

; Filtering Options
;suhosin.filter.action =
;suhosin.cookie.max_array_depth = 100
;suhosin.cookie.max_array_index_length = 64
;suhosin.cookie.max_name_length = 64
;suhosin.cookie.max_totalname_length = 256
;suhosin.cookie.max_value_length = 10000
;suhosin.cookie.max_vars = 100
;suhosin.cookie.disallow_nul = on
;suhosin.get.max_array_depth = 50
;suhosin.get.max_array_index_length = 64
;suhosin.get.max_name_length = 64
;suhosin.get.max_totalname_length = 256
;suhosin.get.max_value_length = 512
suhosin.get.max_vars = 2048
;suhosin.get.disallow_nul = on
suhosin.post.max_array_depth = 500
;suhosin.post.max_array_index_length = 64
;suhosin.post.max_name_length = 64
;suhosin.post.max_totalname_length = 256
;suhosin.post.max_value_length = 65000
suhosin.post.max_vars = 2048
;suhosin.post.disallow_nul = on
suhosin.request.max_array_depth = 500
;suhosin.request.max_array_index_length = 64
;suhosin.request.max_totalname_length = 256
;suhosin.request.max_value_length = 65000
suhosin.request.max_vars = 2048
;suhosin.request.max_varname_length = 100
;suhosin.request.disallow_nul = on
;suhosin.upload.max_uploads = 25
;suhosin.upload.disallow_elf = on
;suhosin.upload.disallow_binary = off
;suhosin.upload.remove_binary = off
;suhosin.upload.verification_script =
;suhosin.session.max_id_length = 128

;suhosin.simulation="On"
;suhosin.apc_bug_workaround = Off
;suhosin.multiheader = Off
;suhosin.mail.protect = 1
;suhosin.request.max_vars="500"
;suhosin.get.max_vars="500"
;suhosin.post.max_vars="500"



Mit der Bitte um Abhilfe... die Kiste hat genügend Power und RAM.

Ich frag mich natürlich ob man das so programmieren muss, dass der maximale Speicher angefordert wird....

Ich brauche bitte eine Lösung für das Problem.

Die ganze Suppe kocht auch beim vbProject über, auch hier wird in der Suchfunktion der max. Speicher verlangt:
/projectsearch.php', line 89)

Das könnt Ihr doch echt besser... wie gesagt - bitte konkrete Hilfe.
Danke
Tom

StGaensler
31.03.2008, 23:27
Hallo,

den wert, den du bei ini_set() angibst, sind Kilobyte, und da sind 256 deutlich zu wenig, üblicherweise steht der auf 16 MiB, besser noch auf 32 MiB. Kommentiere die Zeile einfach aus bzw. lösche sie, wenn dich die Fehlermeldung stört.

Viele Grüße,
Stefan

PS: Es wird nicht der in der Fehlermeldung benannte speicher angefordert, sondern das memory_limit wird so erhöht, dass er angefordert werden könnte - am effektiven Speicherverbrauch des Scripts ändert sich durch diese Zeile nichts.

Wildthinks
01.04.2008, 08:30
Danke - das Thema habe ich damit erledigt und jetzt gehts ans vbseo.
tom