Topic: The file is damaged and could not be repaired

I get this message from acrobat, when I try to print a report in Reports and Analysis, Stock Check Sheets. Your demo http://fa2.iron.from.pl/ works fine, However when I use the demo it uses Rep303, and when I use the same report on my system, it uses Rep301
What do you think my problem is?

I have loaded the latest code, but maybe I messed something?

AM

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: The file is damaged and could not be repaired

I reloaded the reporting folder and got the Rep303, and Rep301 sorted out

But I still get the (The file is damaged and could not be repaired) message, but I do not get it on your demo, or on my local using wamp5.

Could there be something with my host?

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: The file is damaged and could not be repaired

No idea. You can turn debug on and check if there are some errors or warnings in the PDF source sent.

Re: The file is damaged and could not be repaired

Wow that was weird, after turning on debug and getting my print, then going back and turning it off, the report prints just fine.

Who knew!

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

5 (edited by alvin 07/25/2008 03:45:52 am)

Re: The file is damaged and could not be repaired

Well it worked for just one report, now it quit working again, and I can not dupe what it just did to print a good report.

OK back again, I don't know what the problem was, but I deleted all my scripts and uploaded a new set, and all is working for know.

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: The file is damaged and could not be repaired

OK I am back today, with problems, my error is back,  After a script reload I was able to print a report fine, that was it, back to the error, the reports are generated just fine and stored in the company pdf folder, they are good files, as I can go get them manually,

I have tried this with FF, IE, and two different computers, the result is the same.

What do you think I should try here?

AM

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: The file is damaged and could not be repaired

It seems you have broken something in apache or php configuration - all pdf reports are truncated to  about 1667 bytes. Check the respective logs. Anyway it is not FA related issue.

Janusz

Re: The file is damaged and could not be repaired

Janusz

I have just gotten word back from tech support on this issue (see bellow)  I could also send you a copy of the php.ini file, if that would help.

Please let me know what you think, thanks, AM

Dear Alvin Martin,

Thanks for using our services.

I've just checked your issue and it seems to be a coding issue. Because it seems your php application cannot read full pdf file and therefore showing error message. Please try to contact with your developers and ask them to check this from their end and if something need to be changed in php configuration, you can edit php.ini file, which located inside your cgi-bin folder.

Should you have any further questions, please feel free to contact us anytime, we are available 24/7.
Kind regards,

Alex Karamushko

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: The file is damaged and could not be repaired

Hello Alvin,

We have checked this and all seems work right everywhere but on your installation. If all the source is intact with CVS, all idea I have is any error in site configuration.
So please play with the mentioned php.ini file.

Janusz

PS One thing just have been eliminated - this is not  browser side problem.

Re: The file is damaged and could not be repaired

Janusz

I looked over the php.ini and did a text diff with the php.ini on my local, everything seems normal to me.  Take a quick look and and see if you can spot something:

[PHP]
  engine = 1
  zend.ze1_compatibility_mode =
  short_open_tag = 1
  asp_tags =
  precision = 14
  y2k_compliance = 1
  output_buffering = 4096
  zlib.output_compression =
  implicit_flush =
  unserialize_callback_func =
  serialize_precision = 100
  allow_call_time_pass_reference =
  safe_mode =
  safe_mode_gid = 1
  safe_mode_include_dir =
  safe_mode_exec_dir =
  safe_mode_allowed_env_vars = PHP_
  safe_mode_protected_env_vars = LD_LIBRARY_PATH
  disable_functions =
  disable_classes =
  highlight.string = #DD0000
  highlight.comment = #FF9900
  highlight.keyword = #007700
  highlight.bg = #FFFFFF
  highlight.default = #0000BB
  highlight.html = #000000
  expose_php = 1
  max_execution_time = 600
  max_input_time = 600
  memory_limit = 64M
  error_reporting = 6135
  display_errors =
  display_startup_errors =
  log_errors = 1
  log_errors_max_len = 1024
  ignore_repeated_errors =
  ignore_repeated_source =
  report_memleaks = 1
  track_errors =
  html_errors =
  error_log = /hsphere/local/var/httpd/logs/php_error.log
  variables_order = GPCS
  register_globals = off
  register_long_arrays = 1
  register_argc_argv = 1
  post_max_size = 16M
  magic_quotes_gpc = off
  magic_quotes_runtime = off
  magic_quotes_sybase =
  auto_prepend_file =
  auto_append_file =
  default_mimetype = text/html
  always_populate_raw_post_data = 1


;***** Added by go-pear
include_path=".:/hsphere/shared/php5/share/pear:/hsphere/shared/apache/libexec/php5ext/php/"
;*****

  doc_root =
  user_dir =
  extension_dir = /hsphere/shared/apache/libexec/php5ext/
  cgi.fix_pathinfo = 1
  file_uploads = 1
  upload_tmp_dir =
  upload_max_filesize = 16M
  allow_url_fopen = 1
  default_socket_timeout = 60
  auto_detect_line_endings = 1
[Syslog]
  define_syslog_variables =
[mail function]
  sendmail_path = /usr/sbin/sendmail -t -i
  mail.force_extra_parameters =
[SQL]
  sql.safe_mode =
[ODBC]
  odbc.allow_persistent =
  odbc.check_persistent = 1
  odbc.max_persistent = -1
  odbc.max_links = -1
  odbc.defaultlrl = 4096
  odbc.defaultbinmode = 1
[MySQL]
  mysql.allow_persistent =
  mysql.max_persistent = -1
  mysql.max_links = -1
  mysql.default_port = 3306
  mysql.default_socket = /var/lib/mysql/mysql.sock
  mysql.default_host = localhost
  mysql.default_user =
  mysql.default_password =
  mysql.connect_timeout = 60
  mysql.trace_mode =
[PostgresSQL]
  pgsql.allow_persistent =
  pgsql.auto_reset_persistent =
  pgsql.max_persistent = -1
  pgsql.max_links = -1
  pgsql.ignore_notice = 0
  pgsql.log_notice = 0
[dbx]
  dbx.colnames_case = lowercase
[bcmath]
  bcmath.scale = 0
[Session]
  session.save_handler = files
  session.use_cookies = 1
  session.name = PHPSESSID
  session.auto_start = 0
  session.cookie_lifetime = 0
  session.cookie_path = /
  session.cookie_domain =
  session.serialize_handler = php
  session.gc_probability = 1
  session.gc_divisor = 10
  session.gc_maxlifetime = 1440
  session.bug_compat_42 = 0
  session.bug_compat_warn = 1
  session.referer_check =
  session.entropy_length = 0
  session.entropy_file =
  session.cache_limiter = nocache
  session.cache_expire = 180
  session.use_trans_sid = off
  session.hash_function = 0
  session.hash_bits_per_character = 5
  url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[Assertion]
  assert.active = 1
  assert.warning = 1
  assert.bail =
  assert.callback =
  assert.quiet_eval = 0
[Sockets]
  sockets.use_system_read = 1
[mbstring]
  mbstring.language = Japanese
  mbstring.internal_encoding = EUC-JP
  mbstring.http_input = auto
  mbstring.http_output = SJIS
  mbstring.encoding_translation =
  mbstring.detect_order = auto
  mbstring.substitute_character =
  mbstring.func_overload = 7
[exif]
  exif.encode_unicode = ISO-8859-15
  exif.decode_unicode_motorola = UCS-2BE
  exif.decode_unicode_intel = UCS-2LE
  exif.encode_jis =
  exif.decode_jis_motorola = JIS
  exif.decode_jis_intel = JIS
[soap]
  soap.wsdl_cache_enabled = 1
  soap.wsdl_cache_dir = /tmp
  soap.wsdl_cache_ttl = 86400


[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
zend_optimizer.version=3.3.0a
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: The file is damaged and could not be repaired

OK, got that one figured out, by accident,

The problem is in that php.ini file above,  you see at one time I had a script that required I have access to my php.ini file on my hosted, so what they do is move it to your cgi folder so you have access to it.  When I discovered that my scripts worked fine under another domain on the same server I started to look a little closer, I renamed my php.ini file that is in my cgi folder and all is fine at least for fa,  I will look more at is later,  but if anyone sees anything in that file above let me know?  But no big deal. If I use the script that needs that php.ini file I will just put it in a sub domain.

Thanks for all the help.

AM

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.