WYSIWYG Editor(en) gehen nur einmal [SOLVED]

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

if you use the .htaccess it should turn off register_globals

if not, then rename _.htaccess to .htaccess
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

check what I have written in this post.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Karla
Posts: 223
Joined: Tue 26. Oct 2004, 11:56

Post 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:
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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?
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply