stack trace errors

574 views
Skip to first unread message

satyaakam goswami

unread,
Oct 9, 2011, 2:37:11 AM10/9/11
to kodelearn_...@googlegroups.com
errors  i see in the browser , i have set the permission of  777 to the cache directory.

even though  i have set base_url as localhost it reads i do not know from where it is coming.



SYSPATH/classes/kohana/core.php [ 281 ]

276 			Kohana::$cache_dir = APPPATH.'cache';
277 		}
278 
279 		if ( ! is_writable(Kohana::$cache_dir))
280 		{
281 			throw new Kohana_Exception('Directory :dir must be writable',
282 				array(':dir' => Debug::path(Kohana::$cache_dir)));
283 		}
284 
285 		if (isset($settings['cache_life']))
286 		{
  1. APPPATH/bootstrap.php [ 85 ] » Kohana_Core::init(arguments)

    0
    array(2) (
        "base_url" => string(16) "http://locahost/"
        "index.php" => string(0) ""
    )
    80  * - boolean  caching     enable or disable internal caching                 FALSE
    81  */
    82 Kohana::init(array(
    83     'base_url'   => 'http://locahost/',
    84     'index.php'  => ''
    85 ));
    86 
    87 /**
    88  * Attach the file write to logging. Multiple writers are supported.
    89  */
    90 Kohana::$log->attach(new Log_File(APPPATH.'logs'));
    
  2. DOCROOT/index.php [ 103 ] » require(arguments)

    0
    string(55) "/home/satyag/Public/kodelearn/application/bootstrap.php"
     98 {
     99 	define('KOHANA_START_MEMORY', memory_get_usage());
    100 }
    101 
    102 // Bootstrap the application
    103 require APPPATH.'bootstrap'.EXT;
    104 
    105 /**
    106  * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
    107  * If no source is specified, the URI will be automatically detected.
    108  */

satyaakam

unread,
Oct 9, 2011, 2:50:25 AM10/9/11
to Kodelearn_developers
ok i was able to over come the last ones not i get the following
errors

HTTP_Exception_404 [ 404 ]: The requested URL ~satyag/kodelearn was
not found on this server.
SYSPATH/classes/kohana/request/client/internal.php [ 94 ]
89 // Initiate response time
90 $this->_response_time = time();
91
92 if ( ! class_exists($prefix.$controller))
93 {
94 throw new HTTP_Exception_404('The requested URL :uri was not
found on this server.',
95 array(':uri' => $request->uri()));
96 }
97
98 // Load the controller using reflection
99 $class = new ReflectionClass($prefix.$controller);
SYSPATH/classes/kohana/request.php [ 1129 ] »
Kohana_Request_Client_Internal->execute(arguments)
1124 throw new Kohana_Request_Exception('Unable to execute :uri
without a Kohana_Request_Client', array(
1125 ':uri' => $this->_uri,
1126 ));
1127 }
1128
1129 return $this->_client->execute($this);
1130 }
1131
1132 /**
1133 * Returns whether this request is the initial request Kohana
received.
1134 * Can be used to test for sub requests.
DOCROOT/index.php [ 111 ] » Kohana_Request->execute()
106 * Execute the main request. A source of the URI can be passed,
eg: $_SERVER['PATH_INFO'].
107 * If no source is specified, the URI will be automatically
detected.
108 */
109 if (!defined('SUPPRESS_REQUEST')) {
110 echo Request::factory()
111 ->execute()
112 ->send_headers()
113 ->body();
114 }

vineet naik

unread,
Oct 9, 2011, 9:32:28 AM10/9/11
to kodelearn_...@googlegroups.com
HTTP_Exception_404 [ 404 ]: The requested URL ~satyag/kodelearn was
not found on this server.

I think there is some problem with ~satyag/kodelearn in the url as the message says.
when you open kodelearn root, it should redirect you to http://localhost/kodelearn/auth/index
or some thing similar depending upon your setup.

Make sure mod_rewrite of apache is enabled. Kodelearn needs rewrite module enabled to support "beautiful" urls.

--
Vineet Naik

satyaakam goswami

unread,
Oct 9, 2011, 9:45:03 AM10/9/11
to kodelearn_...@googlegroups.com
On Sun, Oct 9, 2011 at 7:02 PM, vineet naik <vinee...@kodeplay.com> wrote:
HTTP_Exception_404 [ 404 ]: The requested URL ~satyag/kodelearn was
not found on this server.

I think there is some problem with ~satyag/kodelearn in the url as the message says.
when you open kodelearn root, it should redirect you to http://localhost/kodelearn/auth/index
or some thing similar depending upon your setup.

i am hosting the app in my home directory itself .
 
Make sure mod_rewrite of apache is enabled. Kodelearn needs rewrite module enabled to support "beautiful" urls.

yes i have mod_rewrite enabled in httpd.conf


-Satya

vineet naik

unread,
Oct 10, 2011, 12:42:12 AM10/10/11
to kodelearn_...@googlegroups.com
Ok. When you open the kodelearn root location in the browser, which url does it redirect to by default ? 
Are you using a virtual host ? it might be helpful if you can post the apache2 config

--
Vineet Naik

satyaakam goswami

unread,
Oct 10, 2011, 4:27:40 AM10/10/11
to kodelearn_...@googlegroups.com
On Mon, Oct 10, 2011 at 10:12 AM, vineet naik <vinee...@kodeplay.com> wrote:
Ok. When you open the kodelearn root location in the browser, which url does it redirect to by default ? 
Are you using a virtual host ? it might be helpful if you can post the apache2 config

here is the apache2 config  http://pastebin.com/X14MDfi1
i have a test html page rendering ok in browser from my Public directory , even when i try the url http://localhost/~satyag/kodelearn it resolves fine , when i try to use wget it gives me a 404 .

just to remove the complexity of userdir i hosted the app in the default location of Apache too /var/www/html here i get this error 

ErrorException [ 2 ]: file_put_contents(/var/www/html/kodelearn/application/logs/2011/10/10.php): failed to open stream: Permission denied ~ SYSPATH/classes/kohana/log/file.php [ 91 ]

-Satya

vineet naik

unread,
Oct 10, 2011, 9:35:40 AM10/10/11
to kodelearn_...@googlegroups.com
It looks like write permissions issue and not an apache problem. Please check if write permissions are given to these directories ?
  • application/cache/
  • application/logs/
  • media/image/data/cache/
check using - 

$ cd kodelearn/application 
$ ls -l 

it should show drwxrwxrwx for all three of them.

if not add write permissions using 

$ chmod -R 777 application/cache/ application/logs/ media/image/data/cache/ 


--
Vineet Naik

satyaakam goswami

unread,
Oct 10, 2011, 10:19:29 AM10/10/11
to kodelearn_...@googlegroups.com
On Mon, Oct 10, 2011 at 7:05 PM, vineet naik <vinee...@kodeplay.com> wrote:
It looks like write permissions issue and not an apache problem. Please check if write permissions are given to these directories ?
  • application/cache/
  • application/logs/
  • media/image/data/cache/
check using - 

$ cd kodelearn/application 
$ ls -l 

ls -l
total 36
-rw-r--r--  1 root root 4665 Oct 10 14:02 bootstrap.php
drwxrwxrwx  2 root root 4096 Oct 10 14:02 cache
drwxr-xr-x  4 root root 4096 Oct 10 14:02 classes
drwxr-xr-x  2 root root 4096 Oct 10 14:02 config
drwxrwxrwx  3 root root 4096 Oct 10 14:02 logs
drwxr-xr-x  2 root root 4096 Oct 10 14:02 messages
drwxr-xr-x  2 root root 4096 Oct 10 14:02 tests
drwxr-xr-x 14 root root 4096 Oct 10 14:02 views


still i get i am getting even after giving 777 to the whole kodelearn directory 

vineet naik

unread,
Oct 10, 2011, 10:38:42 AM10/10/11
to kodelearn_...@googlegroups.com
These permissions are correct. Very difficult to figure out what might be wrong. 

Can you just try renaming the file installed.php in the kodelearn root to install.php, and opening kodelearn in the browser ?
it will run environment tests to check if your system is compatible. Check if it shows everything in green colour. 
--
Vineet Naik

satyaakam goswami

unread,
Oct 10, 2011, 10:40:35 AM10/10/11
to kodelearn_...@googlegroups.com
On Mon, Oct 10, 2011 at 8:08 PM, vineet naik <vinee...@kodeplay.com> wrote:
These permissions are correct. Very difficult to figure out what might be wrong. 

Can you just try renaming the file installed.php in the kodelearn root to install.php, and opening kodelearn in the browser ?
it will run environment tests to check if your system is compatible. Check if it shows everything in green colour. 


will try that , for now i trying to figure our what does $SYSPATH contain , print statement is returning black , where do you set this ?


-Satya 

vineet naik

unread,
Oct 10, 2011, 10:45:00 AM10/10/11
to kodelearn_...@googlegroups.com
in index.php on line 74. 

On my machine I have created a virtual host for kodelearn to keep the code in my preferred directory outside /var/www/. So you can try that as well.
Let me know in case of any help in that direction.  
--
Vineet Naik

satyaakam goswami

unread,
Oct 10, 2011, 10:45:40 AM10/10/11
to kodelearn_...@googlegroups.com
On Mon, Oct 10, 2011 at 8:10 PM, satyaakam goswami <saty...@gmail.com> wrote:
On Mon, Oct 10, 2011 at 8:08 PM, vineet naik <vinee...@kodeplay.com> wrote:
These permissions are correct. Very difficult to figure out what might be wrong. 

Can you just try renaming the file installed.php in the kodelearn root to install.php, and opening kodelearn in the browser ?
it will run environment tests to check if your system is compatible. Check if it shows everything in green colour. 

ok this works its all green  now, moving forward

-Satya

satyaakam goswami

unread,
Oct 10, 2011, 10:54:25 AM10/10/11
to kodelearn_...@googlegroups.com
after i renamed install.php , now again i get the following error 


HTTP_Exception_404 [ 404 ]: The requested URL kodelearn/index was not found on this server.
SYSPATH/classes/kohana/request/client/internal.php [ 94 ]
89 // Initiate response time
90 $this->_response_time = time();
91 
92 if ( ! class_exists($prefix.$controller))
93 {
94 throw new HTTP_Exception_404('The requested URL :uri was not found on this server.',
95 array(':uri' => $request->uri()));
96 }
97 
98 // Load the controller using reflection
99 $class = new ReflectionClass($prefix.$controller);
SYSPATH/classes/kohana/request.php [ 1129 ] » Kohana_Request_Client_Internal->execute(arguments)
1124 throw new Kohana_Request_Exception('Unable to execute :uri without a Kohana_Request_Client', array(
1125 ':uri' => $this->_uri,
1126 ));
1127 }
1128 
1129 return $this->_client->execute($this);
1130 }
1131 
1132 /**
1133 * Returns whether this request is the initial request Kohana received.
1134 * Can be used to test for sub requests.
DOCROOT/index.php [ 110 ] » Kohana_Request->execute()
105  * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
106  * If no source is specified, the URI will be automatically detected.
107  */
108 if (!defined('SUPPRESS_REQUEST')) {    
109     echo Request::factory()
110 ->execute()
111 ->send_headers()
112 ->body();
113 }
Environment
Included files (63)
DOCROOT/index.php
APPPATH/bootstrap.php
SYSPATH/classes/kohana/core.php
SYSPATH/classes/kohana.php
SYSPATH/classes/i18n.php
SYSPATH/classes/kohana/i18n.php
SYSPATH/classes/kohana/exception.php
SYSPATH/classes/kohana/kohana/exception.php
SYSPATH/classes/log.php
SYSPATH/classes/kohana/log.php
SYSPATH/classes/config.php
SYSPATH/classes/kohana/config.php
SYSPATH/classes/log/file.php
SYSPATH/classes/kohana/log/file.php
SYSPATH/classes/log/writer.php
SYSPATH/classes/kohana/log/writer.php
SYSPATH/classes/config/file.php
SYSPATH/classes/kohana/config/file.php
SYSPATH/classes/config/reader.php
SYSPATH/classes/kohana/config/reader.php
MODPATH/unittest/init.php
SYSPATH/classes/route.php
SYSPATH/classes/kohana/route.php
MODPATH/playground/init.php
MODPATH/exam/init.php
MODPATH/dynamicmenu/classes/dynamicmenu.php
MODPATH/event/init.php
MODPATH/lecture/init.php
MODPATH/attendance/init.php
SYSPATH/classes/request.php
SYSPATH/classes/kohana/request.php
SYSPATH/classes/http/request.php
SYSPATH/classes/kohana/http/request.php
SYSPATH/classes/http/interaction.php
SYSPATH/classes/kohana/http/interaction.php
SYSPATH/classes/http/header.php
SYSPATH/classes/kohana/http/header.php
SYSPATH/classes/arr.php
SYSPATH/classes/kohana/arr.php
SYSPATH/classes/request/client/internal.php
SYSPATH/classes/kohana/request/client/internal.php
SYSPATH/classes/request/client.php
SYSPATH/classes/kohana/request/client.php
SYSPATH/classes/profiler.php
SYSPATH/classes/kohana/profiler.php
SYSPATH/classes/http/exception/404.php
SYSPATH/classes/kohana/http/exception/404.php
SYSPATH/classes/http/exception.php
SYSPATH/classes/kohana/http/exception.php
SYSPATH/classes/response.php
SYSPATH/classes/kohana/response.php
SYSPATH/classes/http/response.php
SYSPATH/classes/kohana/http/response.php
SYSPATH/classes/debug.php
SYSPATH/classes/kohana/debug.php
SYSPATH/classes/date.php
SYSPATH/classes/kohana/date.php
SYSPATH/views/kohana/error.php
SYSPATH/classes/html.php
SYSPATH/classes/kohana/html.php
SYSPATH/classes/utf8.php
SYSPATH/classes/kohana/utf8.php
SYSPATH/utf8/strlen.php
Loaded extensions (47)
Core
date
ereg
libxml
openssl
pcre
zlib
bz2
calendar
ctype
hash
filter
ftp
gettext
gmp
SPL
iconv
Reflection
session
standard
shmop
SimpleXML
sockets
exif
tokenizer
xml
apache2handler
bcmath
curl
dom
fileinfo
json
PDO
pdo_sqlite
Phar
posix
soap
sqlite3
sysvmsg
sysvsem
sysvshm
wddx
xmlreader
xmlwriter
xsl
zip
mhash
$_COOKIE
csrftoken
string(32) "7f01effbad29740041188a3a55204bf8"
gae_b_id
string(80) "X2dhZV9iaW5nb19yYW5kb206MktSWEJVYW9lOE4wV29PaFVIOHBVbFRsRXFnbjF3NXpwd003TEVGZA=="
$_SERVER
HTTP_HOST
string(9) "localhost"
HTTP_CONNECTION
string(10) "keep-alive"
HTTP_CACHE_CONTROL
string(9) "max-age=0"
HTTP_USER_AGENT
string(102) "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1"
HTTP_ACCEPT
string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_ENCODING
string(17) "gzip,deflate,sdch"
HTTP_ACCEPT_LANGUAGE
string(14) "en-US,en;q=0.8"
HTTP_ACCEPT_CHARSET
string(30) "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
HTTP_COOKIE
string(133) "csrftoken=7f01effbad29740041188a3a55204bf8; gae_b_id=X2dhZV9iaW5nb19yYW5kb206MktSWEJVYW9lOE4wV29PaFVIOHBVbFRsRXFnbjF3NXpwd003TEV …"
PATH
string(29) "/sbin:/usr/sbin:/bin:/usr/bin"
SERVER_SIGNATURE
string(70) "<address>Apache/2.2.21 (Fedora) Server at localhost Port 80</address>
"
SERVER_SOFTWARE
string(22) "Apache/2.2.21 (Fedora)"
SERVER_NAME
string(9) "localhost"
SERVER_ADDR
string(9) "127.0.0.1"
SERVER_PORT
string(2) "80"
REMOTE_ADDR
string(9) "127.0.0.1"
DOCUMENT_ROOT
string(13) "/var/www/html"
SERVER_ADMIN
string(14) "root@localhost"
SCRIPT_FILENAME
string(33) "/var/www/html/kodelearn/index.php"
REMOTE_PORT
string(5) "52980"
GATEWAY_INTERFACE
string(7) "CGI/1.1"
SERVER_PROTOCOL
string(8) "HTTP/1.1"
REQUEST_METHOD
string(3) "GET"
QUERY_STRING
string(0) ""
REQUEST_URI
string(11) "/kodelearn/"
SCRIPT_NAME
string(20) "/kodelearn/index.php"
PHP_SELF
string(20) "/kodelearn/index.php"
REQUEST_TIME
integer 1318259272 

jimit modi

unread,
Oct 10, 2011, 10:58:44 AM10/10/11
to kodelearn_...@googlegroups.com
Hi Satya,

Can you show your bootstrap.php file??

And what do you get by visiting this url http://localhost/kodelearn/index.php/auth

Jimit Rajesh Modi
Phone: +91-9969655712 | Follow: @jimymodi
KODEPLAY 
We are a company that values doers over talkers and mentors over managers

satyaakam goswami

unread,
Oct 10, 2011, 10:59:20 AM10/10/11
to kodelearn_...@googlegroups.com
Tried printing the $SYSPATH immediately after the define statment it does not return any path , its all empty , can you come on irc or i can give control of my pc using teamviewer , what do you say ?

-Satya

satyaakam goswami

unread,
Oct 10, 2011, 11:01:29 AM10/10/11
to kodelearn_...@googlegroups.com
On Mon, Oct 10, 2011 at 8:28 PM, jimit modi <ji...@kodeplay.com> wrote:
Hi Satya,

Can you show your bootstrap.php file??

And what do you get by visiting this url http://localhost/kodelearn/index.php/auth


i get 


 SYSPATH/classes/kohana/request/client/internal.php [ 94 ]
89 			// Initiate response time
90 			$this->_response_time = time();
91 
92 			if ( ! class_exists($prefix.$controller))
93 			{
94 				throw new HTTP_Exception_404('The requested URL :uri was not found on this server.',
95 													array(':uri' => $request->uri()));
96 			}
97 
98 			// Load the controller using reflection
99 			$class = new ReflectionClass($prefix.$controller);
  1. SYSPATH/classes/kohana/request.php [ 1129 ] » Kohana_Request_Client_Internal->execute(arguments)

  2. DOCROOT/index.php [ 113 ] » Kohana_Request->execute()





vineet naik

unread,
Oct 10, 2011, 11:02:08 AM10/10/11
to kodelearn_...@googlegroups.com
try printing only SYSPATH instead of $SYSPATH. I have sent you a chat request as well. 


On Mon, Oct 10, 2011 at 8:29 PM, satyaakam goswami <saty...@gmail.com> wrote:
Tried printing the $SYSPATH immediately after the define statment it does not return any path , its all empty , can you come on irc or i can give control of my pc using teamviewer , what do you say ?

-Satya



--
Vineet Naik

satyaakam goswami

unread,
Oct 10, 2011, 11:02:25 AM10/10/11
to kodelearn_...@googlegroups.com
i get this 


ErrorException [ Fatal Error ]: Call to undefined function mysql_connect()
MODPATH/database/classes/kohana/database/mysql.php [ 59 ]
54 $this->_connection = mysql_pconnect($hostname, $username, $password);
55 }
56 else
57 {
58 // Create a connection and force it to be a new link
59 $this->_connection = mysql_connect($hostname, $username, $password, TRUE);
60 }
61 }
62 catch (Exception $e)
63 {
64 // No connection exists
{PHP internal call} » Kohana_Core::shutdown_handler()


fossevents.in

Neerja Negi

unread,
Mar 18, 2014, 8:07:25 AM3/18/14
to kodelearn_...@googlegroups.com, saty...@gmail.com
ErrorException [ 2 ]: mkdir(): Permission denied ~ SYSPATH/classes/kohana/log/file.php [ 57 ]

can anybody help me to figure out this problem. It was encountered when i was rendering a view with kohana

vineet naik

unread,
Mar 19, 2014, 2:19:03 AM3/19/14
to kodelearn_...@googlegroups.com, neerj...@gmail.com
Hi Neerja, 

From the exception, it seems like the owner of the web server process doesn't have write permission
to create the log files directory. I think if you manually create the logs dir and give write permission to the user, this error will probably go away.

Are you facing this problem in Kodelearn or some other Kohana project? I can see that in Kodelearn 




On Tue, Mar 18, 2014 at 5:37 PM, Neerja Negi <neerj...@gmail.com> wrote:
ErrorException [ 2 ]: mkdir(): Permission denied ~ SYSPATH/classes/kohana/log/file.php [ 57 ]

can anybody help me to figure out this problem. It was encountered when i was rendering a view with kohana

--
You received this message because you are subscribed to the Google Groups "Kodelearn_developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kodelearn_develo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Vineet Naik

Neerja Negi

unread,
Mar 19, 2014, 2:26:27 AM3/19/14
to vineet naik, kodelearn_...@googlegroups.com

Thanks vineet,i solved the error by writing this command
Chmod -R 0777

Reply all
Reply to author
Forward
0 new messages