APPPATH/classes/Controller/Webservice.php [ 40 ]
35 $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
36
37 $mime = File::mime_by_ext($extension);
38 header('Content-type:'.$mime);
39 $file = str_replace('.'.$extension,'-'.$this->request->param('param').'.'.$extension,$file);
40 readfile($file);
41 die();
42 //var_dump($this->request->param('id'));
43 }
44
45 public function action_date_available()
-
{PHP internal call} » Kohana_Core::error_handler(arguments)
0
integer 2
1
string(191) "readfile(): open_basedir restriction in effect. File(/var/www/turlupain-zoom.com/htdocs/commandes/userfiles/products) is not wit …"
2
string(85) "/var/www/turlupain.com/htdocs/commandes/application/classes/Controller/Webservice.php"
3
integer 40
4
array(6) ( "conf" => object Config_Group(2)
{ public path_files => string(59) "/var/www/turlupain.com/htdocs/commandes/userfiles/products/" public images_size => array(6) ( "big" => array(3) ( "width" => integer 1024 "height" => integer 768 "method" => string(6) "resize" ) "thumb" => array(3) ( "width" => integer 60 "height" => integer 60 "method" => string(4) "crop" ) "image_list" => array(3) ( "width" => integer 65 "height" => integer 45 "method" => string(4) "crop" ) "product" => array(3) ( "width" => integer 120 "height" => integer 150 "method" => string(4) "size" ) "small" => array(3) ( "width" => integer 290 "height" => integer 200 "method" => string(4) "size" ) "zoom" => array(3) ( "width" => integer 800 "height" => integer 600 "method" => string(6) "resize" ) ) }
"directory" => string(59) "/var/www/turlupain.com/htdocs/commandes/userfiles/products/" "image" => object Model_ImageProduct(34){ protected _table_name => string(14) "images_product" protected _primary_key => string(15) "imageproduct_id" protected _belongs_to => array(1) ( "product" => array(2) ( "foreign_key" => string(10) "product_id" "model" => string(7) "product" ) ) protected _has_one => array(0) protected _has_many => array(0) protected _load_with => array(0) protected _validation => NULL protected _object => array(7) ( "imageproduct_id" => NULL "product_id" => NULL "title" => NULL "filename" => NULL "rewritedname" => NULL "order" => NULL "published" => NULL ) protected _changed => array(0) protected _original_values => array(0) protected _related => array(0) protected _valid => bool FALSE protected _loaded => bool FALSE protected _saved => bool FALSE protected _sorting => NULL protected _foreign_key_suffix => string(3) "_id" protected _object_name => string(12) "imageproduct" protected _object_plural => string(13) "imageproducts" protected _table_columns => array(7) ( "imageproduct_id" => array(12) ( "type" => string(3) "int" "min" => string(11) "-2147483648" "max" => string(10) "2147483647" "column_name" => string(15) "imageproduct_id" "column_default" => NULL "data_type" => string(3) "int" "is_nullable" => bool FALSE "ordinal_position" => integer 1 "comment" => string(0) "" "extra" => string(14) "auto_increment" "key" => string(3) "PRI" "privileges" => string(31) "select,insert,update,references" ) "product_id" => array(12) ( "type" => string(3) "int" "min" => string(11) "-2147483648" "max" => string(10) "2147483647" "column_name" => string(10) "product_id" "column_default" => NULL "data_type" => string(3) "int" "is_nullable" => bool FALSE "ordinal_position" => integer 2 "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "title" => array(12) ( "type" => string(6) "string" "column_name" => string(5) "title" "column_default" => NULL "data_type" => string(7) "varchar" "is_nullable" => bool FALSE "ordinal_position" => integer 3 "character_maximum_length" => string(3) "255" "collation_name" => string(18) "utf8mb3_unicode_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "filename" => array(12) ( "type" => string(6) "string" "column_name" => string(8) "filename" "column_default" => NULL "data_type" => string(7) "varchar" "is_nullable" => bool FALSE "ordinal_position" => integer 4 "character_maximum_length" => string(3) "255" "collation_name" => string(18) "utf8mb3_unicode_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "rewritedname" => array(12) ( "type" => string(6) "string" "column_name" => string(12) "rewritedname" "column_default" => NULL "data_type" => string(7) "varchar" "is_nullable" => bool FALSE "ordinal_position" => integer 5 "character_maximum_length" => string(3) "255" "collation_name" => string(18) "utf8mb3_unicode_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "order" => array(12) ( "type" => string(3) "int" "min" => string(11) "-2147483648" "max" => string(10) "2147483647" "column_name" => string(5) "order" "column_default" => NULL "data_type" => string(3) "int" "is_nullable" => bool FALSE "ordinal_position" => integer 6 "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "published" => array(13) ( "type" => string(3) "int" "min" => string(4) "-128" "max" => string(3) "127" "column_name" => string(9) "published" "column_default" => NULL "data_type" => string(7) "tinyint" "is_nullable" => bool FALSE "ordinal_position" => integer 7 "display" => string(1) "1" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) ) protected _updated_column => NULL protected _created_column => NULL protected _serialize_columns => array(0) protected _primary_key_value => NULL protected _table_names_plural => bool TRUE protected _reload_on_wakeup => bool TRUE protected _db => object Database_MySQL(6)
"file" => string(63) "/var/www/turlupain-zoom.com/htdocs/commandes/userfiles/products" "extension" => string(0) "" "mime" => bool FALSE ){ protected _connection_id => string(40) "9a97f7b509f49903aaeacf86df4e17182b91c63a" protected _identifier => string(1) "`" public last_query => string(440) "SELECT `tur_imageproduct`.`imageproduct_id` AS `imageproduct_id`, `tur_imageproduct`.`product_id` AS `product_id`, `tur_imagepro …" protected _instance => string(7) "default" protected _connection => resource(mysql link) protected _config => array(5) ( "type" => string(5) "MySQL" "connection" => array(3) ( "hostname" => string(9) "localhost" "database" => string(13) "turlupain-com" "persistent" => bool FALSE ) "table_prefix" => string(4) "tur_" "charset" => string(4) "utf8" "caching" => bool FALSE ) }
protected _db_group => NULL protected _db_applied => array(0) protected _db_pending => array(0) protected _db_reset => bool TRUE protected _db_builder => NULL protected _with_applied => array(0) protected _cast_data => array(0) protected _errors_filename => string(12) "imageproduct" } -
APPPATH/classes/Controller/Webservice.php [ 40 ] » readfile(arguments)
filename
string(63) "/var/www/turlupain-zoom.com/htdocs/commandes/userfiles/products"
35 $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION)); 36 37 $mime = File::mime_by_ext($extension); 38 header('Content-type:'.$mime); 39 $file = str_replace('.'.$extension,'-'.$this->request->param('param').'.'.$extension,$file); 40 readfile($file); 41 die(); 42 //var_dump($this->request->param('id')); 43 } 44 45 public function action_date_available()
-
SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Webservice->action_imageproduct()
79 array(':uri' => $this->request->uri()) 80 )->request($this->request); 81 } 82 83 // Execute the action itself 84 $this->{$action}(); 85 86 // Execute the "after action" method 87 $this->after(); 88 89 // Return the response
-
{PHP internal call} » Kohana_Controller->execute()
-
SYSPATH/classes/Kohana/Request/Client/Internal.php [ 97 ] » ReflectionMethod->invoke(arguments)
0
object Controller_Webservice(4)
{ public template => object Smarty_View(4)
{ protected _file => string(70) "/var/www/turlupain.com/htdocs/commandes/application/views/template.tpl" protected _data => array(0) protected _clone_time => float 0.0056359767913818 protected _smarty => object Smarty(73)
public auto_render => bool TRUE public request => object Request(19){ public auto_literal => bool TRUE public error_unassigned => bool FALSE public use_include_path => bool FALSE protected template_dir => array(1) ( 0 => string(58) "/var/www/turlupain.com/htdocs/commandes/application/views/" ) public joined_template_dir => string(58) "/var/www/turlupain.com/htdocs/commandes/application/views/" public joined_config_dir => string(66) "/var/www/turlupain.com/htdocs/commandes/application/smarty_config/" public default_template_handler_func => NULL public default_config_handler_func => NULL public default_plugin_handler_func => NULL protected compile_dir => string(74) "/var/www/turlupain.com/htdocs/commandes/application/cache/smarty_compiled/" protected plugins_dir => array(3) ( 0 => string(67) "/var/www/turlupain.com/htdocs/commandes/application/smarty_plugins/" 1 => string(71) "/var/www/turlupain.com/htdocs/commandes/modules/Smarty3/smarty_plugins/" 2 => string(83) "/var/www/turlupain.com/htdocs/commandes/modules/Smarty3/vendor/smarty/libs/plugins/" ) protected cache_dir => string(71) "/var/www/turlupain.com/htdocs/commandes/application/cache/smarty_cache/" protected config_dir => array(1) ( 0 => string(66) "/var/www/turlupain.com/htdocs/commandes/application/smarty_config/" ) public force_compile => bool FALSE public compile_check => bool TRUE public use_sub_dirs => bool FALSE public allow_ambiguous_resources => bool FALSE public caching => bool FALSE public merge_compiled_includes => bool FALSE public cache_lifetime => integer 3600 public force_cache => bool FALSE public cache_id => NULL public compile_id => NULL public left_delimiter => string(1) "{" public right_delimiter => string(1) "}" public security_class => string(15) "Smarty_Security" public security_policy => NULL public php_handling => integer 1 public allow_php_templates => bool FALSE public direct_access_security => bool TRUE public debugging => bool FALSE public debugging_ctrl => string(4) "NONE" public smarty_debug_id => string(12) "SMARTY_DEBUG" public debug_tpl => string(89) "file:/var/www/turlupain.com/htdocs/commandes/modules/Smarty3/vendor/smarty/libs/debug.tpl" public error_reporting => NULL public get_used_tags => bool FALSE public config_overwrite => bool TRUE public config_booleanize => bool TRUE public config_read_hidden => bool FALSE public compile_locking => bool TRUE public cache_locking => bool FALSE public locking_timeout => integer 10 public template_functions => array(0) public default_resource_type => string(4) "file" public caching_type => string(4) "file" public properties => array(0) public default_config_type => string(4) "file" public template_objects => array(0) public cache_modified_check => bool FALSE public registered_plugins => array(0) public plugin_search_order => array(4) ( 0 => string(8) "function" 1 => string(5) "block" 2 => string(8) "compiler" 3 => string(5) "class" ) public registered_objects => array(0) public registered_classes => array(0) public registered_filters => array(0) public registered_resources => array(0) public _resource_handlers => array(0) public registered_cache_resources => array(0) public _cacheresource_handlers => array(0) public autoload_filters => array(0) public default_modifiers => array(0) public escape_html => bool FALSE public start_time => float 1711659902.2485 public _file_perms => integer 420 public _dir_perms => integer 505 public _tag_stack => array(0) public smarty => object Smarty(73) { *RECURSION* } public _current_file => NULL public _parserdebug => bool FALSE public merged_templates_func => array(0) public template_class => string(24) "Smarty_Internal_Template" public tpl_vars => array(0) public parent => NULL public config_vars => array(0) }
}{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
public response => object Response(5){ protected _filters => array(0) protected _uri => string(40) "webservice/imageproduct(/<id>(/<param>))" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(10) "webservice" "action" => string(12) "imageproduct" ) protected _route_regex => string(84) "#^webservice/imageproduct(?:/(?P<id>[^/.,;?\n]++)(?:/(?P<param>[^/.,;?\n]++))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(10) "Webservice" protected _action => string(12) "imageproduct" protected _uri => string(31) "webservice/imageproduct/34/zoom" protected _external => bool FALSE protected _params => array(2) ( "id" => string(2) "34" "param" => string(4) "zoom" ) protected _get => array(1) ( "/webservice/imageproduct/34/zoom" => string(0) "" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(9){ protected _previous_environment => NULL protected _cache => NULL protected _follow => bool FALSE protected _follow_headers => array(1) ( 0 => string(13) "Authorization" ) protected _strict_redirect => bool TRUE protected _header_callbacks => array(1) ( "Location" => string(34) "Request_Client::on_header_location" ) protected _max_callback_depth => integer 5 protected _callback_depth => integer 1 protected _callback_params => array(0) }
}{ protected _status => integer 200 protected _header => object HTTP_Header(0)
}{ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }92 93 // Create a new instance of the controller 94 $controller = $class->newInstance($request, $response); 95 96 // Run the controller's execute() method 97 $response = $class->getMethod('execute')->invoke($controller); 98 99 if ( ! $response instanceof Response) 100 { 101 // Controller failed to return a Response. 102 throw new Kohana_Exception('Controller failed to return a Response');
-
SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request(arguments)
0
object Request(19)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _filters => array(0) protected _uri => string(40) "webservice/imageproduct(/<id>(/<param>))" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(10) "webservice" "action" => string(12) "imageproduct" ) protected _route_regex => string(84) "#^webservice/imageproduct(?:/(?P<id>[^/.,;?\n]++)(?:/(?P<param>[^/.,;?\n]++))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(10) "Webservice" protected _action => string(12) "imageproduct" protected _uri => string(31) "webservice/imageproduct/34/zoom" protected _external => bool FALSE protected _params => array(2) ( "id" => string(2) "34" "param" => string(4) "zoom" ) protected _get => array(1) ( "/webservice/imageproduct/34/zoom" => string(0) "" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(9){ protected _previous_environment => NULL protected _cache => NULL protected _follow => bool FALSE protected _follow_headers => array(1) ( 0 => string(13) "Authorization" ) protected _strict_redirect => bool TRUE protected _header_callbacks => array(1) ( "Location" => string(34) "Request_Client::on_header_location" ) protected _max_callback_depth => integer 5 protected _callback_depth => integer 1 protected _callback_params => array(0) }
}1
object Response(5)
{ protected _status => integer 200 protected _header => object HTTP_Header(0)
{ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }109 $orig_response = $response = Response::factory(array('_protocol' => $request->protocol())); 110 111 if (($cache = $this->cache()) instanceof HTTP_Cache) 112 return $cache->execute($this, $request, $response); 113 114 $response = $this->execute_request($request, $response); 115 116 // Execute response callbacks 117 foreach ($this->header_callbacks() as $header => $callback) 118 { 119 if ($response->headers($header))
-
SYSPATH/classes/Kohana/Request.php [ 986 ] » Kohana_Request_Client->execute(arguments)
0
object Request(19)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _filters => array(0) protected _uri => string(40) "webservice/imageproduct(/<id>(/<param>))" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(10) "webservice" "action" => string(12) "imageproduct" ) protected _route_regex => string(84) "#^webservice/imageproduct(?:/(?P<id>[^/.,;?\n]++)(?:/(?P<param>[^/.,;?\n]++))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(10) "Webservice" protected _action => string(12) "imageproduct" protected _uri => string(31) "webservice/imageproduct/34/zoom" protected _external => bool FALSE protected _params => array(2) ( "id" => string(2) "34" "param" => string(4) "zoom" ) protected _get => array(1) ( "/webservice/imageproduct/34/zoom" => string(0) "" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(9){ protected _previous_environment => NULL protected _cache => NULL protected _follow => bool FALSE protected _follow_headers => array(1) ( 0 => string(13) "Authorization" ) protected _strict_redirect => bool TRUE protected _header_callbacks => array(1) ( "Location" => string(34) "Request_Client::on_header_location" ) protected _max_callback_depth => integer 5 protected _callback_depth => integer 1 protected _callback_params => array(0) }
}981 throw new Request_Exception('Unable to execute :uri without a Kohana_Request_Client', array( 982 ':uri' => $this->_uri, 983 )); 984 } 985 986 return $this->_client->execute($this); 987 } 988 989 /** 990 * Returns whether this request is the initial request Kohana received. 991 * Can be used to test for sub requests.
-
DOCROOT/index.php [ 118 ] » Kohana_Request->execute()
113 /** 114 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. 115 * If no source is specified, the URI will be automatically detected. 116 */ 117 echo Request::factory(TRUE, array(), FALSE) 118 ->execute() 119 ->send_headers(TRUE) 120 ->body(); 121 }