Announcement

Collapse
No announcement yet.

PDF export is not working

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PDF export is not working

    When I export my overview to PDF I get the error message HTTP 404 Not Found: The webpage cannot be found. I've searched the Forum and I found some articles with this issue. You need to execute a command line instruction somewhere in a folder ./wkhtmltopdf-i386. However, I bought scriptcase because I only have FTP access to the production server. Therefore I cannot use these solutions (and due to Scriptcase you only need FTP access!).

    So, my question is: when will this bug be solved. I need to inform my client on this, they want to use PDF export.

    Hope to hear soon.

    Regards,

    Marcel Besteman
    (Netherlands)

  • #2
    Originally posted by marcelbesteman View Post
    When I export my overview to PDF I get the error message HTTP 404 Not Found: The webpage cannot be found. I've searched the Forum and I found some articles with this issue. You need to execute a command line instruction somewhere in a folder ./wkhtmltopdf-i386. However, I bought scriptcase because I only have FTP access to the production server. Therefore I cannot use these solutions (and due to Scriptcase you only need FTP access!).

    So, my question is: when will this bug be solved. I need to inform my client on this, they want to use PDF export.

    Hope to hear soon.

    Regards,

    Marcel Besteman
    (Netherlands)
    I'm not sure because didn't happened to me, but did you tried to configure paths in prod enviroment? I think is related.
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Marcel,

      on your server at <your projekt>/_lib/prod/third/wkhtmltopdf/linux-i386 set the file wkthmltopdf-i386 to 755 and/or ...wkthmltopdf/linux-amd64 the file wkhtmltopdf-amd64 also (this depends of your server processor).

      HTH.
      Best regards: - Reinhard -

      I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

      Comment


      • #4
        Hi,
        did you receive any updates about this very annoying problem ?? I'm still have the needing of it working as expected also in a not dedicated service.
        Run EXE file within a hosting server is , most of times, forbidden...
        Bye

        Comment


        • #5
          Originally posted by giovannino View Post
          Hi,
          did you receive any updates about this very annoying problem ?? I'm still have the needing of it working as expected also in a not dedicated service.
          Run EXE file within a hosting server is , most of times, forbidden...
          Bye
          Did you give execution permissions as Reinhard suggest?
          /Giuseppe

          Professional Scriptcase Services
          Some Customers opinions

          Comment


          • #6
            Hi,
            I put all interested directories also to 777 without any success.
            They are more than 3 years I got this problem.
            I tested on Aruba, and if I'm not wrong also on Altervista.

            Comment


            • #7
              Hi all,

              I still have the problem. On all of my environments (development, acceptance and production) I cannot export to PDF. For the development environment I've used the standard Scriptcase installer. I haven't made any modifications to path settings etc. After checking the access rights I found out that the scriptcase/prod/third/wkhtmltopdf/linux-i386 has 777 rights. (In fact all the directories below /prod/third have 777 rights).

              Now, the only difference I see with my situation compared with the comments of RHS (Reinhard) is that my third directory is not stored in <my project>/_lib/prod/ but in wwwroot/scriptcase/prod/third/. Is that an issue? These paths were created with the Scriptcase installer so I assume I should work at least on my development environment.

              Any suggestions?

              Regards,

              Marcel Besteman
              (Netherlands)

              Comment


              • #8
                I have the same issue - Linux all rights are correct. PDF never gets generated. It says it does but the file is not in the tmp folder.
                I have a windows dev environment and it does works as I have tested it. So anyone else have this issue on Linux? I believe this
                could be just a run issue on commercial linux shared hosting systems? - no rights to run a bin from the user account ?

                Any ideas?
                Last edited by jcrebel; 01-20-2015, 08:01 PM.

                Comment


                • #9
                  Try use Hoo.st, to host your projects, and/or scriptcase.

                  The pdf work! And have a great support!

                  Comment


                  • #10
                    John, you add nothing to this forum except promoting a hosting party which obviously is yours or you're working at. I'm at the point of banning you. I already had a big discussion regarding your spamming messages on my email and I still receive them.
                    Albert Drent
                    aducom software netherlands
                    scriptcase partner, reseller, support and (turn-key) development
                    www.scriptcase.eu / www.scriptcase.nl

                    Comment


                    • #11
                      If you can check your apache log or your php error logging they might reveal some more info.... I dont know how it goes with your particular server but you should normally be able to view them.

                      Comment


                      • #12
                        This is my apache log
                        [Sat Jan 24 14:20:50.535777 2015] [:error] [pid 9795] [client 2.235.120.77:51580] PHP Notice: Undefined variable: int_step in /var/www/html/prod/cmdb/grid_ci/grid_ci_gauge_ctrl.php on line 64, referer: https://xxxxxxxxxx/cmdb/grid_ci/grid...&sc_graf_pdf=S

                        [Sat Jan 24 14:20:53.691978 2015] [:error] [pid 9795] [client 2.235.120.77:51580] PHP Warning: readfile(/var/www/html/prod/cmdb/_lib/tmp/sc_pdf_20150124132046_127_grid_ci.pdf): failed to open stream: No such file or directory in /var/www/html/prod/cmdb/grid_ci/grid_ci_download.php on line 31, referer: https://xxxxxxxxxx/cmdb/grid_ci/grid...&sc_graf_pdf=S
                        Permissions are 777 to all files\subdirs in cmdb/

                        I checked the cmdb/_lib/tmp tmp dir and there is a file named sc_pdf_20150124132046_127_grid_ci.log that contains only this line:

                        ./wkhtmltopdf-amd64 --page-size Letter --orientation Portrait --header-right "[page]" --javascript-delay 2000 http://xxxxxxxxxx/cmdb/_lib/tmp/sc_g...s4aebsjq3.html /var/www/html/prod/cmdb/_lib/tmp/sc_pdf_20150124132046_127_grid_ci.pdf
                        But the file /var/www/html/prod/cmdb/_lib/tmp/sc_pdf_20150124132046_127_grid_ci.pdf doensn't get created.

                        One question: could the problem be that the current path prepended to "./wkhtmltopdf-amd64" at execution is the wrong one and an absolute path should be used instead?
                        Last edited by robydago; 01-24-2015, 10:54 AM.

                        Comment


                        • #13
                          Originally posted by robydago View Post
                          Permissions are 777 to all files\subdirs in cmdb/
                          Is not really necessary ... Look at post #3 and try that.
                          Best regards: - Reinhard -

                          I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                          Comment


                          • #14
                            From a website:
                            PHP has a directive named open_basedir which permit to limit the access on filesystem to specified directory-tree.

                            For example if you have in your php.ini:

                            open_basedir = /srv/http/:/home/:/tmp/
                            and you will access the file /filepath/filename.php, then you must set:

                            open_basedir = /srv/http/:/home/:/tmp/:/filepath/
                            otherwise PHP will not be able to access the file.

                            In this way that will allow all PHP code running on this machine to access /filepath/ directory-tree, so it is not secure for production environment. The better way is to set virtual-host based open_basedir in httpd.conf. I let you check your HTTP server documentation and also open_basedir documentation for that.

                            From another website:
                            set default permission to u r directory (i.e rwx) using setfacl command

                            ex: setfacl -d -m o::rwx your/directory/path
                            then any thing u create in that directory it takes rwx permission.

                            Comment


                            • #15
                              Just checked my system php.ini and [open_basedir] directive was remmed out
                              Added the apache www root to it, restarted apache, but to no avail.

                              I just retested it in the following scenario:
                              • SC8 installed on Centos 7 via the NettMake provided automatic installer for Linux.
                              • App created
                              • App tested by running it directly from SC and it can export to PDF
                              • App is deployed on the same server via SC "Deploy on a server directory" option (target directory is outside scriptcase /opt/NetMake/v8 root)
                              • Permissions reset to 777 to the whole dir tree of the deployed app <-- this is full access to everyone, so AFAIK no other permission level can "improve" it
                              • Deployed app is used via Centos standard apache install on the same server and everything seems to wok fine and is now able to create a PDF file, but... the PDF file contains only the following line:
                                "You don't have permission to access
                                /cmdb/_lib/tmp/sc_grid_site_html_0lh4hbtjvehono69s86o563n25.html on this server."

                              File /var/www/html/prod/cmdb/_lib/tmp/sc_grid_site_html_0lh4hbtjvehono69s86o563n25.html actually does exist and its permission level is 777!
                              But I wonder if by using /cmdb... it means it's looking for a cmdb dir located in the file system root (/).
                              In that case the error description is misleading because that dir doesn't exist in the root as it's actually inside my apache root (/var/www/html/prod/cmdb).
                              So I still wonder if there's an absolute\relative path issue.
                              If not, I have no idea...
                              Last edited by robydago; 01-26-2015, 07:49 AM.

                              Comment

                              Working...
                              X