taxast Posted February 17, 2010 Share Posted February 17, 2010 I'm trying to create a link to a .pdf file, but all i get is an error somewhere in kohana.php or a controller Can someone please decrypt this error for me? Here's the error code when i try to open the link: thank you! Page Not Found The requested page was not found. It may have moved, been deleted, or archived. system/core/Kohana.php [787]: The page you requested, assets/algemenevoorwaarden.pdf, could not be found. Stack Trace * Kohana::show_404( ) * system/core/Event.php [209]: call_user_func( Array ( [0] => Kohana [1] => show_404 ) ) * system/libraries/Router.php [163]: Event::run( system.404 ) * Router_Core::setup( ) * system/core/Event.php [209]: call_user_func( Array ( [0] => Router [1] => setup ) ) * system/core/Bootstrap.php [49]: Event::run( system.routing ) * index.php [106]: require( system/core/Bootstrap.php ) and this is the HTML section: <a href="<?php echo url::base(); ?>assets/algemenevoorwaarden.pdf"</a> Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/ Share on other sites More sharing options...
gwolgamott Posted February 17, 2010 Share Posted February 17, 2010 <a href="<?php echo url::base(); ?>assets/algemenevoorwaarden.pdf"</a> run some error code. Echo that php section in a test to make sure it is getting what you want. To make sure it is in fact truly echoing what you want it to. In case you need to add a "/" to that code or something may be your issue. Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013683 Share on other sites More sharing options...
taxast Posted February 17, 2010 Author Share Posted February 17, 2010 I've tried that gwolgamott, but still no succes.. the strange thing however is that it works flawlessly in localhost mode.. But when i upload to the server things get messy.. any change that the problem lies in htaccess? Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013691 Share on other sites More sharing options...
gwolgamott Posted February 17, 2010 Share Posted February 17, 2010 Maybe, but I don't know truthfully. Maybe should try to using some other method of getting your url. Could be that is the issue too the the htaccess just doesn't like your method dunno. Try using some of these fucntions to see if can get what you want as well may be an easier work around instead. cwd(); echo dirname(__FILE__); echo dirname($_SERVER['PHP_SELF']); Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013694 Share on other sites More sharing options...
taxast Posted February 17, 2010 Author Share Posted February 17, 2010 Ok, there's been a change in error.. The stack trace error is now gone, and i got this in return: This text is generated by __call. If you expected the index page, you need to use: welcome/index/o/algemenevoorwaarden.pdf any ideas? Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013696 Share on other sites More sharing options...
gwolgamott Posted February 17, 2010 Share Posted February 17, 2010 What'd u end up using to get that error? Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013706 Share on other sites More sharing options...
taxast Posted February 17, 2010 Author Share Posted February 17, 2010 changed html in: assets -> more_info (given that the controllers name is more_info.php> <a href="<?php echo url::base(); ?>more_info/algemenevoorwaarden.pdf"</a> that's the only thing actually .. Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013721 Share on other sites More sharing options...
gwolgamott Posted February 17, 2010 Share Posted February 17, 2010 <a href="<?php echo url::base(); ?>more_info/algemenevoorwaarden.pdf"</a> Ok was just curious. That error almost reads as if it's just trying to find something that isn't there or may be that it will not let you into the folder to view anything except the index page. Check that you have permissions to access that file. These errors are like the check engine lights on a car sometimes... sure something is wrong... but what ha. Btw I see something that maybe you are taking care of with the php call. Although if not then maybe that is it. The html link tag is never closed. <a href="<?php echo url::base(); ?>more_info/algemenevoorwaarden.pdf"> Something here</a>. That shouldn't cause your error though, just a note to make sure your link will work when this does run. Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013731 Share on other sites More sharing options...
taxast Posted February 17, 2010 Author Share Posted February 17, 2010 Thanks for the replies and help gwolgamott! Still trying to fix the problem, but i am a little fed up with it now.. there's always tomorrow! Link to comment https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.