{"id":5693,"date":"2014-04-05T05:32:07","date_gmt":"2014-04-05T05:32:07","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/05\/apachedocument-roottrailing-slashrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-04-05T05:32:07","modified_gmt":"2014-04-05T05:32:07","slug":"apachedocument-roottrailing-slashrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/05\/apachedocument-roottrailing-slashrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"apache,document-root,trailing-slashRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c890403b8aa522d6f42c127470a73601?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2528042<br \/>\nmysql apache solr lucene jetty<br \/>\nI trying to index my mysql table using apache solr-3.1.0 and the in built Jetty server container My data-config.xml is&lt;dataConfig&gt; &lt;dataSource type=&#8221;JdbcDataSource&#8221; driver=&#8221;com.mysql.jdbc.Driver&#8221; url=&#8221;jdbc:mysql:\/\/localhost\/lol&#8221; user=&#8221;root&#8221; password=&#8221;n&#8221;\/&gt;&lt;document name=&#8221;content&#8221;&gt; &lt;entity name=&#8221;id&#8221;&gt; query=&#8221;SELECT id from foo&#8221;&lt;\/entity&gt; &lt;\/document&gt; &lt;\/dataConfig&gt;and when i run http:\/\/localhost:8983\/solr\/dataimport?command=full-importon the browser i get thi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7616dc930d4528820539c70fb07b319b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nowlstead<br \/>\njava apache apache-httpclient-4.x<br \/>\nWe are using HttpClient 4.1.2. When we try to upload a document to the server, which is working good if we try to upload a document of size less than 2 GB, If I upload more than 2 GB document then I see the error below..java.net.SocketException: Connection reset by peer: socket write errorat java.net.SocketOutputStream.socketWrite0(Native Method)at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)at java.net.SocketOutputStream.write(SocketOutputStream.java:136)at com.sun.net.s<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7df31594f04bb3a8727ddea3e062b43a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ncmd<br \/>\njava apache ftp<br \/>\nI am attempting to use org.apache.commons.net.ftp.FTPClient to connect to a server and download some files. When I run the code on my Windows 7 machine it consistently connects and downloads the files. When I run it on an AIX box it fails 80% of the time, throwing a java.net.ConnectException, with a message of &#8220;A remote host refused an attempted connect operation&#8221;. It eventually connects if I retry often enough. If I log onto the AIX box where the FTPClient code is unable to connect consistent<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e9c0eb7cd4df67ff944ff16f363dc85d?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nHigure<br \/>\napache mod-wsgi<br \/>\nI&#8217;m trying to move my project from the development server to an Apache server.I run on a Windows 8.1 x64 machine and Python 2.7I installed Apache 2.2.25 x86 and everything went fine, the server is active; then I downloaded the precompiled mod_wsgi-3.4.ap22.win32-py2.7 (the x86 version to match the version of Apache).I moved the mod_wsgi.so into the modules folder of the Apache installation and added this line: LoadModule wsgi_module modules\/mod_wsgi.so to the httpd config; then, when I try to re<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3e75c47c5e999d83357037fbafcecb8f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGreg Whitaker<br \/>\napache activemq apache-camel<br \/>\nI have the following route:&lt;!&#8211; RC get projects &#8211;&gt; &lt;route id=&#8221;sqlRCprojects&#8221;&gt;&lt;setBody&gt;&lt;constant&gt;SELECT [No_] FROM [navview].[dbo].[job] WHERE [Project Director] = &#8216;RC&#8217;;&lt;\/constant&gt;&lt;\/setBody&gt;&lt;to uri=&#8221;jdbc:sql2005navview?readSize=0&#8243;\/&gt;&lt;split&gt;&lt;tokenize token=&#8221;,&#8221;\/&gt;&lt;setHeader headerName=&#8221;project&#8221;&gt;&lt;javaScript&gt;request.body.substring(6, (&#8220;&#8221;+request.body).length-1)&lt;\/javaScript&gt;&lt;\/setHeader&gt;&lt;to uri=&#8221;activemq:queue:test.line&#8221;\/&amp;g<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fd7fb5a87e5a604663949ecc643dc4a4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nfge<br \/>\njava apache sql-server-2008 tomcat jndi<br \/>\nThe DB is : MSSQL 2008 R2 OS= Windows Server 2008 R2Global Resource in server.xml is:&lt;Resource name=&#8221;data source name&#8221; auth=&#8221;Container&#8221; type=&#8221;javax.sql.DataSource&#8221; username=&#8221;myuser&#8221; password=&#8221;abc@xyz&#8221; driverClassName=&#8221;com.microsoft.sqlserver.jdbc.SQLServerDriver&#8221; url=&#8221;jdbc:sqlserver:\/\/host:1433;databaseName=test1;selectMethod=cursor&#8221; maxWait=&#8221;30000&#8243; maxActive=&#8221;32&#8243; maxIdle=&#8221;4&#8243; initialSize=&#8221;4&#8243; timeBetweenEvictionRunsMillis=&#8221;600000&#8243; minEvictableIdleTimeMilllis=&#8221;600000&#8243; \/&gt;&lt;\/GlobalNaming<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/36f74e0d3318a630af9ce0e356182040?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nVor<br \/>\njava apache maven release storm<br \/>\nI need to create the latest &#8220;release&#8221; from the source code on github. But having trouble doing it.here is the source code : https:\/\/github.com\/apache\/incubator-storm here is how release looks like: https:\/\/storm.incubator.apache.org\/downloads.htmlMy maven and java knowledge are very limited. I&#8217;ve tried this: mvn release:prepare but it fails with this error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project storm: Maven execution f<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/89841cf57849bbe957c155d3d68252f6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJason<br \/>\njava windows apache jdbc javabeans<br \/>\nI&#8217;m attempting to set up a windows-based FTP server using Apache FTPServer, however I keep running into the same issue whenever I use db-user-manager as opposed to the file-user-manager. We have close to 6,000 users in our database that we want to migrate over to windows, so the file-user-manager just would be inadequate (as the size would be IMMENSE). I already created the local SQL server using WAMP and set it up for Apache FTP to use, and have a script to query \/ copy \/ organize the users in<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7c72c7d52be828aee379f2a33775184b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRay Nicholus<br \/>\njava apache servlets file-upload<br \/>\nFrom my server logs, when I attempt to call getInputStream on a FileItem:6\/22\/12 14:31:14 ERROR c.s.u.WizardUploadReceiver:225 | Jumploader: Problem uploading zip13afcchr.psd &#8211; Failed to handle post properly java.io.FileNotFoundException: uploadtemp\\upload__3e026c78_13815404c62__7ff2_00000141.tmp (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method) ~[na:1.6.0_23]at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:106) ~[na:1.6.0_23]at org.ap<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/ns5DK.gif?s=32&amp;g=1\" \/><br \/>\nAjit<br \/>\njava apache vfs<br \/>\nI have installed Opennssh on my windows 7 machine, when I try to run it in debug mode using this command &#8220;sshd -ddd&#8221; it&#8217;s working fine, Problem is when I try to run it as a sshd service using this command &#8220;net start sshd&#8221; it&#8217;s running but it&#8217;s not at all responding to the client requests like when I run it in debug mode.Can Anybody help me with this issue. following is StackTrace.org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at &#8220;sftp:\/\/Ajit_k:***@bml-et-aji<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6beddf83604db885e4f17b317840d0fa?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ndoitmyway<br \/>\napache document-root trailing-slash<br \/>\nI&#8217;ve got a framework I need to work with and the server configuration file for the live version (the working one) specifies the document root like this:define(&#8216;DOCUMENT_ROOT&#8217;, $_SERVER[&#8216;DOCUMENT_ROOT&#8217;]);Now if I try running the framework on my localhost machine I keep getting a server error.HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.It doesn&#8217;t work unless I do this:define(&#8216;DOCUMENT_ROOT&#8217;, $_SERVER[&#8216;DOCUME<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/70dec572279b4d9d364921287dc528c6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1481563<br \/>\nphp document-root<br \/>\nNot sure if I&#8217;m using this the right way&#8230;include $_SERVER[&#8216;DOCUMENT_ROOT&#8217;].&#8221;\/includes\/overall\/header.php&#8221;My page is in a subdirectory, and I want to include elements from other directories with a path based on the root.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/37451dee68129266dfc1560b581a2e36?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nsomething13<br \/>\nactionscript-3 removechild document-root<br \/>\nI&#8217;ve created 4 instances of Notes and I have them moving to the right until their x value is greater than 100. Once they&#8217;re there, how do I remove them? I ran a trace statement and confirmed that the parent of these instances is root (root1 to be exact). If I typeroot.removeChild(this); I get an error saying &#8220;call to a possibly undefined method removeChild&#8221; If I typeremoveChild(this); I get an error saying &#8220;The supplied DisplayObject must be a child of the caller&#8221;. Full code is posted below. Th<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3b6c0b47a0c430a0b141baee7ea845be?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBrad Werth<br \/>\nphp file-exists document-root<br \/>\nI tried the following code to check existence of file in root.if($res[&#8216;profile_picture&#8217;]!=&#8221;&#8221; &amp;&amp; file_exists(&#8220;images\/&#8221;.$res[&#8216;users_id&#8217;].&#8221;\/thumnails\/&#8221;.$res[&#8216;profile_picture&#8217;])){$photo_p=&#8221;images\/&#8221;.$res[&#8216;users_id&#8217;].&#8221;\/thumnails\/&#8221;.$res[&#8216;profile_picture&#8217;]; }It works only on root directory not sub directory. I&#8217;m not sure whether function file_exist checks for both absolute and relative paths so I tried adding ROOT and $_SERVER[&#8216;DOCUMENT_ROOT&#8217;]. But still it didn&#8217;t worked out. Any Help?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/MGhY2.png?s=32&amp;g=1\" \/><br \/>\nhakre<br \/>\nphp function include absolute-path document-root<br \/>\nindex.php&lt;?php require_once(&#8216;fr.php&#8217;); header(&#8216;Location:&#8217;.abspath().directory()); ?&gt;fr.php&lt;?php require_once(&#8216;functions.php&#8217;); ?&gt;functions.phpfunction abspath() { return $_SERVER[&#8216;DOCUMENT_ROOT&#8217;]; }Now when i go to index.php, it gives me this error:-Fatal error: Call to undefined function abspath() in C:\\xampp\\htdocs\\index.php on line 3<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6beddf83604db885e4f17b317840d0fa?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ndoitmyway<br \/>\napache document-root trailing-slash<br \/>\nI&#8217;ve got a framework I need to work with and the server configuration file for the live version (the working one) specifies the document root like this:define(&#8216;DOCUMENT_ROOT&#8217;, $_SERVER[&#8216;DOCUMENT_ROOT&#8217;]);Now if I try running the framework on my localhost machine I keep getting a server error.HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.It doesn&#8217;t work unless I do this:define(&#8216;DOCUMENT_ROOT&#8217;, $_SERVER[&#8216;DOCUME<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>user2528042 mysql apache solr lucene jetty I trying to index my mysql table using apache solr-3.1.0 and the in built Jetty server container My data-config.xml is&lt;dataConfig&gt; &lt;dataSource type=&#8221;JdbcDataSource&#8221; driver=&#8221;com.mysql.jdbc.Driver&#8221; url=&#8221;jdbc:mysql:\/\/localhost\/lol&#8221; user=&#8221;root&#8221; password=&#8221;n&#8221;\/&gt;&lt;document name=&#8221;content&#8221;&gt; &lt;entity name=&#8221;id&#8221;&gt; query=&#8221;SELECT id from foo&#8221;&lt;\/entity&gt; &lt;\/document&gt; &lt;\/dataConfig&gt;and when i run http:\/\/localhost:8983\/solr\/dataimport?command=full-importon the browser i get thi owlstead java apache apache-httpclient-4.x We [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5693","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5693","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5693"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5693\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}