https://www.icyphoenix.com/viewtopic.php?f=35&t=8842
-----------------------------------
fucile
Fri 07 Dec, 2012 07:32

[Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
I have problem

[Icy Phoenix Debug] PHP Notice: in file /includes/functions.php on line 3450: strpos(): Empty delimiter

What's this the problem ?

It happens when a guest appears in the portal


-----------------------------------
mort
Fri 07 Dec, 2012 11:46

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
[quote user="fucile" post="57738"]I have problem

[Icy Phoenix Debug] PHP Notice: in file /includes/functions.php on line 3450: strpos(): Empty delimiter

What's this the problem ?

It happens when a guest appears in the portal[/quote]

I have a problem too!

My car wont start and it's painted red.

I can't tell you the model/version number because it's a secret, but I do have some pictures on my website that could help, but as I haven't posted a link to my website here or in my profile - I don't suppose that there is much you can do to help me with my problem either.

[i]Please put a link to your website in your profile or post the details and a link to your site when you ask a question. ?[/i]


-----------------------------------
fucile
Fri 07 Dec, 2012 14:40

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
You are really nice

[url=http://www.sezionesubacquea.org]Site


-----------------------------------
Informpro
Fri 07 Dec, 2012 18:03

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Hi,

Giving us only your forum link won't help any bit. If you could tell us the version you're using and lines 3445 to 3455 in /includes/functions.php we should probably be able to resolve the problem.


-----------------------------------
fucile
Sat 08 Dec, 2012 07:15

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Sorry

The version is last 2.0.0.86


-----------------------------------
Informpro
Sat 08 Dec, 2012 14:50

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
replace in this file, the line you're getting the error
[code]if (strpos($ip_address, trim($bot_ip)) === 0)[/code]with [code]if ($ip_address && strpos($ip_address, trim($bot_ip)) === 0)[/code]

Apparently the IP fails to be found, but I don't know how MG did that


-----------------------------------
fucile
Sat 08 Dec, 2012 20:44

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Thank you for the tricks

I try 

Thanks

Edit: Even changing the line of code the problem is always the same


-----------------------------------
mort
Sat 08 Dec, 2012 23:17

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
[color=red][size=12][b]"Giving us only your forum link won't help any bit." ?[/b][/size][/color]

I agree - - - -  But at least it's a start.

I could only find this with one out of four browsers.

 [img]http://www.icyphoenix.com/files/images/8840/debug.jpg[/img] 

I also came across this.

Timestamp: 9/12/2012 8:32:40 AM
Warning: Use of Mutation Events is deprecated. Use MutationObserver instead.
Source File: http://www.sezionesubacquea.org/
Line: 0

And I also found out what caused my problem too:

Something to do with the [b]"Pole" MOD[/b] being incompatible with the rest of the system.

[spoiler] [img]http://www.icyphoenix.com/files/images/8840/red_car.jpg[/img] [/spoiler]


-----------------------------------
Informpro
Sun 09 Dec, 2012 00:48

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Probably failing on IP address then.

mort: it can be a start, but when you have a straight PHP error like here it's often better to have the php line ;).


-----------------------------------
mort
Sun 09 Dec, 2012 01:53

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
[quote user="Informpro" post="57746"]mort: it can be a start, but when you have a straight PHP error like here it's often better to have the php line ;) .[/quote]

I agree with that too - But this is another one of those threads where every piece of information has to be sucked out of the person having the problem one piece at a time. And to be quite honest I find it quite tedious where every answer becomes, or contains another question.

Things like.

What version?
What theme?
What Mods?
What browser?
Does it happen with the "Default" theme?
Has any "Other" script/javascript/ajax been added?
Or anything else that may have been self-applied and screwed things up.

I cleaned four different browser cache's of everything to have a look at this site and Chrome was/is the only one that brought up that error. Sometimes as a single line and sometimes as two lines.  :?: 

As for the php fault-line - I've come across problems where the faults actually started further up in the script and not on the "report" line itself.

But then again I'm no expert.


So I think I'll stay out of it all in future. :(


Edit:

So what about trying this - I think I read it right - [b][i]probably didn't[/i][/b] ?

[code linenumbers=false]if (strpos($ip_address) && 0 !==  trim($bot_ip))[/code]

The web is full of this of this problem - - -  [url=https://www.google.com.au/search?q=Strpos%28%29%3A+Empty+Delimiter&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a]Google


-----------------------------------
fucile
Sun 09 Dec, 2012 05:40

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Thanks for everything

I think that will give me a solution Mighty Gorgon


List of platform Icy Phoenix 2.0.0.86 installed on Apache Server Aruba.

Complete package:
Board

Plugin:
Download
Guestbook
activity
Blog
Paypal
kb

With some modification on Template White Pearl

I have made ​​a list of everything that I have installed on my platform and now I'll have to give an explanation of how the line of code 3450 interests:

the Mod
the Template
etc.

When it seems that the line of code fails to encode ip of the bot

I find it difficult to express myself in English because they are not master the language but that does not mean you have to answer to the second answer in an ironic way.

Thanks for everything


-----------------------------------
mort
Sun 09 Dec, 2012 08:10

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
[quote user="fucile" post="57748"]When it seems that the line of code fails to encode ip of the bot[/quote]

fucile, I wasn't trying to sound harsh, but I spent a lot of time cleaning out browsers, testing your site - Reading into the html and scripts to see what, if anything was conflicting with the IP script or throwing up errors.

I spent ages on the web researching why other people/software were having this problem and coming up with anything from incompatible mods to "white-space" trying to be cleaned when there is nothing there to be cleaned.

So sure, it's frustrating to have to keep coming back and asking what you have done or added and to keep trying to nail the problem down.

And unfortunately sometimes it shows through.  :( 

I'm not even sure if that part of the script doesn't need an if(empty(don't process it argument ;)

But I'm sure we will find out soon enough.  :|


-----------------------------------
TopoMotoV3X
Sun 09 Dec, 2012 11:09

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
The 1.3 version adds script decode_ip

[code linenumbers=false]if (strpos(decode_ip($ip_address), trim($bot_ip)) === 0)[/code]

I checked and decode_ip is also active on version 2.


-----------------------------------
Informpro
Sun 09 Dec, 2012 11:48

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Shouldn't be the problem, since the error is that the delimiter is empty.


-----------------------------------
mort
Sun 09 Dec, 2012 14:47

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
I think someone needs to PM MG a link to this thread so that he can put an end to what the problem is and we can all move on.

 :mricy:


-----------------------------------
fucile
Sun 09 Dec, 2012 16:10

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
If you needed, this is account for test.

Username: [color=crimson]test[/color]
Password: [color=crimson]test[/color]

The problem occurs frequently when a visitor visits the site.
When you insert a registered account then the problem disappears
It seems that a field of a spider / bot seems empty.

Thanks in advance


-----------------------------------
mort
Tue 11 Dec, 2012 08:07

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
I had a play with this until I broke it, and the [b]"only"[/b] browser that broke it was Chrome with this error.

 [img]http://www.icyphoenix.com/files/images/8840/chrome1.jpg[/img] 

When I changed this line:

[code linenumbers=false]		if ((strpos($browser, 'Firefox') !== false) || (strpos($browser, 'MSIE') !== false) || (strpos($browser, 'Opera') !== false))[/code]

To: [i](I added Chrome)[/i], even Chrome is back to normal - [b][i](If it ever was normal?)[/i][/b] :(

[code linenumbers=false]		if ((strpos($browser, 'Firefox') !== false) || (strpos($browser, 'MSIE') !== false) || (strpos($browser, 'Chrome') !== false) || (strpos($browser, 'Opera') !== false))[/code]

So fucile, if you want to test this - just find the first line and replace it with the second.

I'm not saying that it is "The" fix, but even today the only browser that is affecting your site for me is Chrome, and this is the best that I can come up with.

Or we'll  just have to wait for MG. ;)


-----------------------------------
fucile
Tue 11 Dec, 2012 18:15

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Thanks I try

One question:

Which line ?  

3450 ?

[color=crimson]Edit:[/color]

This line is 3415 I have changed this line

If you make the test for look my site and my problem.

Thanks in advance


-----------------------------------
mort
Tue 11 Dec, 2012 20:58

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Well my friend it appears that the problem has gone. ;)

I re-rested it with four browsers and there were no problems.

It used to be with Chrome that if I refreshed the page the errors would show before the graphics loaded.

After many, many re-connections and refreshes with Chrome - I think the picture tells the story.  :mrgreen: 

[img]http://www.icyphoenix.com/files/images/8840/fixed.jpg[/img]

PS:
[i]I couldn't give you a line number because the version I tested it with is the "Master Version" from GITHUB - Same problems - Different lines. [/i]

And if you don't have any more problems - I'll post it as a BUG to be looked at.

[b]@MG[/b] In the Master Version it's functions.php - Line 3510:


-----------------------------------
Informpro
Tue 11 Dec, 2012 22:32

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
From your change I believe chrome was considered a bot navigator ?


-----------------------------------
mort
Tue 11 Dec, 2012 22:56

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
[quote user="Informpro" post="57759"]From your change I believe chrome was considered a bot navigator ?[/quote]

It probably is, because who knows what it's really doing or what information it's collecting for Google to use?


-----------------------------------
fucile
Wed 12 Dec, 2012 04:40

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Thank you for everything

The problem seems to finally disappeared.

MG I would wait for a definitive advice

@Informpro and Mort thank you guys and sorry because I have wasted your time free.




 :mricy: and sorry for my bad english


-----------------------------------
mort
Wed 12 Dec, 2012 06:20

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
[quote user="fucile" post="57764"]And sorry because I have wasted your time free.[/quote]

There's nothing to apologise for because we all learned something from it. Took a while, but we got there eventually. ;)


-----------------------------------
Mighty Gorgon
Fri 14 Dec, 2012 09:27

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
I'm still a bit busy... but I may have a look hopefully tomorrow and provide a feedback.


-----------------------------------
fucile
Wed 19 Dec, 2012 07:29

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Updated:

I created a query to find out why it kept telling me that the boundary was empty.

I deleted the table ip_bots (DROP TABLE ip_bots)
I recreated the table (CREATE TABLE ip_bots)
I entered default values ​​at installation ( ALTER TABLE etc. )
All with a single query

No more errors


-----------------------------------
mort
Wed 19 Dec, 2012 22:33

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
Fucile,

Are you saying that you did that and put the functions.php back to the original script?

Because knowing that for sure would help.  :mricy:


-----------------------------------
Mighty Gorgon
Sat 29 Dec, 2012 11:00

Re: [Icy Phoenix Debug] PHP Notice: In File /includes/functions.php On Line 3450: Strpos(): Empty Delimiter
-----------------------------------
I think the bug was related to a wrong BOT insertion through ACP.

Anyway the file should be patched to prevent wrong user data input.

I have edited it like this:
[codeblock]		if (!empty($ip_address) && !empty($active_bots[$i]['bot_ip']))
		{
			foreach (explode(',', $active_bots[$i]['bot_ip']) as $bot_ip)
			{
				$bot_ip = trim($bot_ip);
				if (!empty($bot_ip) && (strpos($ip_address, $bot_ip) === 0))
				{
					$bot_name = (!empty($active_bots[$i]['bot_color']) ? $active_bots[$i]['bot_color'] : ('<b style="color:' . $bot_color . '">' . $active_bots[$i]['bot_name'] . '</b>'));
					if (!empty($check_inactive) && ($active_bots[$i]['bot_active'] == 0))
					{
						if (!defined('STATUS_503')) define('STATUS_503', true);
						message_die(GENERAL_ERROR, $lang['Not_Authorized']);
					}
					return array('name' => $bot_name, 'id' => $active_bots[$i]['bot_id']);
				}
			}
		}[/codeblock]


