PHP Classes

Some warnings in code and error in sample

Recommend this page to a friend!

      Horus Framework  >  All threads  >  Some warnings in code and error in...  >  (Un) Subscribe thread alerts  
Subject:Some warnings in code and error in...
Summary:Otherwise it is clever & cool!
Messages:2
Author:Vatay Norbert
Date:2014-06-27 01:08:57
Update:2014-06-27 08:37:23
 

  1. Some warnings in code and error in...   Reply   Report abuse  
Picture of Vatay Norbert Vatay Norbert - 2014-06-27 01:08:57
Tested on ubuntu 12.04, lighttpd 1.4.39, php PHP 5.3.10-1ubuntu3.11

[[ vatay@lineo : /var/www/teszt/php/horus ]]$ php index.php
PHP Notice: Undefined index: SERVER_NAME in /home/vatay/tmp/0/php/horus/Horus.php on line 693
PHP Stack trace:
PHP 1. {main}() /home/vatay/tmp/0/php/horus/index.php:0
PHP 2. Horus->__construct() /home/vatay/tmp/0/php/horus/index.php:4
PHP 3. Horus_Router->__construct() /home/vatay/tmp/0/php/horus/Horus.php:986
PHP Notice: Undefined index: REQUEST_URI in /home/vatay/tmp/0/php/horus/Horus.php on line 697
PHP Stack trace:
PHP 1. {main}() /home/vatay/tmp/0/php/horus/index.php:0
PHP 2. Horus->__construct() /home/vatay/tmp/0/php/horus/index.php:4
PHP 3. Horus_Router->__construct() /home/vatay/tmp/0/php/horus/Horus.php:986
PHP Notice: Undefined index: REQUEST_METHOD in /home/vatay/tmp/0/php/horus/Horus.php on line 823
PHP Stack trace:
PHP 1. {main}() /home/vatay/tmp/0/php/horus/index.php:0
PHP 2. Horus->run() /home/vatay/tmp/0/php/horus/index.php:10
PHP 3. Horus_Router->dispatch() /home/vatay/tmp/0/php/horus/Horus.php:1040

<title>404 not found</title>
<h1>Not found</h1>
<p> The requested URL was not found on this server . </p>

And in sample index.php you have written and give 404 error.
$app->router->get('/x', create_function('', ' echo "Hello world"; '));



  2. Re: Some warnings in code and error in...   Reply   Report abuse  
Picture of Mohammed Al Ashaal Mohammed Al Ashaal - 2014-06-27 08:37:23 - In reply to message 1 from Vatay Norbert
seems you run it from command line
in command line, there are many _SERVER vars not defined
so it must raise some errors , just use it under a web server
such as Apache .