|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-06-14 15:42 UTC] gpreston at ycp dot edu
I am having problems with my include_path and auto_prepend_file in my php.ini file. I configured PHP with the follow flags: --with-mysql --with-apache=../apache_1.3.19 --with-tsrm-threads --enable-yp --enable-track-vars In my php.ini file, I have the two options set in this manner: auto_prepend_file="verifyuser.php" include_path = ".:/usr/local/apache/htdocs" Now, if I view a webpage that sits in /usr/local/apache/htdocs, it opens just fine. It can find all the files to include and I have no issues. But once I try to view a file that is located in a subdirectory of htdocs, for example, htdocs/chat/Install.html, I am given the following error through my browser: Warning: Failed opening '/usr/local/apache/htdocs/chat/Install.html' for inclusion (include_path='.:/usr/local/apache/htdocs') in Unknown on line 0 It seems to me that it is having trouble finding any file located in a subdir of 'htdocs'. Is this a bug of PHP4.0.5? I've tried experimenting to include the path of a few test subdirs with files in them into the include_path, but I still have the same error. I'm not sure exactly what's going on here. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 21:00:02 2025 UTC |
This is the contents of my auto_prepend_file, but this isn't giving me the issues: <?php if( !isset($username) ){ print "<html>\n"; print "<head>\n"; print " <title>Login</title>\n"; print "</head>\n"; print "<body>\n"; print "<p align=\"center\">\n"; print " <font size=\"+4\" color=\"red\">Please Login</font>\n"; print "</p>\n"; print "<center>\n"; print "<form action=/cgi-bin/python.py method=POST><br>\n"; print " Please enter your Username: <input type=\"text\" name=\"usrname\"><br>\n"; print " Please enter your Password: <input type=\"password\" name=\"passwrd\"><br>\n"; print " <input type=\"Submit\" value=\"Login\"><br>\n"; print "</form>\n"; print "</center>\n"; print "</body>\n"; print "</html>\n"; exit; } ?> If there is no cookie set, it will show the login form and stop the browser from showing any more of the content of the rest of the page. If there is a cookie set, then don't show the login form and show the user the actual page they wanted to see. As for a script to reproduce this problem on your end, I'm not sure that's entirely possible. From the discussions I've had with numerous people regarding this issue, the three systems that these people have seen this problem on are Solaris 7 and 8, and Sparc, all using the GCC compiler. I myself am using Solaris 7 with the GCC compiler. Now, I don't believe I can possibly give you a script to reproduce this. Simply because this is an issue with the php.ini file and the PHP interpreter, rather than a page I might have made in PHP to do a specific task/function. All I can offer as a suggestion is the following: On a Solaris 7 machine with the GCC compiler, create a file for use as your auto_prepend_file(set in php.ini), then in a subdirectory of what you set as the prefix of your web server, in my case '/usr/local/apache/htdocs/' and then put a file in a subdirectory of that and try to view it through your browser. There's no real script that I can write to show you this.