Re: MyApp\Chat gone missing in "Hello World" app

1,029 views
Skip to first unread message

cboden

unread,
Apr 12, 2013, 10:15:30 PM4/12/13
to ratch...@googlegroups.com, premie...@gmail.com
You should never manually modify anything inside the vendor folder (including adding files), that is reserved for composer to manage.

You should be putting Chat.php in your own src folder and subclass with your own namespace. 

Cheers.

On Friday, 12 April 2013 11:20:17 UTC-4, premie...@gmail.com wrote:
Hi. Just trying the "Hello World" project as an intro to Ratchet / Websockets as per http://socketo.me/docs/hello-world

Running Wampserver on W7 - if that makes any difference (not sure at this stage!).

I think this is a directory issue.

When I execute php bin/chat-server.php the following fatal error is returned: PHP Fatal Error: Class 'MyApp\Chat' not found in...

chat-server.php is saved in C:/Users/MyName/bin/

the vendor package is located in C:/Users/MyName/

Chat.php is saved in C:/Users/MyName/vendor/cboden/ratchet/src/MyApp/

Have I missed something...? (obviously I have)

Kévin Machado

unread,
May 8, 2013, 7:11:53 PM5/8/13
to ratch...@googlegroups.com
It's working ! Thx a lot ;)

Le mercredi 8 mai 2013, a écrit :
try this: php ~/ratchet/composer.phar update

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "Ratchet" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ratchet-php/Iew_BAE_KwY/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ratchet-php...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

comanteo...@gmail.com

unread,
Nov 12, 2013, 5:34:01 AM11/12/13
to ratch...@googlegroups.com, premie...@gmail.com, panda...@gmail.com
Hy there

When i try this the terminal says:

Could not open input file: /home/intranet/ratchet/composer.phar

The initial error is when i try to run the script chat-server.php:

PHP Fatal error:  Class 'MyApp\Chat' not found in /var/www/mihai/bin/chat-server.php on line 8

What should i do??

Ty

cboden

unread,
Nov 23, 2013, 1:01:36 PM11/23/13
to ratch...@googlegroups.com, premie...@gmail.com, panda...@gmail.com, comanteo...@gmail.com
You need to install composer and run it to install dependancies in your project. 

garydi...@gmail.com

unread,
Jan 6, 2014, 4:53:07 AM1/6/14
to ratch...@googlegroups.com, premie...@gmail.com, panda...@gmail.com, comanteo...@gmail.com
I had the same problem. It made me crazy for long time!  I just wonder WHY you don't provide this tip in your demo on socketo.me.

cboden

unread,
Jan 6, 2014, 8:09:12 AM1/6/14
to ratch...@googlegroups.com, premie...@gmail.com, panda...@gmail.com, comanteo...@gmail.com, garydi...@gmail.com
At the top of the Hello World tutorial there is a note about composer and a link to the previous Installation tutorial if you are not familiar with composer. 
Reply all
Reply to author
Forward
0 new messages