-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on Mobile_Detect.php line 22 #6
Comments
@ezMaverick the host you are using has PHP4 installed, remove all 'public' and 'private' keywords in front of the functions. The class is designed for PHP5. |
no luck. |
Whats on line 22? |
Line 22 is protected $userAgent = null; |
You'd need to remove all 'protected' too. I do think you'd be better moving to PHP 5, but I should point out I'm just a user and not speaking on behalf of mobile_detect :) |
I take down 'public', 'private' and 'protected' and still showing that error. Well PHP 5 here you go... |
|
I modified this to work in PHP4 (at least the main functionality tested.) I'm new to git/github but the change can be found in my public repository. |
Your and my code work without errors, but NOT detect mobile or phone browsers :( |
What functions specifically aren't working? It seems to detect mobile/phones for me but perhaps I am not understanding. |
In my server with php4 isTablet & isMobile detection not work and not works all "Custom detection methods" |
@alva2409 go to http://is.gd/mobiletest with your phone. Send me feedback if it's not detected. From my tests everything works fine (on PHP5). |
"on PHP5" - it's work FINE! I can't use PHP5 in my main server because my clients have special system. In secondary server with PHP5 your code work. In last topics we speak about changing code to PHP4. It's work without errors, but not detect any mobile or tablet devices. |
@alva2409 Odd, those functions seem to work fine on the PHP4 server I am running with my PHP4 code. They are detecting my Note2 and various iPhones, iPads. I don't have access to any other Android devices so it is something I can't test :( |
I'm getting an error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in Mobile_Detect.php on line 22
It shows only on my ixwebhosting server. I tested it on hostgator and there is no problem at all.
Any idea?
The text was updated successfully, but these errors were encountered: