jlp09550 Posted March 4, 2009 Share Posted March 4, 2009 Okay, so I just installed a new server with lighttpd and PHP5-CGI. All of my site's custom-coded files use $_SERVER['DOCUMENT_ROOT'] to include the required files for the site. Sadly, when I'm using PHP-CGI, it has an ending trailing slash on the document root, while my original PHP did not. This causes my scripts to be thrown off and not work properly. Is there a way to change it so it does NOT include a trailing slash? Examples; With trailing slash: /home/user/public_html/ Without: /home/user/public_html Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/147837-solved-php5-cgi-document-root-changeable/ Share on other sites More sharing options...
jlp09550 Posted March 4, 2009 Author Share Posted March 4, 2009 Ah, nevermind. When the topic was moved, I thought about the server's document root--which fixed it. Sorry for having to make this topic. Quote Link to comment https://forums.phpfreaks.com/topic/147837-solved-php5-cgi-document-root-changeable/#findComment-775958 Share on other sites More sharing options...
aaryn015 Posted March 18, 2009 Share Posted March 18, 2009 Hi There, I registered just for this as I found it thru Google. This is the exact problem I am having. A dev server that returns a trailing slash, and a production server that doesn't. Can you tell me what you did to resolve the issue please? I'd like the production server to return it. Cheers Aaron Quote Link to comment https://forums.phpfreaks.com/topic/147837-solved-php5-cgi-document-root-changeable/#findComment-788057 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.