Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to export the tickets #5303

Open
umisuhanarahman opened this issue Dec 24, 2019 · 95 comments
Open

Unable to export the tickets #5303

umisuhanarahman opened this issue Dec 24, 2019 · 95 comments

Comments

@umisuhanarahman
Copy link

exportxerror

Server Information
osTicket Version v1.14.1 (f1e9e88) — Up to date
Web Server Software Apache
MySQL Version 10.2.29
PHP Version 7.3.12

Hello, can you assist me how to solve this. I cannot export my tickets to csv because when I click on the export button the pop up goes blank just like the picture above. What I need to do to able to export the ticket csv file?

My console show this "Failed to load resource: the server responded ajax.php/export/10kUeB/check:1 with a status of 404 () "

Plus, I checked that there is no error in any logs.

permission

I also check all the permission for class.export.php file.

On the other hand, I already tried use the export function in the v1.12.5 which is the older version and the export function run smoothly but it won't do the same in this latest version.

I hope anyone could help me to solve this. Thank you in advance!

@JediKev
Copy link
Contributor

JediKev commented Dec 24, 2019

@umisuhanarahman

Check the permissions of the temp directory. PHP will create a file in the temp directory to write the data and then reads from the file to send the data to the browser for download or to email the file to you. Maybe PHP is struggling to read from the file or is struggling to check the status of the export?

Cheers.

@gtao725
Copy link

gtao725 commented Dec 26, 2019

I have the exact same issue but a little different, for me this only happens from Agent Panel->Users->Organizations->Choose Any Organization->Tickets->Export. I am also on 1.14.1 upgraded from 1.12.5 (it worked fine in that version). Is there a fix or temporary workaround to this? It is the end of the month and we need to generate customer billing info based on per-organization basis. Pls kindly help! Thanks in advance!

@umisuhanarahman
Copy link
Author

umisuhanarahman commented Dec 26, 2019

@JediKev

permission

Is this the correct temp folder that you meant? I already gave all permissions
but the problem isn't solve.

If I'm wrong, where can I find the temp directory?

Thanks.

@ntozier
Copy link
Contributor

ntozier commented Dec 26, 2019

No one here can tell you where your temp folder is located. You would have to consult your php.ini to locate your temp directory.

If you do not know where your php.ini is located, then you can create a file in your website root folder (give it any name you want, like delme.php) and in it put
<?php phpinfo(); ?>

Then browser to it with with your web browser. It should tell you where your php.ini is located as well as where your temp folder is located.

@JediKev
Copy link
Contributor

JediKev commented Dec 26, 2019

@gtao725

Do you see any errors in your Apache error logs, PHP error logs, browser console, or osTicket System Logs? Also, have you checked your permissions for PHP’s temp directory?

Cheers.

@gtao725
Copy link

gtao725 commented Dec 27, 2019

@JediKev

Answers to your questions:

  1. osTicket System Logs - all good, nothing out of ordinary, error level set to DEBUG so I see everything.
  2. PHP Temp Dir for me is set to: sys_temp_dir = "/tmp", permission for /tmp is 777 and owned by root.
  3. Apache log for the per organization ticket export operation returns this error (500 error on the very last export operation. The operations preceeding the very last returns 200 so they are ok.):

210.22.112.50 - - [27/Dec/2019:11:03:28 +0800] "GET /scp/orgs.php?_pjax=%23pjax-container HTTP/1.1" 200 12174 "https://support.jetservices.com.cn/scp/users.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
210.22.112.50 - - [27/Dec/2019:11:03:29 +0800] "GET /scp/orgs.php?id=2&_pjax=%23pjax-container HTTP/1.1" 200 9202 "https://support.jetservices.com.cn/scp/orgs.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
210.22.112.50 - - [27/Dec/2019:11:03:34 +0800] "GET /scp/orgs.php?_pjax=%23pjax-container HTTP/1.1" 200 12174 "https://support.jetservices.com.cn/scp/orgs.php?id=2" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
210.22.112.50 - - [27/Dec/2019:11:03:35 +0800] "GET /scp/orgs.php?id=4&_pjax=%23pjax-container HTTP/1.1" 200 19186 "https://support.jetservices.com.cn/scp/orgs.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
210.22.112.50 - - [27/Dec/2019:11:03:38 +0800] "GET /scp/ajax.php/orgs/4/tickets/export HTTP/1.1" 500 - "https://support.jetservices.com.cn/scp/orgs.php?id=4" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"

  1. PHP not generating any errors as nothing is written to my /var/log/php.log (custom php error log and error logging is turned on in php).

So I am very lost as to what is causing this. Pls help!

Cheers!

@umisuhanarahman
Copy link
Author

@JediKev @ntozier

Thank you for your help to find temp directory. I already found the path in php.ini file as below

php ini

I had given all the permission to all the temp directories as stated in the path "/var/cpanel/php/sessions/ea-php72" and I had set all the file and directories as default permissions, but the problem still doesn't solve.

What else can I do next?

Thanks.

@ntozier
Copy link
Contributor

ntozier commented Dec 27, 2019

Your screen shot does not appear to show the temp directory... The temporary directory directive is upload_tmp_dir. session.save_path is the directory where PHP stores session details.

@gtao725
Copy link

gtao725 commented Dec 28, 2019

Also set my upload_tmp_dir = "/tmp", rebooted server as well. Double checked persmission for /tmp and it still is the 777 permission but the problem STILL exists unfortunately. I seriously do not think it's the permissions since a previous version of osTicket worked flawlessly.......

@JediKev
Copy link
Contributor

JediKev commented Dec 28, 2019

@gtao725

The exporter was completely changed in 1.14.x. In 1.12.x and below the system builds the export and pushes the data directly to the browser for download all in the same request which was obviously not too great as it caused timeouts on large exports. In 1.14.x the system builds the export in a temp file in the background and makes repeated AJAX requests every X seconds to check the status of the export, if the export takes a long time the system sends the export in an email to the address associated with your Agent account. It also has a button on the "Please Wait" window to email the export if you don’t feel like waiting.

With all this being said, the issue seems to stem from when it checks the status of the export (at least in the cases we have been given debug results). When it checks the status it first checks the session for an export by a particular ID (each export has its own unique ID in case you have multiple exports going on) and a file within that particular export. If it has both of those things it tries to create an Exporter object and return it to the subsequent methods. So it might be the system having issues saving the export object in the session, or maybe having issues constructing an Export object in PHP, or having issues reading the temp file, or having issues locking/checking the lock on the temp file, etc. We can’t really tell yet as we can’t replicate the issue in house. If you or anyone can provide any helpful debug information we can hopefully get this resolved.

I’d start by going to include/class.export.php to the Exporter::load() function (around line 556) and do a var_dump() of the session to see if it has the export object and the file within it.

Cheers.

@gtao725
Copy link

gtao725 commented Dec 28, 2019

ok thx, I will try turn on debug info inside php.ini as well to see if it throws anything onscreen.,

@umisuhanarahman
Copy link
Author

@ntozier @JediKev

I'm sorry for the wrong file but I already found the temp directory which is '/tmp' and it had all the permissions = 777 but the problem doesn't solve too. For the debug info you said earlier, I did the var_dump and get the results as below:

var_dump

From the screenshot above, I think the export object is already there right?
So how is it?

Thanks.

@JediKev
Copy link
Contributor

JediKev commented Dec 30, 2019

@umisuhanarahman

So, for your case you can see No such export is being returned which the check responsible for this is here. The issue is either the system cannot load the Exporter instance (via Exporter::load($id)) or the Exporter is not available (via $exporter->isAvailable() which means PHP's built-in file_exists() method fails when checking the temp file; in the case above it was /tmp/24jgxxxx).

You can see if the Exporter instance is being loaded by putting var_dump($exporter); in include/class.export.php on line 576. If you get an Exporter instance of CsvExporter then the exporter is created and you know it's failing on PHP's file_exists() method.

Cheers.

Edit:

If file_exists() is causing issues (not Exporter::__construct or Exporter::getFile()) I'm curious if putting the following in include/class.export.php on line 396 would solve the issue?

     function isAvailable() {
         clearstatcache();

If you are having issues with the file_exists() method, try the above and let me know if it resolves the issue.

@umisuhanarahman
Copy link
Author

umisuhanarahman commented Dec 31, 2019

@JediKev

Thanks for the reply sir. I did what you said to put var_dump($exporter); in include/class.export.php on line 576 but nothing appear on the screen. Then, I try place the code on the other line which is on line 565 and this is the output

565

Plus, I also tried to put on line 588 just to make sure is it true that the exporter is NULL and this is the output on screen.

588

So, both show that the exporter was NULL. I think the first possibility that you mention is the issue which is the system cannot load the Exporter instance (via Exporter::load($id)). But, this is just my thought, please correct me if I'm wrong. I'm not sure that the var_dump($exporter) output is true because I put in other line. If it is true, what I need to do to fix the issue? In your previous reply you give the solution for the second possibility only.

Besides, I had tried your code for
If file_exists() is causing issues (not Exporter::__construct or Exporter::getFile()) I'm curious if putting the following in include/class.export.php on line 396 would solve the issue?

 function isAvailable() {
     clearstatcache();

I try it just to see if something happen but nothing different thing appears.

So, what can I do next, sir? I'm looking forward for your reply and really appreciate your help.

Happy New Year and Thanks.

@umisuhanarahman
Copy link
Author

@JediKev @ntozier

Hello sir, I want to follow up about my previous reply. So how the solution I could do to solve this issue. I hope you can help me. Your reply means a lot.

Thanks.

@JediKev
Copy link
Contributor

JediKev commented Jan 3, 2020

@umisuhanarahman

Now you should go to the Exporter::load() function again and this time put var_dump($id, $info, $class); on line 572 and put var_dump($ex); after } catch (Exception $ex) {. The first will confirm you have an ID, the info, and the class to instantiate. The second will show you an Exception if there was an issue creating the new instance. Please post both results here.

Cheers.

@umisuhanarahman
Copy link
Author

umisuhanarahman commented Jan 3, 2020

@JediKev

Hello sir,

I did what you told me to do. And this is the output:

a) var_dump($id, $info, $class); on line 572

var_dump($id, $info, $class);

b) put var_dump($ex); after } catch (Exception $ex) {

var_dump($ex)

Why both of them got almost the same output and only the second parameter was different and change in every try? What can you conclude from this output?

Thanks.

@umisuhanarahman
Copy link
Author

@JediKev

Hello sir.

Regarding to my previous reply, what can I do next sir? Looking forward to hear your idea of solution to fix this issue!

Thanks.

@umisuhanarahman
Copy link
Author

@JediKev @ntozier

Hello sir, is it there is no other solution that you could give to me? Does the labels mean there is nothing you could help to solve this issue? I really need to use this function. Looking forward for any solution from osTicket team on this issue. I hope osTicket team could debug this problem and release the new version that fix those issues because I realized that's not just me who got this problem. There's many people facing the same problem on the latest version of osTicket v1.14.1 that you can see from discussion in osTicket forum. Appreciate to hear your updates soon.

Thanks.

@JediKev
Copy link
Contributor

JediKev commented Jan 7, 2020

@umisuhanarahman

Hello sir, is it there is no other solution that you could give to me? Does the labels mean there is nothing you could help to solve this issue?

The labels just mean we do not know the cause and we need to review this again. We cannot replicate this issue in house so it's very difficult to make a patch. We will continue to assist you in debugging the issue as best as we can.

Regarding to my previous reply, what can I do next sir?

First, remove all previous var_dump statements as these just cloud the current dumps. Next, you can go to the Exporter::load() function and put:

$info = $_SESSION['Exports'][$id];
$class = $info['class'];
$exporter = new $class(array('id' => $id) + $info);
var_dump('ID: ', $id, 'Info: ', $info, 'Class: ', $class);
var_dump('Exporter: ', $exporter);

.. before/above try {. Once the changes are made and saved, try to export again and post the results back here.

Cheers.

@umisuhanarahman
Copy link
Author

@JediKev

I did remove all the previous var_dump statements and put those code in the Exporter : : load():

code

But, it doesn't solve the issue and the output was still the same:

again

So, how is it sir?

Thanks.

@JediKev
Copy link
Contributor

JediKev commented Jan 8, 2020

@umisuhanarahman

Of course it’s not going to address the issue, this is just the debugging stage. We have to figure out what the issue is before we can fix it.

Above if (!isset($_SESSION['Exports'][$id]) put:

var_dump('ID: ', $_SESSION['Exports'][$id], 'File Exists: ', file_exists($_SESSION['Exports'][$id]['file']));

I have a feeling your PHP is having issues reading the file.

Note:
Tbh, I should’ve done this in reverse but I assumed and jumped the gun. My apologies.

Cheers.

@umisuhanarahman
Copy link
Author

@JediKev

Okay, after I put those code, this is the output:

next

What means by that var_dump output?

Thanks.

@JediKev
Copy link
Contributor

JediKev commented Jan 8, 2020

@umisuhanarahman

As I suspected your PHP is having issues reading the file as file_exists is failing. Ensure PHP has the appropriate permissions on the file in the Temp directory. If you don’t know how refer to the many guides/documentation available online. Also, you need to make sure the files are actually being created by looking at the temp directory during export and ensuring a file is being created.

Cheers.

@umisuhanarahman
Copy link
Author

umisuhanarahman commented Jan 8, 2020

@JediKev

But, as i told you before. I already gave all 777 for the permission to the tmp files and folders as below (this is the /tmp directory):

tmp

What other permission that I need to give? Did I gave the wrong permission?

Thanks.

@JediKev
Copy link
Contributor

JediKev commented Jan 8, 2020

@umisuhanarahman

As per PHP documentation:

Warning
This function returns FALSE for files inaccessible due to safe mode restrictions. However these files still can be included if they are located in safe_mode_include_dir.

So I’d start by checking the safe mode restrictions to ensure this is not the culprit.

Cheers.

@umisuhanarahman
Copy link
Author

umisuhanarahman commented Jan 8, 2020

@JediKev

How can I check the safe mode restriction, sir?

Thanks.

@JediKev
Copy link
Contributor

JediKev commented Jan 8, 2020

@umisuhanarahman

You’ll have to read PHP's documentation on this available on their website.

You can also try adding clearstatcache(); right below static function load($id) { to see if that helps.

Cheers.

@Dav1dNL
Copy link

Dav1dNL commented Mar 16, 2020

I have the exact same issue but a little different, for me this only happens from Agent Panel->Users->Organizations->Choose Any Organization->Tickets->Export. I am also on 1.14.1 upgraded from 1.12.5 (it worked fine in that version). Is there a fix or temporary workaround to this? It is the end of the month and we need to generate customer billing info based on per-organization basis. Pls kindly help! Thanks in advance!

I have exact the same issue as you.
Did you manage to fix the problem and can you help me?

@JediKev
Copy link
Contributor

JediKev commented Mar 16, 2020

@DavidCommandeur

See the following comment for a patch:

Cheers.

@Dav1dNL
Copy link

Dav1dNL commented Mar 16, 2020

Hi @JediKev

Tried it but still the white bar. I'am getting keen on fixing this problem.

I find it strange that the export problem only occures when making an export in the scp:
'user tab -> user directory ->user -> tickets tab -> export'
and:
'user tab -> organizations -> organisation -> ticket tab -> export'

All other exports and even the 'user tab -> user directory -> export' I can make an export without a problem.

what are the differences?

for your information, see thread: https://forum.osticket.com/d/96770-organization-ticket-export-not-working/2

@JediKev
Copy link
Contributor

JediKev commented Mar 16, 2020

@DavidCommandeur

Okay so your issue is different than the OP’s issue. OP’s issue is due to Shared Host restrictions. Your issue deals with the organization export specifically (which is due to undefined method) which I’m currently working on. A fix will be posted to the thread you linked on the Forum when I’m done.

Cheers.

@Dav1dNL
Copy link

Dav1dNL commented Mar 16, 2020

@JediKev

Yes that's the case.
Ik cant't export the tickets from user or organization under the user tab.

The list of users or the list of organizations itself I can export, like all other exports.

thanks in advance for the upcomming fix.

@gtao725
Copy link

gtao725 commented Apr 5, 2020

@JediKev @Dav1dNL https://github.com/osTicket/osTicket/pull/5418/files this has also fixed my issue, thx so much guys!!!

@umisuhanarahman Hope everything works out for you too.

@Lamboy88
Copy link

Lamboy88 commented Dec 1, 2020

I do still have the problem. following the instrunctions I get the error in php.log

[01-Dec-2020 20:49:40 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /xx/include/class.http.php:86) in /xx/include/class.http.php on line 94
[01-Dec-2020 20:49:40 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /xx/include/class.http.php:86) in /xx/include/class.http.php on line 95

from the lines it is referring to the following:
(94) header('Content-Type: text/plain');
(95) header('Cache-Control: no-cache');

when commenting out this does disappear and no errors are shown.
Indiferrently of ini_set('output_buffering', 'Off'); or On the csv is only send by email.

Following the advices above: commenting out the email send, does not help, still nothing is shown.

I have included into htaccess
php_value output_buffering On
php_admin_value upload_tmp_dir /xx/tmp (for testing 777)

grafik

Any idea what could be the problem?
thank you!

@JediKev
Copy link
Contributor

JediKev commented Dec 1, 2020

@Lamboy88

Are you using a shared host or hosting provider? Or is this a server hosted in-house?

Cheers.

@Lamboy88
Copy link

Lamboy88 commented Dec 1, 2020

shared host.

@JediKev
Copy link
Contributor

JediKev commented Dec 1, 2020

@Lamboy88

v1.14.3 should already include the following patch but please check to make sure:

If you already have that patch applied, please follow the instructions listed here and if that doesn't work follow the instructions listed here. If it still doesn't work you need to contact your host to see how to get around their specific restrictions.

Cheers.

@Lamboy88
Copy link

Lamboy88 commented Dec 1, 2020

Thank you @JediKev unfortunately everything already tested without getting it fixed. Will try to get some ideas on what could be wrong here. cheers

@JediKev
Copy link
Contributor

JediKev commented Dec 1, 2020

@Lamboy88

Yea, your host definitely has some weird, custom restrictions. Contacting them would be in your best interest.

Cheers.

@juliogaraujo
Copy link

Hello All,

I'm facing exactly the same problem and I would like to know if there is any update about this issue?

Thanks,
Julio

@JediKev
Copy link
Contributor

JediKev commented May 30, 2021

@juliogaraujo

I would encourage you to read this comment above and try the steps listed.

Cheers.

@juliogaraujo
Copy link

@JediKev

Thanks for your prompt reply and sorry for not mention before that I read all this post and I tried everything that is suggested here and in the linked posted and the only thing that works was comment the lines at ajax.tickets.php file:
//$exporter->email($thisstaff);
//@$exporter->delete();

But seems that commenting this lines will cause a side effect that the email is never send, so I'm looking for a more better workaround or even a final solution for this problem.

Is there any other solution?

Thanks once again.
Cheers.

@JediKev
Copy link
Contributor

JediKev commented May 30, 2021

@juliogaraujo

Are you using a shared host? If so, I’d recommend contacting your hosting provider for further assistance.

Cheers.

@juliogaraujo
Copy link

@JediKev

Yep sir. I'm using a shared host and I already tried to contact them but they couldn't figure out find the problem.

Do you mid if you can tell me what exactly I should ask to them?

Also I build a environment inside the customer network using webmin and I got exactly the same issue, anyway for this environment I have full access, so is there any test that I can do?

Cheers.

@JediKev
Copy link
Contributor

JediKev commented May 30, 2021

@juliogaraujo

I would start here and make sure you’ve tried everything listed in that comment and all 7 comments directly following it.

It has honestly been a while since I’ve touched on this issue but I explained in this comment what I found when using a shared host environment that was experiencing the same issue. It was due to Output Buffering that the host intentionally disabled so I explained what I had to do to get it working in this comment.

Cheers.

@juliogaraujo
Copy link

@JediKev

Thanks a lot for your comments, I will double check everything from the scratch to make sure that I didn't missed anything.

Cheers.

@RikkiMasters
Copy link
Contributor

RikkiMasters commented Jun 21, 2021

Same issue here after updating to 1.15.2 from 1.12.2.

Self hosted on IIS
PHP 7.3
Output buffering on

Commenting out the below fixes the issue.

include/ajax.tickets.php:

//$exporter->email($thisstaff);
and
//@$exporter->delete();

Have tried this fix but no luck: #5303 (comment)

image

EDIT: Have tested on different PHP versions. It works on 7.2, but fails on 7.3. and 7.4.

Downgrading to 7.2 fixes the issue. Whether it's because my config is different in 7.2 I don't know. Any specifics I can check for?

@ntozier
Copy link
Contributor

ntozier commented Jun 21, 2021

Server 2019 and IIS 10, PHP 7.3.19, osT 1.15.2.
Same issue. Tries steps to resolve above with no luck.
Additionally tried setting responseBufferLimit to 0 in the web.config.

<handlers>
<remove name="FastCGI" />
<add name="FastCGI" path="*.php" verb="*" type="" modules="FastCgiModule" scriptProcessor="D:\PHP\7_3_19\php-cgi.exe" resourceType="File" requireAccess="Script" allowPathInfo="false" preCondition="" responseBufferLimit="0" />
</handlers> 

For more information regarding this attempt see:
https://stackoverflow.com/questions/7178514/php-flush-stopped-flushing-in-iis7-5

@RikkiMasters
Copy link
Contributor

@ntozier did you try PHP 7.2?

@ntozier
Copy link
Contributor

ntozier commented Jun 21, 2021

@RikkiMasters no I did not. PHP 7.2 is end of life. I'm more apt to go to 7.4 (or 8 once osTicket supports it).

@RikkiMasters
Copy link
Contributor

RikkiMasters commented Jun 21, 2021

@ntozier My point is it works on 7.2. So testing it would narrow down the issue to a 7.3 change.

@ghostersk
Copy link

we are using Plesk to host this ticket system. I change 2 php files as per this post
0cd4168
and then I added TMP folder link to PHP settings :
sys_temp_dir = "/tmp"
upload_tmp_dir = "/tmp"

Also I am using PHP 7.3
and I was able to export Tickets.

@apyash
Copy link

apyash commented Nov 26, 2021

I am also facing the same issue when newly installed with below configured. Task, Org user export working, but ticket export is not working.

Version | v1.15.4 (6bd7884) —  Up to date
Web Server Software | Apache
MySQL Version | 5.6.41
PHP Version | 7.4.26

image

@JediKev
Copy link
Contributor

JediKev commented Nov 29, 2021

@apyash

I am not able to replicate this issue using v1.15.4, Apache, MySQL 8, and PHP 7.4. Please review all logs on your server for any related errors (general server logs, webserver error logs, PHP error logs, MySQL/MariaDB error logs, osTicket System Logs, Browser Console logs, etc.). The empty white box is typically indicative of either AJAX issues or a fatal PHP error that should be logged somewhere. I think it's the latter as this is most common with export issues.

Cheers.

@apyash
Copy link

apyash commented Nov 30, 2021

In logs we can see only
[Sun Nov 28 22:39:31.836045 2021] [:error] File does not exist: xmlrpc.php
[Mon Nov 29 20:39:05.746064 2021] [:error]] File does not exist: xmlrpc.php

Also no mod security errors found.

As per Hosted Server Message: Looks like coding issue as per their message
I have installed the new version as fresh, but same issue "xmlrpc.php files itself not found in the account" as per them.

@jmm312
Copy link

jmm312 commented May 17, 2022

Same issue

Server 2019
Microsoft-IIS/10.0
PHP 8.0.16
osTicket v1.16.1
output_buffering = 4096 (I have also tried changing this to On)
Write permissions have been granted to the Temp folder. Confirmed a temp file is being created.

A short-term fix that worked was commenting out the following sections in the ajax.tickets.php file:

include/ajax.tickets.php:

//$exporter->email($thisstaff);
and
//@$exporter->delete();

@marcosarossi
Copy link

marcosarossi commented Aug 17, 2022

I think I found the problem!. It has something to do with the session storage between requests. I tried exporting tickets using a browser speed regulation (thus making the requests slower) and worked fine. That gave me a hint.

So, in order to fix this, I edited the class.export.php, function ack(). This is my version:

function ack() {
        // Register the export in the session
        self::register($this);

        // IT GOES HERE
        session_write_close();

        // Flush response / return export id and check interval
        Http::flush(201, json_encode(['eid' =>
                    $this->getId(), 'interval' => $this->getInterval()]));
        // Phew... now we're free to do the export
        // NOT HERE!: session_write_close(); // Release session for other requests
        ignore_user_abort(1);  // Leave us alone bro!
        @set_time_limit(0);    // Useless when safe_mode is on
        // Ask the queue to export to the exporter
    }

Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests