• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 2.x Branch ‹ General Support (v2.x)
  • Change font size
  • FAQ
  • Register
  • Login

Parse error: syntax error, unexpected T_FUNCTION in auth.php

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
8 posts • Page 1 of 1

Parse error: syntax error, unexpected T_FUNCTION in auth.php

Postby Jake » Wed Oct 24, 2012 10:34 pm

First of all thank you so much for helping me over Twitter, It looks like I'm down to one last error. After downloading "Slim-1.6.7" (beacuse anything 2.0 or higher wont work with PHP 5.2) and getting it in the right place This is the only error I am getting now.

Parse error: syntax error, unexpected T_FUNCTION in "/home/XXXXXXXX/public_html/test/server/routes/auth.php" on line 5

This is line 5 in "auth.php"
"$app->get('/auth', function () use ($app, $req, $res) {"

Any Ideas?
Jake
New member
 
Posts: 5
Joined: Wed Oct 24, 2012 10:04 pm
Top

Re: Parse error: syntax error, unexpected T_FUNCTION in auth

Postby phpfreechat » Wed Oct 24, 2012 10:47 pm

That's another PHP5.3 feature I forgot to remove ... but this one is problematic because the hook system also uses it for working.
I must have a reflexion about how to solve it.

I your pastebin, I'm not sure but I saw PHP5.3 related things, could you try again to switch PHP5.3 ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Re: Parse error: syntax error, unexpected T_FUNCTION in auth

Postby Jake » Wed Oct 24, 2012 10:51 pm

With 5.3 enabled I get this.

"404 Page Not Found
The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.

Visit the Home Page"
Jake
New member
 
Posts: 5
Joined: Wed Oct 24, 2012 10:04 pm
Top

Re: Parse error: syntax error, unexpected T_FUNCTION in auth

Postby Jake » Thu Oct 25, 2012 4:13 am

[Wed Oct 24 19:25:46 2012] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Call to a member function get() on a non-object in /home/USERNAME/public_html/test9/server/routes/auth.php on line 5
[Wed Oct 24 19:25:46 2012] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: app in /home/USERNAME/public_html/test9/server/routes/auth.php on line 5
[Wed Oct 24 19:25:46 2012] [error] [client xxx.xxx.xxx.xxx] PHP Warning: include_once(): Failed opening 'container/users.php' for inclusion (include_path='.:/usr/local/php53/lib/php') in /home/USERNAME/public_html/test9/server/routes/auth.php on line 3
[Wed Oct 24 19:25:46 2012] [error] [client xxx.xxx.xxx.xxx] PHP Warning: include_once(container/users.php): failed to open stream: No such file or directory in /home/USERNAME/public_html/test9/server/routes/auth.php on line 3

Some added error logs form cPanel may help.
Jake
New member
 
Posts: 5
Joined: Wed Oct 24, 2012 10:04 pm
Top

Re: Parse error: syntax error, unexpected T_FUNCTION in auth

Postby phpfreechat » Thu Oct 25, 2012 8:53 am

I think there is a include_path problem.
Do you think I could get a guest ssh or ftp access to your installation on your server ? I could then try to patch things and to report patch in the official source.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Re: Parse error: syntax error, unexpected T_FUNCTION in auth

Postby phpfreechat » Thu Oct 25, 2012 9:31 pm

I think just detected the problem but I don't know how to fix it. The chat try to make PUT request to the serveur and your apache server refuse it as shown by my firebug debug trace:

Request URL:http://furbishop.net/test9/server/channels/xxx/users/3014c31e3d61c98b4fc18818e0be53170ddd512f
Request Method:PUT
Status Code:501 Method Not Implemented

I tried to modify the test9/server/.htaccess and add:
<Limit OPTIONS GET POST PUT DELETE>
Order allow,deny
Allow from all
</Limit>

But these parameters seam to be ignored.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Re: Parse error: syntax error, unexpected T_FUNCTION in auth

Postby phpfreechat » Thu Oct 25, 2012 10:35 pm

Please test pfc-2.0.3, it should work cause I implemented a wrapper around PUT and DELETE http methods.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Re: Parse error: syntax error, unexpected T_FUNCTION in auth

Postby Jake » Thu Oct 25, 2012 10:48 pm

IT WORKS, 2.0.3 fixed it!

Thank you so much Kerphi
Jake
New member
 
Posts: 5
Joined: Wed Oct 24, 2012 10:04 pm
Top


Post a reply
8 posts • Page 1 of 1

Return to General Support (v2.x)

Who is online

Users browsing this forum: No registered users and 0 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub