gomoob / php-pushwoosh

A PHP Library to easily send push notifications with the Pushwoosh REST Web Services.
http://gomoob.github.io/php-pushwoosh
MIT License
65 stars 37 forks source link

Internal Server Error When calling the sample code #46

Closed clewsk8er closed 8 years ago

clewsk8er commented 8 years ago

When using the sample code with my api key and application code set I receive an internal server error. The library has been added by composer and when using the update command it says it has been generated. I tried putting the code in a page controller instead of the api and still no luck or reason why. If you could help me with this I would greatly appreciate it. I apologize and thank you for your time.

code

bgaillard commented 8 years ago

Hi @clewsk8er, don't know what's your error and if its coming php-pushwoosh.

Please take time to learn how to configure your PHP logging system to have more informations about your error and come back to us here only in the case your error comes from php-pushwoosh.

So for now i'll close this issue unless you're sure the error comes from php-pushwoosh.

clewsk8er commented 8 years ago

It is absolutely coming from php-pushwoosh. I have the library in now from composer and it shows in my auto-load files. When I try to even use this code on the controller it will not load my page and internal server errors me out. When I remove it my page loads. The only thing I can figure is that this requires 5.5.9 php and I am on 5.5.3. But I had to look in the auto-load files to see this.

$pushwoosh = Pushwoosh::create() ->setApplication('') ->setAuth('');

bgaillard commented 8 years ago

Hi again, so could you send us a dump of the exception you encounter ?

clewsk8er commented 8 years ago

The first photo is with the sample code, showing the internal server error. The second photo has the code commented out and as you see it shows my echo of submitted. For some reason the namespace or something is not available. After install via composer.json and commands is there anywhere use gomoob\php-pushwoosh would need to go for the classes to be accessed?

error

submitted

bgaillard commented 8 years ago

After install via composer.json and commands is there anywhere use gomoob\php-pushwoosh would need to go for the classes to be accessed?

Please learn more about PHP and composer, this is not the right place to ask such a question...

I receive an internal server error

Their could be 100 reasons why you encounter that on client side, we need an exception dump to help you.

clewsk8er commented 8 years ago

I know enough to have mongodb drivers and library working. My question was asking if your package needed anything specific seeing as it is not working with the sample code provided by your documentation. Your documentation uses the Pushwoosh::create which is not consistent with other class call I have used such as new MongoDB\Driver\Manager. But no worries, I will just make my own api calls. I made 16 apps last year, I guess PHP fell by the waist side. Best of luck.