I had a joomla 1.5 site for a couple of years on a linux cpanel - everything was running fine. Last week we moved it to a new linux server and now we have a strange problem. The general navigation etc works fine but linking to pdfs seems to have gone "Random". For example there are 4 pdf links on this page http://www.coinstreet.org/spacehire/conferencemeetings.html - they all have different links. However, for 3 of them the same pdf is downloaded (despite the different links) and one doesn't work at all - get a 406 error.
The new install was taken by doing a straight backup of the cpanel and then a re-install. All other functionality seems to be fine.
I am at a bit of a loss - so any suggestions would be gratefully received!
PS Just noticed that I see a lot of lines like this in the error logs
[Sat Mar 31 14:50:10 2012] [error] [client 65.92.86.225] File does not exist: /data03/c9566644/public_html/406.shtml, referer: http://www.coinstreet.org/images/stories/coinstreet/JDPS%20Childcare%20Assistant.pdf
don't know if that's relevant?
UPDATE
I created a test link to fred.pdf that DIDN'T exist on the server. WHen the link is clicked rather than giving an error as expected a pdf was downloaded. TUrns out that several pdfs are missing it seems and that this same file is downloaded. When I put a fred.pdf on the server then the test link worked as expected. So, where is this "Wrong" pdf coming from...
ANother update
I have now discovered that the same problem was happening on the old server... too oh boy!
Also, the mystery pdf that downloads is actually part of one of the articles on the site, turned into a pdf on the fly. If I unpublish that article then I get just a blank pdf appear. Time to look closely at the .htaccess file me thinks... anyone else got any thoughts?
I believe you have the filename typed in wrongly!
The link you have on your site:
http://www.coinstreet.org/images/stories/coinstreet/Meeting%20Space%20User%20Special%20Requirements%20Policy3.pdf
The link I used to see the PDF successfully:
http://www.coinstreet.org/images/stories/coinstreet/Meeting%20Space%20User%20Special%20Requirements%20Policy(3).pdf
Notice the ( ) around the 3
I think you are seeing the results of two different effects here:
a) Some form of incorrect encoding when the files were uploaded - clearly the spaces and extended characters in the file name are being url encoded prior to saving. I've seen ftp programs do this and I've also seen Joomla do this periodically. I don't know if cPanel backups don't sometimes do this too. Best advice I can give is to always rename files to remove spaces(swapping for hyphens) as well as stripping brackets, ampersands and exclamation marks (bangs). Train users to do likewise to avoid these issues - and check error logs periodically to pick up on anything you miss or that changes.
b) Now with your requests for the files not matching the actual filename you would expect to see 404 errors - but sometimes you get a file, not always the right one though. My guess here is that you have the apache module that attempts to match files based on misspellings - sorry can't recall the exact name off hand. A quick search shows mod_speling (mis-spelling of spelling is deliberate) is the most likely contender.
Related
I am fairly new to Docusaurus. I created my first documentation site in May 2022 with Docusaurus v2 and with a bit of trial and error (getting folder name and filenames exact etc) I managed to get it working in English and French and with versioning. During this process Docusaurus 2 upgraded several times.
Now I am trying to make two other sites and in both cases they always fall back to English when I run the locale Fr (npm run start -- --locale fr).
I have checked folder names and filenames and they all match. As a test I copied some files from the third site to the first site and they work as expected. The only way I can get French in the two new sites is to put them in the docs (English) folder. This is not ideal but is a workaround.
I am wondering if it is a bug when starting from the newer updates? However, no-one else seems to have written in with similar problems. So it may be something I am doing but I just can't see what I am doing wrong. The site I originally created has upgraded to the newest and continues to work, it is just the newer sites that were created with the updates that aren't working.
Has anyone else seen this? Any help would be much appreciated. Thanks.
Edit:
As I said, I am new to Docusaurus, so the problem was my misunderstanding of the file structure. My first working site had versioning as well two locales, so the files were correctly in a current folder. My next sites didn't have versioning so I didn't have the French in a current folder. Once the files were moved the problem was solved.
If you look carefully at the diagram (https://docusaurus.io/docs/api/plugins/#docusaurus/plugin-content-docs#i18n) it does say to put translated files in a current folder, and then it has versions folder directly below.
Whereas the English is very different. It doesn't have current and has the version files in a very separate folder.
Thanks to Joshua for his help.
Problem: Need to convert local html (with local images etc) to pdf from an AIX box running Universe 11.2.5 with System Builder
Current solution: FTP over html file to a Windows server which converts in batches and sends the e-mail to the destination
Proposed Solution: Do everything on the AIX box, from converting html to pdf and sending the e-mail.
Current problem: Unable to find a way to convert local html to PDF on the AIX box. I have been trying many different ways from trying to install Python3, but to no avail.
The only really difficult part of the process is getting the HTML to render into a format will properly display your html into pages that are suitable for printing. There is a fair amount of magic that goes on between HTTP:GET and clicking print on a browser window that needs to be accounted for.
I was trying accomplish something similar many moons ago on AIX but kind of ran into a skill level/time wall because I was going to have essentially create a headless browser to render the html. It looks like there are now some utilities that you might be able to leverage. I found this recent updated article on Super User that actually got me somewhat excited, especially since I don't use AIX anymore so precompiled binaries and well understood and easily attainable dependencies are something I can actually have in my life.
https://superuser.com/questions/280552/how-can-i-render-a-website-as-an-image-from-the-shell
Good Luck.
There seems to be several questions rolled into this one item.
Converting HTML to PDF, while that is just a data manipulation that you could do in basic, writing such code would be a large task. The option you use sending it to another system is valid, but put more points of failure into the system. I would think you could find code to do it on the AIX box.
Rocket plans on getting the MV Python to work on AIX, this will make the converting of html to PDF much easier since there are a lot of open source modules.
As for my suggestion of using sockets, that would be if you intend to send it to a service that will take the htms, and return the pdf document.
i.e. Is there a web service for converting HTML to PDF?
Once you have the pdf document, you can either store it in a UniVerse type-19 file, or do the base64 encoding and store it in UniVerse hash file.
Hope this helps,
Mike
We have a process in place built on Excel VBA that uploads a file to FTP Server. On the other side, our client downloads it. Very randomly, they complain that the file they received is blank (the file name is the same though). We then check at our end and see that the file that was uploaded was never blank. So here comes the problem: we're always arguing whether it was our error or theirs.
I figured that there might be a couple of reasons behind it but I have a few questions to ask before coming to conclusions:
If, say, the file was never uploaded (a possibility), what happens when the client runs a download process at their end? Can that download process generate a blank file with the same name as our output file? It sounds impossible to me but since the client is following up on this issue, I have to ask this silly question.
How does the mechanism work - what are the steps that happen on FTP server the moment my process completes uploading the file? I sometimes see that as soon as I upload the file, a 0kb file is created and then a second later (or less) the file with right size appears? Could it be possible that their process is running right before this actual file creation?
Thank you in advance for your help!
By default log rotate shifts file name's index on each rotation. I would like to keep names for old files. On each rotation: create new files + delete outdated.
Reason: every time I am rsycn those files with another sever, I have to download ALL file instead of simply downloading newly created ONE file and removing outdated ONE file.
Thanks
This web site and its users simply s#cks! This web site dedicated to newbie questions, which later will be replied by another group of newbies who will use google search to copy&paste reply (have no clue what they are saying) or by replying irrelevant clarification posts.
Right now we have a program that opens all of the word files in a folder and adds some information to the footer. After switching from Windows XP and Word 2003 to Windows 7 and Word 2007 we have started getting the following error:
Run-time error '5096':
EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCA
(c:\Users...\Content.MSO\8BE508C6.docx)
It occurs at random in any of the files (you can be 10 files in or 100). I thought that it might be a problem with the files being on a network drive so I modified the program to copy each file locally first, add the footer to that copy, and then copy it back out to the network. However, that didn't seem to work. I'm looking for any suggestions on how to fix the problem or possibly rewrite the solution. However, I need to keep the solution in VBA since this app is part of a bigger suite which in not ready for a .NET re-write.
As it turns out I was able to workaround this problem by copying the word files locally, running the main code on the local copies, then copying them back out to the network. It didn't seem to be working at first because the user's machine on which I tested it did not have the most recent version of the program.
Adding this note for those still looking for answers to this error...
I have a macro that creates several docs from one that is open based on sections in the main document.
I was getting the Run-time error '5096' and was an able to find any solutions that worked.
Upon further examination while debugging the code I discovered that while pulling data out of the main doc and building a file name that there was a carriage return after the file name and before the extension. After adding a replace statement to remove carriage returns I am able to process documents all day without an error.
I have found that the error is caused by the total number of characters in the file name is too long. This usually occurs when manipulating file names and the full path is set in the variable. I will manually chop pieces out of real long names to force it to work.
I suppose if I were smart, I'd move into the directory and just deal with the file names without the directory prepended to the name.