ublapach Posted October 15, 2008 Share Posted October 15, 2008 Im having problems with some code that is spost to be including a file with the require function but i get an error when i run the script heres the code and the error <?php require ("tracking/siteclas.php"); $dbh = new CEIS_DB; require ("tracking/auth.php"); $username = $_SESSION['username']; $recUser = $dbh->UserInfo($username); ?> and the error im getting is Warning: main(tracking\siteclas.php): failed to open stream: No such file or directory in /usr/home/jlytal/public_html/newsite/index.php on line 6 Fatal error: main(): Failed opening required 'tracking\siteclas.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/home/jlytal/public_html/newsite/index.php on line 6 Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/ Share on other sites More sharing options...
revraz Posted October 15, 2008 Share Posted October 15, 2008 Whats the full path to siteclas.php? Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666275 Share on other sites More sharing options...
ublapach Posted October 15, 2008 Author Share Posted October 15, 2008 ceiscorp.com/newsite/Tracking/siteclas.php Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666279 Share on other sites More sharing options...
revraz Posted October 15, 2008 Share Posted October 15, 2008 Did you try using a Cap T for Tracking? If it's a Unix server, it's case sensitive. Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666286 Share on other sites More sharing options...
Maq Posted October 15, 2008 Share Posted October 15, 2008 I think it's case sensitive, t -> T? If it's not, what directory is this include located? Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666287 Share on other sites More sharing options...
revraz Posted October 15, 2008 Share Posted October 15, 2008 I just said that and he also stated the path. Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666293 Share on other sites More sharing options...
Maq Posted October 15, 2008 Share Posted October 15, 2008 I meant where he's calling it from not the path of the file he's calling. Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666297 Share on other sites More sharing options...
revraz Posted October 15, 2008 Share Posted October 15, 2008 The error shows where it's called from /newsite/index.php Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666300 Share on other sites More sharing options...
ublapach Posted October 15, 2008 Author Share Posted October 15, 2008 its a linux sever and i have the file path right anything else that could cause this Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666306 Share on other sites More sharing options...
Maq Posted October 15, 2008 Share Posted October 15, 2008 The error shows where it's called from /newsite/index.php That's not the full path. ublapach, could you please post the full path of /newsite/index.php? Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666310 Share on other sites More sharing options...
revraz Posted October 15, 2008 Share Posted October 15, 2008 So you changed require ("tracking/siteclas.php"); to require ("Tracking/siteclas.php"); ? Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666311 Share on other sites More sharing options...
revraz Posted October 15, 2008 Share Posted October 15, 2008 Maybe you missed it /usr/home/jlytal/public_html/newsite/index.php /usr/home/jlytal/public_html/newsite/Tracking/siteclas.php Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666313 Share on other sites More sharing options...
ublapach Posted October 15, 2008 Author Share Posted October 15, 2008 yes i changed it and now instead of the error im getting a blank page Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666315 Share on other sites More sharing options...
Maq Posted October 15, 2008 Share Posted October 15, 2008 I'm an ass :-X, how did I not see that? Anyway, I don't think it's going to make a difference but try: require ("/Tracking/siteclas.php"); Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666316 Share on other sites More sharing options...
revraz Posted October 15, 2008 Share Posted October 15, 2008 Well a blank page is better, since now the page can be found. But it sounds like you have an error in your code now. You need to turn on E_ALL for error reporting. Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666317 Share on other sites More sharing options...
ublapach Posted October 15, 2008 Author Share Posted October 15, 2008 im trying to put somone elses code into this web site they just wanted a new design so i dont even know exactly how it works Link to comment https://forums.phpfreaks.com/topic/128568-php-cant-find-file-but-its-there/#findComment-666335 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.