kenoli_p Posted March 29, 2021 Share Posted March 29, 2021 I'm getting the error below when I run my script on my remote server. I'm providing a relative path to this file and it works on my local server (XAMPP). I've researched it a bit and I think it has to do with how I indicate the path to the file on the remote server. I don't know what to do about it, however. I hope someone can help me. The file is in the indicated directory on the remote server and there are no permissions issues that I am aware of. The mystery phrase is: include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear' --Kenoli Warning: require(bootstrap/start.php): failed to open stream: No such file or directory in /home4/ournight/public_html/tio-new/__classes/pi_admin.php on line 3 Warning: require(bootstrap/start.php): failed to open stream: No such file or directory in /home4/ournight/public_html/tio-new/__classes/pi_admin.php on line 3 Fatal error: require(): Failed opening required 'bootstrap/start.php' (include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') in /home4/ournight/public_html/tio-new/__classes/pi_admin.php on line 3 Quote Link to comment https://forums.phpfreaks.com/topic/312396-path-issue-on-remote-server/ Share on other sites More sharing options...
gw1500se Posted March 29, 2021 Share Posted March 29, 2021 What is that colon (:) in the path? Quote Link to comment https://forums.phpfreaks.com/topic/312396-path-issue-on-remote-server/#findComment-1585478 Share on other sites More sharing options...
kenoli_p Posted March 29, 2021 Author Share Posted March 29, 2021 38 minutes ago, gw1500se said: What is that colon (:) in the path? I don't have any idea. That whole phrase (include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') was assed by php. My code is: include 'bootstrap/start.php' Quote Link to comment https://forums.phpfreaks.com/topic/312396-path-issue-on-remote-server/#findComment-1585480 Share on other sites More sharing options...
mac_gyver Posted March 29, 2021 Share Posted March 29, 2021 : is the unix include path separator. it's ; on windows. is the capitalization of the path and filename in the code the same as the actual path and filename in the operating system? Quote Link to comment https://forums.phpfreaks.com/topic/312396-path-issue-on-remote-server/#findComment-1585481 Share on other sites More sharing options...
gw1500se Posted March 29, 2021 Share Posted March 29, 2021 (edited) That means it is passing 2 paths. The dot (.) is the current directory and the 2nd is an absolute path in /opt. I guess we need to see how that variable is used but I don't think it will work in a require statement. Edited March 29, 2021 by gw1500se Quote Link to comment https://forums.phpfreaks.com/topic/312396-path-issue-on-remote-server/#findComment-1585486 Share on other sites More sharing options...
Solution Barand Posted March 29, 2021 Solution Share Posted March 29, 2021 Quote Link to comment https://forums.phpfreaks.com/topic/312396-path-issue-on-remote-server/#findComment-1585488 Share on other sites More sharing options...
gw1500se Posted March 29, 2021 Share Posted March 29, 2021 No mention of multiple paths. Quote Link to comment https://forums.phpfreaks.com/topic/312396-path-issue-on-remote-server/#findComment-1585490 Share on other sites More sharing options...
kenoli_p Posted March 29, 2021 Author Share Posted March 29, 2021 1 hour ago, Barand said: using include instead of require seems to have solved the problem. thanks to all. I'll check back if it shows up again. Quote Link to comment https://forums.phpfreaks.com/topic/312396-path-issue-on-remote-server/#findComment-1585492 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.