Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PDFs Have Suddenly Stopped Displaying
04-05-2017, 03:58 AM (This post was last modified: 04-05-2017 04:16 AM by sunshinelock.)
Post: #21
RE: PDFs Have Suddenly Stopped Displaying
Ok. So. I have an Ubuntu system. I just installed pcregrep. I changed the directory to my webERP on my computer and ran the following in terminal:

pcregrep -rMl '\?>[\s\n]+\z' *

This is supposed to find all whitespace and newlines.

The list returned was extensive. This is what was returned:

AccountGroups.php
AccountSections.php
AgedDebtors.php
AgedSuppliers.php
AnalysisHorizontalIncome.php
AnalysisHorizontalPosition.php
api/api_glaccounts.php
api/api_workorders.php
AuditTrail.php
AutomaticTranslationDescriptions.php
BankAccounts.php
BankAccountUsers.php
BankMatching.php
BankReconciliation.php
BOMListing.php
BOMs.php
Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
COGSGLPostings.php
CollectiveWorkOrderCost.php
CompanyPreferences.php
config.distrib.php
config.php
ConfirmDispatchControlled_Invoice.php
ConfirmDispatch_Invoice.php
ContractOtherReqts.php
Contracts.php
CopyBOM.php
Credit_Invoice.php
Currencies.php
CustItem.php
CustomerAllocations.php
CustomerBranches.php
CustomerInquiry.php
CustomerPurchases.php
CustomerReceipt.php
Customers.php
CustomerTransInquiry.php
CustomerTypes.php
DailyBankTransactions.php
DailySalesInquiry.php
DebtorsAtPeriodEnd.php
DiscountCategories.php
EDIProcessOrders.php
EDISendInvoices.php
EDISendInvoices_Reece.php
EmailConfirmation.php
EmailCustTrans.php
ExchangeRateTrend.php
FixedAssetItems.php
FixedAssetLocations.php
GetStockImage.php
GLAccountInquiry.php
GLAccountReport.php
GLBalanceSheet.php
GLJournalInquiry.php
GLJournal.php
GLTags.php
GLTransInquiry.php
GLTrialBalance.php
GoodsReceived.php
ImportBankTransAnalysis.php
ImportBankTrans.php
includes/DefineCustAllocsClass.php
includes/DatabaseTranslations.php
includes/SQL_CommonFunctions.inc
includes/smtp.php
includes/MainMenuLinksArray.php
includes/Z_POSDataCreation.php
includes/php-gettext/gettext.inc
includes/php-gettext/streams.php
includes/php-gettext/gettext.php
includes/LanguagesArray.php
includes/DefineStockTransfers.php
includes/DefineTenderClass.php
includes/DefineJournalClass.php
includes/DefineImportBankTransClass.php
includes/PO_ReadInOrder.inc
includes/PDFGrnHeader.inc
includes/PDFSalesAnalysis.inc
includes/PDFStockCheckPageHeader.inc
includes/PDFTransPageHeader.inc
includes/PDFStockLocTransferHeader.inc
includes/GetSalesTransGLCodes.inc
includes/UserLogin.php
includes/PDFQuotationPortraitPageHeader.inc
includes/GLPostings.inc
includes/PDFGLJournalHeaderCN.inc
includes/GetPrice.inc
includes/PDFAgedDebtorsPageHeader.inc
includes/PDFOrderStatusPageHeader.inc
includes/session.inc
includes/DefineSpecialOrderClass.php
includes/header.inc
includes/OutputSerialItems.php
includes/DefineOfferClass.php
includes/DateFunctions.inc
includes/PDFOstdgGRNsPageHeader.inc
includes/PDFDeliveryDifferencesPageHeader.inc
includes/PDFStarter.php
includes/RFC822.php
includes/tcpdf/include/tcpdf_static.php
includes/tcpdf/fonts/javierjp.php
includes/tcpdf/fonts/javiergb.php
includes/PDFOrderPageHeader_generic.inc
includes/PDFQuotationPageHeader.inc
includes/PDFOrdersInvoicedPageHeader.inc
includes/PDFTransPageHeaderPortrait.inc
includes/PDFSalesOrder_generic.inc
includes/ConnectDB.inc
includes/DefineSuppAllocsClass.php
includes/Add_SerialItemsOut.php
includes/EDIconfig.inc
includes/mimePart.php
includes/DefineSuppTransClass.php
InternalStockRequestFulfill.php
InternalStockRequestInquiry.php
InternalStockRequest.php
InventoryValuation.php
locale/zh_CN.utf8/Manual/ManualAPIFunctions.php
locale/zh_HK.utf8/Manual/ManualAPIFunctions.php
Locations.php
LocationUsers.php
MailingGroupMaintenance.php
MailInventoryValuation.php
MailSalesReport_csv.php
MailSalesReport.php
MRPCalendar.php
MRP.php
MRPReport.php
MRPReschedules.php
OrderDetails.php
OutstandingGRNs.php
PaymentMethods.php
Payments.php
PaymentTerms.php
PcAssignCashTabToTab.php
PcAssignCashToTab.php
PcAuthorizeExpenses.php
PcClaimExpensesFromTab.php
PcExpenses.php
PcTabs.php
PcTypeTabs.php
PDFChequeListing.php
PDFDeliveryDifferences.php
PDFDIFOT.php
PDFFGLabel.php
PDFGLJournalCN.php
PDFGLJournal.php
PDFGrn.php
PDFOrdersInvoiced.php
PDFOrderStatus.php
PDFPriceList.php
PDFQALabel.php
PDFQuotation.php
PDFQuotationPortrait.php
PDFStockLocTransfer.php
PDFWOPrint.php
PeriodsInquiry.php
PO_AuthorisationLevels.php
PO_AuthoriseMyOrders.php
PO_Header.php
PO_Items.php
PO_OrderDetails.php
PO_PDFPurchOrder.php
POReport.php
PO_SelectOSPurchOrder.php
PO_SelectPurchOrder.php
PriceMatrix.php
PricesBasedOnMarkUp.php
PricesByCost.php
Prices.php
PrintCheque.php
PrintCustOrder.php
PrintCustStatements.php
PrintCustTrans.php
PrintCustTransPortrait.php
PrintWOItemSlip.php
PurchaseByPrefSupplier.php
PurchData.php
RecurringSalesOrdersProcess.php
report_runner.php
reportwriter/WriteReport.inc
ReprintGRN.php
SalesByTypePeriodInquiry.php
SalesCategories.php
SalesGLPostings.php
SalesGraph.php
SalesInquiry.php
SalesPeople.php
SecurityTokens.php
SelectAsset.php
SelectCompletedOrder.php
SelectCreditItems.php
SelectCustomer.php
SelectGLAccount.php
SelectOrderItems.php
SelectProduct.php
SelectSalesOrder.php
SelectSupplier.php
SelectWorkOrder.php
SellThroughSupport.php
ShipmentCosting.php
Shipments.php
Shipt_Select.php
ShopParameters.php
SMTPServer.php
StockAdjustmentsControlled.php
StockAdjustments.php
StockCategories.php
StockClone.php
StockLocStatus.php
StockLocTransfer.php
StockMovements.php
StockQties_csv.php
StockReorderLevel.php
StockSerialItems.php
Stocks.php
StockStatus.php
StockUsage.php
SuppContractChgs.php
SuppCreditGRNs.php
SuppFixedAssetChgs.php
SuppInvGRNs.php
SupplierAllocations.php
SupplierContacts.php
SupplierCredit.php
SupplierGRNAndInvoiceInquiry.php
SupplierInvoice.php
Suppliers.php
SupplierTenderCreate.php
SupplierTenders.php
SupplierTransInquiry.php
SupplierTypes.php
SuppLoginSetup.php
SuppPriceList.php
SuppShiptChgs.php
SuppTransGLAnalysis.php
SystemParameters.php
TaxAuthorities.php
TaxAuthorityRates.php
TaxCategories.php
TaxGroups.php
Tax.php
TaxProvinces.php
TopItems.php
UnitsOfMeasure.php
UpgradeDatabase.php
UserBankAccounts.php
UserGLAccounts.php
UserLocations.php
UserSettings.php
WhereUsedInquiry.php
WorkCentres.php
WorkOrderCosting.php
WorkOrderEntry.php
WorkOrderIssue.php
WorkOrderReceive.php
WorkOrderStatus.php
WWW_Access.php
WWW_Users.php
Z_AutoCustomerAllocations.php
Z_ChangeBranchCode.php
Z_ChangeCustomerCode.php
Z_ChangeStockCategory.php
Z_ChangeSupplierCode.php
Z_CreateCompanyTemplateFile.php
Z_CurrencyDebtorsBalances.php
Z_CurrencySuppliersBalances.php
Z_DeleteCreditNote.php
Z_DeleteInvoice.php
Z_DeleteOldPrices.php
Z_ImportCustbranch.php
Z_ImportDebtors.php
Z_ImportFixedAssets.php
Z_ImportGLTransactions.php
Z_ImportPriceList.php
Z_ImportStocks.php
Z_ImportSuppliers.php
Z_MakeLocUsers.php
Z_MakeNewCompany.php
Z_MakeStockLocns.php
Z_poAddLanguage.php
Z_poAdmin.php
Z_poEditLangHeader.php
Z_poEditLangModule.php
Z_poEditLangRemaining.php
Z_RePostGLFromPeriod.php
Z_UpdateSalesAnalysisWithLatestCustomerData.php
Z_Upgrade_3.01-3.02.php
Z_Upgrade_3.04-3.05.php
Z_Upgrade_3.05-3.06.php
Z_Upgrade_3.07-3.08.php
Z_Upgrade_3.08-3.09.php
Z_Upgrade_3.09-3.10.php
Z_Upgrade_3.10-3.11.php
Z_Upgrade3.10.php
Z_Upgrade_3.11-4.00.php


However, I go to the very first file and open it. AccountGroups.php. I have gedit and have it set to display line numbers. I cannot see any extra whitespace or new lines after the final ?>

So, what am I supposed to erase and save? It indicates that it is a properly ending file.
I just downloaded gPHPedit and that shows all the trailing newlines. I think I have my work cut out for me stripping this clean.
Find all posts by this user
Quote this message in a reply
04-05-2017, 04:40 AM
Post: #22
RE: PDFs Have Suddenly Stopped Displaying
All the scripts would have white space in it, blank lines between code, and carriage returns at the line endings, I am not sure what you were trying to prove?

What I suggested was you take a script where you know you have problems, say PrintCustTrans.php (I don't know if that is one, but lets say it is). Check that file has nothing after the closing ?>

That script includes
includes/session.inc
includes/class.pdf.php
includes/header.inc
includes/LanguageSetup.php
includes/footer.inc
includes/PDFTransPageHeader.inc
includes/htmlMimeMail.php

Check that these scripts don't have anything after the closing ?>

Some of the above include other scripts themselves, list these out and check them, and repeat if any of those scripts had any includes.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-05-2017, 11:14 PM
Post: #23
RE: PDFs Have Suddenly Stopped Displaying
You missed what that terminal script does. It searches for newlines and white space after the final ?>. Every file listed in my post has a newline after a ?>

So, I'm manually going through 300+ files here and deleting them all.
Find all posts by this user
Quote this message in a reply
04-06-2017, 12:15 AM
Post: #24
RE: PDFs Have Suddenly Stopped Displaying
Ok, sorry I missed that. However it is still making the job much bigger than it needs to be. This only becomes a real problem when it is trying to print a PDF. That is why the suggestion I mentioned would take a few minutes and hopefully solve the issue.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-06-2017, 02:48 AM (This post was last modified: 04-06-2017 03:20 AM by sunshinelock.)
Post: #25
RE: PDFs Have Suddenly Stopped Displaying
I just manually removed ALL newlines and white space from the 300+ files in that list.

I have the exact same problem. No pdfs are generated.

So, what now?
I just downloaded the entire copy of my webERP on my server (excluding the companies folder) and just ran this pcregrep -rMl '\?>[\s\n]+\z' *

There are zero files meeting those conditions.

I think I have successfully ruled out newlines and white spaces.
Find all posts by this user
Quote this message in a reply
04-06-2017, 04:03 AM
Post: #26
RE: PDFs Have Suddenly Stopped Displaying
If you are still getting the error that white space was sent to the browser before the PDF was sent then I am at a loss.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-06-2017, 06:19 AM
Post: #27
RE: PDFs Have Suddenly Stopped Displaying
Some pages show an error. Other pages show a completely blank html page. Others show a blank pdf page. But none of my pdfs want to print.

Is there some sort of debugging script I can run?

I've been on webERP for 10 years now and can't print any statements or invoices. I just cannot run my business like this.

The invoices I can get to print html, okay. But I have no idea who owes me for March, and no statements have gone out April 1st. So this is starting to cost me some revenue at this point.
Find all posts by this user
Quote this message in a reply
04-06-2017, 06:53 AM
Post: #28
RE: PDFs Have Suddenly Stopped Displaying
Well, as a temporary measure you can locate everything on a local machine, or you could find another hosting company.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-06-2017, 11:19 PM (This post was last modified: 04-07-2017 12:13 AM by sunshinelock.)
Post: #29
RE: PDFs Have Suddenly Stopped Displaying
Those are valid options at this point. Just have the mysql server online.

At this point I'm 95% certain that it's my server's issue. (I was at 90% before I thought I should upgrade my version.)

Can I get a list of requirements for webERP to print pdfs that I can present to my hosting company?

Thank you for your assistance.
The INSTALL.txt refers to an invalid link:

http://www.weberp.org/wikidocs/Frequentl...stallation
Find all posts by this user
Quote this message in a reply
04-07-2017, 12:23 AM
Post: #30
RE: PDFs Have Suddenly Stopped Displaying
I believe I have LAMP running on my machine and installed webERP into /var/www/webERP

I entered

localhost/webERP

and come across the login screen, but my Company: dropdown box is empty. I checked config.php and it's there in the file, but not populating on the login screen.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)