cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Analyst Nation Moderator
Analyst Nation Moderator

Print From URL not finding documents

 I trying to get print from URL working but it does not find any documents. 

 

I can see the documents if I browse the URL so I don't think it's a .htaccess issue but just in case, I created a .htaccess file to allow directory browsing. I can still see the documnts in a browser but Print from URL does not find anything. 

 1-13-2015 3-36-25 PM.png

The server weblogs show the device accessing the server and there are no errors in the apaches error log.

log.png

 

Thanks,

Tony

0 Kudos
12 Replies
Highlighted
Xerox Employee
Xerox Employee

Re: Print From URL not finding documents

The site was originally developed against the IIS server format.  I think it's having trouble parsing your page since its using a slightly different format and the parsers can't work through it.  For example the HTML for your page is 

<html>
 <head>
  <title>Index of /vegas</title>
 </head>
 <body>
<h1>Index of /vegas</h1>
<ul><li><a href="/"> Parent Directory</a></li>
<li><a href="AppStudio/"> AppStudio/</a></li>
<li><a href="SFTFS-28UA.pdf"> SFTFS-28UA.pdf</a></li>
</ul>
<address>Apache Server at www.sohowebhosts.com Port 80</address>
</body></html>

 Whereas the IIS would look like 

<html><head><title>localhost - /</title></head><body><H1>localhost - /</H1><hr>

<pre> 
<A HREF="/">[To Parent Directory]</A><br>
1/11/2015 11:44 AM        &lt;dir&gt; <A HREF="/AppStudio//">AppStudio/</A><br>
1/13/2015  8:17 PM          168 <A HREF="/SFTFS-28UA.pdf">SFTFS-28UA.pdf</A><br>
</pre><hr></body></html>

 Notice the lack of BR to separate the files whereas apache is using an unordered list.  The problem with Apache's directory listings is that there are some modules out there that make everything look pretty and they break the app.  I'd check the modules you have installed and see if you can disable them.  In particular there's mod_autoindex.  I'd see if you can disable that if you're using it.

 

0 Kudos
Highlighted
Xerox Employee
Xerox Employee

Re: Print From URL not finding documents

Okay I think you need to add this to your "httpd-autoindex.conf" file

 

IndexOptions FancyIndexing HTMLTable VersionSort NameWidth=*

 I basically erased all the contents of mine and have this one line in that file.  Now my output is 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
 <head>
  <title>Index of /</title>
 </head>
 <body>
<h1>Index of /</h1>
  <table>
   <tr><th valign="top">&nbsp;</th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
   <tr><th colspan="5"><hr></th></tr>
<tr><td valign="top">&nbsp;</td><td><a href="0023_m.jpg">0023_m.jpg</a></td><td align="right">2006-10-14 17:48  </td><td align="right"> 30K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="0044_m.jpg">0044_m.jpg</a></td><td align="right">2006-10-14 17:48  </td><td align="right"> 24K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="0065_m.jpg">0065_m.jpg</a></td><td align="right">2006-10-14 17:49  </td><td align="right"> 31K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="2gx3cix.jpg">2gx3cix.jpg</a></td><td align="right">2008-07-26 13:33  </td><td align="right">200K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="4ODS4WONZ3WE43TKB66VE4TBCX2TNGKH.jpeg">4ODS4WONZ3WE43TKB66VE4TBCX2TNGKH.jpeg</a></td><td align="right">2008-05-13 02:57  </td><td align="right"> 83K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="7PW6QFVR77UOWNPRRV3YJ2DDUBVYHAT3.jpeg">7PW6QFVR77UOWNPRRV3YJ2DDUBVYHAT3.jpeg</a></td><td align="right">2008-05-13 01:54  </td><td align="right"> 38K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="7TKO3A2ISTRZLXE6JQN3RXO25SZLXSZY.jpeg">7TKO3A2ISTRZLXE6JQN3RXO25SZLXSZY.jpeg</a></td><td align="right">2008-05-13 01:51  </td><td align="right"> 63K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="10-1.jpg">10-1.jpg</a></td><td align="right">2008-04-08 22:16  </td><td align="right">8.8K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="New%20Folder%20(2)/">New Folder (2)/</a></td><td align="right">2015-01-13 21:30  </td><td align="right">  - </td><td>&nbsp;</td></tr>
   <tr><th colspan="5"><hr></th></tr>
</table>
</body></html>

 

 

0 Kudos
Highlighted
Analyst Nation Moderator
Analyst Nation Moderator

Re: Print From URL not finding documents

As this is a shared server I can't make changes to the apache.conf file. I can use .htaccess however.

I created a new server cloudscanstation.com and edited the .htaccess file to include your suggestions. There are no other options in the .htaccess file. What you see bleow is the only code in the file.

Options +Indexes
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing HTMLTable NameWidth=* VersionSort 
</IFModule>

Here is the resulting HTML to show the response in tab form versus a list as it was before but I still can see the documents.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
 <head>
  <title>Index of /forms</title>
 </head>
 <body>
<h1>Index of /forms</h1>
<table><tr><th>&nbsp;</th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top">&nbsp;</td><td><a href="/">Parent Directory</a></td><td>&nbsp;</td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="App%20Studio%20FAQ%2009_2014.pdf">App Studio FAQ 09_2014.pdf</a></td><td align="right">19-Jan-2015 10:10  </td><td align="right">893K</td><td>&nbsp;</td></tr>
<tr><th colspan="5"><hr></th></tr>
</table>
<address>Apache Server at cloudscanstation.com Port 80</address>
</body></html>

 

When I use a local apache server I can see the documents and the code is also in a tab format.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
 <head>
  <title>Index of /forms</title>
 </head>
 <body>
<h1>Index of /forms</h1>
  <table>
   <tr><th valign="top"><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
   <tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/back.gif" alt="[PARENTDIR]"></td><td><a href="/">Parent Directory</a></td><td>&nbsp;</td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top"><img src="/icons/layout.gif" alt="[   ]"></td><td><a href="test.pdf">test.pdf</a></td><td align="right">2015-01-21 08:50  </td><td align="right">  0 </td><td>&nbsp;</td></tr>
   <tr><th colspan="5"><hr></th></tr>
</table>
<address>Apache/2.4.7 (Ubuntu) Server at 192.168.1.40 Port 80</address>
</body></html>

 Any other thoughts?

 

Feel free to look me up in the Xerox global directory (Panos, Anthony)  if you want access to the server. Once this is working, my team will be using it for some external demonstrations.

 

Thanks,

Tony

0 Kudos
Highlighted
Xerox Employee
Xerox Employee

Re: Print From URL not finding documents

Maybe you made a typo, what's the issue?  You said it's working in both cases.  I did test your 

Options +Indexes
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing HTMLTable NameWidth=* VersionSort 
</IFModule>

  and it was working for me.  If the second case isn't working I think it's cause of the img tag for the fancy indexing.  You need to remove the icons.

0 Kudos
Highlighted
Analyst Nation Moderator
Analyst Nation Moderator

Re: Print From URL not finding documents

Sorry I was not clear in my above description. It is not working with http://cloudscanstation.com/forms. The server is located at a shared hosting provider so I'm not able to edit the apache.conf directly. I was able to change the .htaccess to include the IndexOptions and it chaged the code to the tabbed format versus the list format. Unfortunately, while the app connects to the server it does not show any documents. It's not a typo as I did a cut and paste out of the browser to make sure.

 

The code with the icon tags is from my local server with apache. When configured to the local server, it works fine. The only difference I saw between the local server and the other one is icon tags so I'm not sure what's going on.

 

 

 

 

 

 

 

 

0 Kudos
Highlighted
Xerox Employee
Xerox Employee

Re: Print From URL not finding documents

When I create an app using your site I get a runtime error (see below)issue.jpg

 

It doesn't like your URL, I thought the lack of a www might be the cause but that doesn't appear to be the issue.   I tried to use the IP but that is blocked by your hosting method it appears. I then tried it with www.cloudscanstation.com and that didn't work either from the MFD.  I took the HTML from your page and hosted that and the device displayed it correctly so it's definately something with the hosting setup more than the Apache output.

0 Kudos
Highlighted
Analyst Nation Moderator
Analyst Nation Moderator

Re: Print From URL not finding documents

The invalid address error will always apper if there is a trailing slash added to the AppStudio URL. For exmaple: http://cloudscanstation.com/forms/ will fail but http://cloudscanstation.com/forms will not give the error. This has happened to me on any apache site that I have tested with.

 

I ran a network trace and I can see the device login, give the screen size and it is sent the html so i'm not sure whats going on there.

 

Can you try without the trailing backslash and see what result you get? I know I'm not the only one that is going to run into this so I'd love to figure this out. We have tons of our agent partners using shared hosting sites.

 

Thanks,

Tony

0 Kudos
Highlighted
Xerox Employee
Xerox Employee

Re: Print From URL not finding documents

That's weird cause on my Apache server I use "http://localhost:3000/test/" and it works without an issue.  I did what you said and I don't get that error but I don't get any files to print either.

0 Kudos
Highlighted
Analyst Nation Moderator
Analyst Nation Moderator

Re: Print From URL not finding documents

None of my apache servers will accept the trailing / in app studio but they accept it from the browser. I figured it was an app studio thing. During troubleshooting I used curl to see what the respons was.

 

When not using the trailing / - See get a 301 error -

ubnt@unifi:~$ curl cloudscanstation.com/forms
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://cloudscanstation.com/forms/">here</a>.</p>
<hr>
<address>Apache Server at cloudscanstation.com Port 80</address>
</body></html>

 

There is no 301 error when putting the trailing /

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
 <head>
  <title>Index of /forms</title>
 </head>
 <body>
<h1>Index of /forms</h1>
<table><tr><th>&nbsp;</th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top">&nbsp;</td><td><a href="/">Parent Directory</a></td><td>&nbsp;</td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="AppStudioFAQ09_2014.pdf">AppStudioFAQ09_2014.pdf</a></td><td align="right">19-Jan-2015 10:10  </td><td align="right">893K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="deploying-vyatta-core-firewall_33493.pdf">deploying-vyatta-core-firewall_33493.pdf</a></td><td align="right">21-Jan-2015 17:50  </td><td align="right">751K</td><td>&nbsp;</td></tr>
<tr><th colspan="5"><hr></th></tr>
</table>
<address>Apache Server at cloudscanstation.com Port 80</address>
</body></html>

 

Does it mean there is an issue with the trailing /?

 

EDIT: Personally, I think it's how the App is parsing the data when it comes back. I ran packet captures and they both appear to be successful.  I tried adding them here but it did not allow me to post them.

 

 

 

Tony

 

 

0 Kudos