Page 2 of 2

Posted: Fri 21. Jan 2005, 23:19
by Oliver Georgi
wrong wrong wrong - sorry. Don't fix it this way.

There is no WYSIWYG editor 4. -> 0 / 1 / 2 / 3

Everything is working fine - without changes ;-)

Sounds like a Session problem.

Oliver

Posted: Sat 22. Jan 2005, 12:15
by pico
to Oliver

the '4' was just an typing Error from me in my posting :x in the original Script there was a '1'

maybe you're right, but if this is only a "Session Problem" based by my Provider (1und1), it is a Fact for me and others, that it works with the shown modifications. :?: :idea:

btw - you have done a great work - go on

Posted: Sat 22. Jan 2005, 13:22
by Oliver Georgi
I have thought about it again - I think I know your problem: register_globals = On!!!

That's why the $_SESSION["wysiwyg_editor"] is transformed into an array. Because with register_globals = On $wysiwyg_editor (Array) is the same as $_SESSION['wysiwyg_editor'] (INT).

I think all you have to do is set register_globals = Off (always recommend) or rename $_SESSION["wysiwyg_editor"] to something like $_SESSION["default_wysiwyg_editor"].

Oliver

Posted: Sat 22. Jan 2005, 15:59
by frold
if you use the .htaccess it should turn off register_globals

if not, then rename _.htaccess to .htaccess

Posted: Sat 22. Jan 2005, 18:14
by pico
I'm a little bit confused ?

my .htaccess is here

Code: Select all

php_flag magic_quotes_gpc Off
php_flag register_globals Off

RewriteEngine On

RewriteBase /
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ /index.php?id=$1.$2.$3.$4.$5.$6
RewriteRule ^(.+)\.phtml$ /index.php?$1 
but when I take a look with phpinfo - there is register_globals = On

Posted: Sat 22. Jan 2005, 18:36
by Oliver Georgi
CGI (1&1?)

Seems that ini_set is not allowed. Check phpinfo if it says that ini_set is forbidden. Normally register_globals = OFF is automatically set by phpwcms in file phpwcms.php (line 23)

Code: Select all

if(ini_get('register_globals') && function_exists('ini_set')) ini_set('register_globals', '0');
Oliver

Posted: Sun 23. Jan 2005, 12:07
by pico
what do you mean with this ?
CGI (1&1?)
if you mean that my Provider 1und1.com uses the CGI-Version of PHP then you're right.

My phpwcms.php Line23 looks like this

Code: Select all

if(ini_get('register_globals') && function_exists('ini_set')) ini_set('register_globals', '0');
but today - after I worked yesterday with the .htaccess File - my Page shows "Error 500 - interner Serverfehler Das angegebene Skript konnte nicht fehlerfrei ausgeführt werden!"

I've tried to find some Information about this and I think that my Provider has made an update of Apache and Php and now they don't allow this directives in htaccess anymore :evil:



if I comment the php_flag directives the Site is working - but I'm back at my WYSIWYG-Problem

Posted: Sun 23. Jan 2005, 12:19
by Oliver Georgi
check what I have written in this post.

Oliver

Posted: Sun 23. Jan 2005, 17:23
by Karla
If your server runs PHP as a CGI, you could try to create a file named "php.ini" and place it in the desired base directory. Inside that file, you write "register_globals=Off". Also edit .htaccess, and remove (comment out) those directives that cause error 500, and then ~maybe~ it will work :wink:

Posted: Sun 23. Jan 2005, 18:33
by Oliver Georgi
Check FAQ here:
http://faq.1und1.de/hosting/scripte_dat ... hp/17.html

But insted of adding ZendOptimizer settings to php.ini add

Code: Select all

register_globals = off
to that file.

Place it in root of phpwcms and also inside of include/inc_act. Don't add anything to .htaccess that should disable register_globals. Try file with

Code: Select all

<?php
phpinfo();
?>
in same folder where php.ini is located. Check local value.

(I don't know if this is correct)

Oliver

Posted: Mon 24. Jan 2005, 09:48
by pico
Hi

I wrote now a php.ini like you suggested to me and when I call phpinfo from my Root Folder it shows me as Local - and Master Value register_globals Off

but when I do phpinfo from the Backend-Admin it shows register_globals = on

is this right ? is this enough for the correct Funktion or must I put the php.ini in all other Folders too?

Posted: Mon 24. Jan 2005, 10:04
by Oliver Georgi
this is OK - as decribed in the link I have sent - the custom php.ini has to be placed in ANY subfolder too. And phpwcms' backend phpinfo() is located in "include/inc_act". This isn't neccessary for include php files.

Oliver