Welcome to Geeklog, Anonymous Friday, December 27 2024 @ 09:21 pm EST

Geeklog Forums

Problems with HTTP_Referer Plugin and Gallery Random Photo Block v1.2


erZwo

Anonymous
Hi!

Today i ugraded PHP 4.3.0 to version 4.3.3 and i applied the two security patches at my geeklog site. Since then i imagine that i can't edit the plugins at my admin page anymore.

If i want to edit a plugin the admin page only refreshs. Additional the installed HTTP_Referer Plugin doesn't work anymore, i found that mesage in the apache error.log:

[Sat Oct 18 15:51:54 2003] [error] PHP Warning: Wrong parameter count for str_replace() in /Library/WebServer/geeklog/plugins/http_referer/functions.inc on line 208

Thanks for your help in advance,

Miklas
 Quote

erZwo

Anonymous
brainy
Ok, i figured that out by myself and Dirk from geeklog.info ... Big Grin

About the new PHP version and the new php.ini file "register_globals On" were deactivated and the default is Off now. After setting it On and restarting the apache webserver i am able to edit and deactivate the Plugins again.

But the HTTP_Referer Plugin still doesn't work:

[Sat Oct 18 17:47:18 2003] [error] PHP Warning: Wrong parameter count for str_replace() in /Library/WebServer/geeklog/plugins/http_referer/functions.inc on line 208

line 208 of http_referer/functions.inc on says:

urlwww = str_replace( 'www.', '', $_CONF['site_url'], 1 );

Could you help me point that out, please? Additionally i'm getting that error still:

[Sat Oct 18 17:47:49 2003] [error] PHP Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/lib-common.php(914) : eval()'d code:143) in /Library/WebServer/Documents/gallery/util.php on line 1937

It's about the new Gallery Random Photo Block v1.2, which i installed with the new Gallery/Geeklog Integration for Gallery 1.4-pl1 and Geeklog 1.3.8. at my geeklog site.

Thanks in advance,

Miklas
 Quote

Status: offline

jbpaul17

Forum User
Chatty
Registered: 05/14/04
Posts: 49
Location:New York City
confused
I'm getting the same error on my site (www.jeffandcrystal.com):
Warning: Wrong parameter count for str_replace() in /home/*******/public_html/plugins/http_referer/functions.inc on line 208.
I'm running the most current version of GL and PHP version 4.3.8.

Any thoughts?
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
A little perusal of the PHP manual shows that the parameter count is indeed wrong. str_replace has four parameters and indeed looks like a call to preg_replace. Either remove the final 1 parameter or replace str_replace with preg_replace.

TomW
 Quote

Status: offline

jbpaul17

Forum User
Chatty
Registered: 05/14/04
Posts: 49
Location:New York City
curious
Ok, so I removed the 1 from the str_replace function and now the HTTP_REFERRER plugin works correctly. (Thanks TomW!)

Now that it works, I notice that it logs http referrals including those from my site (www.jeffandcrystal.com). Does anyone know how to make the HTTP_REFERRER plugin ingnore http referrals from your own site?

Any information would be greatly appreciated, thanks!
 Quote

All times are EST. The time is now 09:21 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content