views:

75

answers:

2

I'm developing a web site which uses wp-cumulus on its home

http://www.roytanck.com/2008/03/06/wordpress-plugin-wp-cumulus-flash-based-tag-cloud/

it's a flash component to show a nice cloud tag.

in order to use it I issue:

<script type="text/javascript">
[...]
flashvars.tagcloud = "<tags><a href='/tag.php?tag=Marinetti'>Marinetti</a><a href='/tag.php?tag=lang'>Lang</a></tags>";
[...]
</script>

and at the home page (index.php) I issue a redirect like

<?
header( 'Location: http://ludion.com.ar/home.php' );
exit;
?> 

the problem is that when redirected php automatically adds an &PHPSESSIONID=xxxx to every link, yes, included the javascript stuff!!!

resulting:

<script type="text/javascript">
[...]
flashvars.tagcloud = "<tags><a href='/tag.php?tag=Marinetti&PHPSESSID=75f82a44003ee8c421dda3db52ad1f93'>Marinetti</a><a href='/tag.php?tag=lang&PHPSESSID=75f82a44003ee8c421dda3db52ad1f93'>Lang</a></tags>";
[...]
</script>

and the componente doesn't seem to like ampersand, so it just doesn't work...

how can I prevent php from adding that stuff?

I've already tried with:

ini_set( 'session.use_cookies', true );
ini_set( 'session.use_trans_sid', false );

in index.php, but it didn't work

I also tried creating and .htaccess file at the root with the following content:

php_value session.use_only_cookies 1 php_value session.use_trans_sid 0

and with

php_flag session.use_only_cookies 1 php_flag session.use_trans_sid 0

but the sites just hangs-up, with the following errors in the log

[Mon Jan 11 12:01:13 2010] [alert] [client 201.250.119.217] /www/docs/ludion.com.ar/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration ...

[Mon Jan 11 12:11:27 2010] [alert] [client 201.250.119.217] /www/docs/ludion.com.ar/public_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

any idea???

A: 

so far, the only woraround I could find is the following:

when I generate the js code, I split the href, so that php doesn't recognize it as an url, like this:

instead of

flashvars.tagcloud = "<tags><a href='/tag.php?tag=Marinetti'>Marinetti</a><a href='/tag.php?tag=lang'>Lang</a></tags>";

I issue

flashvars.tagcloud = "<tags><a " + "href='/tag.php?tag=Marinetti'>Marinetti</a><a " + "href='/tag.php?tag=lang'>Lang</a></tags>";

very nasty in deed, but it works...

any the real solution would be to tell php to stop messing around with my urls...

opensas
+2  A: 

The session.use_trans_sid you mention is the appropriate one.

The Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration error message suggests that PHP is running as CGI rather than Apache module. In that case, you cannot configure PHP through Apache configuration files.

Normally, CGI setups offer custom php.ini files for each customer where you can change whatever PHP setting you're allowed to. Check your hosting service documentation for the details.

Of course, if you are the server admin you can always edit the main php.ini file.

Last but not least, don't forget to run phpinfo() to check whether the settings were actually changed.

Álvaro G. Vicario