1 decade ago by Winter
Hey guys. Just wanted to share my solution to the issue with Weltmeister having the circular dependency issue.
First, some data:
OS: Xubuntu 13.10
ImpactJS version: 1.23
Apache version: 2.4.6
PHP version: 5.5.3-1ubuntu2.1
Browser: Chrome 32.0.1700.77
When I copied the impact folder to /var/www and tried to go to http://localhost/impact/weltmeister.html using Chrome, I was seeing the page load, but not the map. I also couldn't interact with any buttons. Opening the JavaScript console, I saw 3 errors:
I hadn't modified any of the files.
I uninstalled, reinstalled, and restarted apache2 and php5.
I tried making sure the chmod and chown settings were correct for my /var/www/impact folder.
Creating a info.php file in /var/www with the following code
did display that PHP was running properly.
Running the actual sample game did display "It worked!"
So I ran a command to see the apache logs:
gave me this error:
After a bit of googling, my solution was this:
According to jszobody at this thread: http://stackoverflow.com/questions/18239405/php-fatal-error-call-to-undefined-function-json-decode
"Some distributions have removed the standard JSON extension as of PHP 5.5rc2 due to a license conflict:"
and he suggested that the person manually install php5-json using the above command.
then, I just restart apache
and it was working.
Hope this helps!
-Chris
First, some data:
OS: Xubuntu 13.10
ImpactJS version: 1.23
Apache version: 2.4.6
PHP version: 5.5.3-1ubuntu2.1
Browser: Chrome 32.0.1700.77
When I copied the impact folder to /var/www and tried to go to http://localhost/impact/weltmeister.html using Chrome, I was seeing the page load, but not the map. I also couldn't interact with any buttons. Opening the JavaScript console, I saw 3 errors:
1. GET http://localhost/impact/lib/weltmeister/api/glob.php?glob[]=lib%2Fgame%2Fentities%2F*.js&nocache=0.9819718454964459 500 (Internal Server Error) jquery-1.7.1.min.js:4 2. Uncaught Failed to load entity list via glob.php: Internal Server Error jquery-1.7.1.min.js:4 3. Uncaught Unresolved (or circular?) dependencies. Most likely there's a name/path mismatch for one of the listed modules or a previous syntax error prevents a module from loading: weltmeister.weltmeister (requires: weltmeister.edit-entities) weltmeister.edit-entities (requires: weltmeister.entities)
I hadn't modified any of the files.
I uninstalled, reinstalled, and restarted apache2 and php5.
I tried making sure the chmod and chown settings were correct for my /var/www/impact folder.
Creating a info.php file in /var/www with the following code
<?php phpinfo(); ?>
did display that PHP was running properly.
Running the actual sample game did display "It worked!"
So I ran a command to see the apache logs:
tail -f /var/log/apache2/error.log
gave me this error:
[Sun Jan 26 22:19:46.804578 2014] [:error] [pid 4158] [client 127.0.0.1:39647] PHP Fatal error: Call to undefined function json_encode() in /var/www/impact/lib/weltmeister/api/glob.php on line 19, referer: http://localhost/impact/weltmeister.html
After a bit of googling, my solution was this:
sudo apt-get install php5-json
According to jszobody at this thread: http://stackoverflow.com/questions/18239405/php-fatal-error-call-to-undefined-function-json-decode
"Some distributions have removed the standard JSON extension as of PHP 5.5rc2 due to a license conflict:"
and he suggested that the person manually install php5-json using the above command.
then, I just restart apache
sudo service apache2 restart
and it was working.
Hope this helps!
-Chris