![]() |
[Solved] Failed to create temp file with mkstemp()
Trying to output a report using the Zend Pdf library throws this error in stderror log:
2011-09-05 13:20:35.444 [STDERR] Failed to create temp file with mkstemp(): Permission denied 2011-09-05 13:20:35.444 [STDERR] Failed to increase temp file size with ftrancate(): Bad file descriptor This error in the error.log: 2011-09-05 13:45:25.228 [ERROR] [216.234.104.50:50982-0#APVH_207.32.184.195_example.com] Failed to initialize VMemBuf. 2011-09-05 13:45:25.228 [INFO] [216.234.104.50:50982-0#APVH_207.32.184.195_example.com] connection to [/tmp/lshttpd/APVH_demo.example.com_Suphp.sock.480] on request #0, confirmed, 1, associated process: 1011, running: 1, error: Illegal seek! 2011-09-05 13:45:25.228 [NOTICE] [216.234.104.50:50982-0#APVH_207.32.184.195_example.com] oops! 503 Service Unavailable 2011-09-05 13:45:25.228 [NOTICE] [216.234.104.50:50982-0#APVH_207.32.184.195_snowleotards.com] Content len: 74, Request line: POST /catalog/index.php/admin/sales_order/pdfinvoices/key/e5b2f8a77e012d61aa38d36fef25f6fe/ HTTP/1.1 INFO: Litespeed Web Server Enterprise v4.0.15 PHP 5.2.17 (cli) (built: Jun 13 2011 14:23:24) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator with the ionCube PHP Loader v4.0.8, Copyright (c) 2002-2011, by ionCube Ltd., and with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies I checked permissions on /tmp and it's open to all rw. Suggestions on where to look? |
Code:
~>man mkstempCode:
2011-09-05 13:20:35.444 [STDERR] Failed to create temp file with mkstemp(): Permission deniedit depends on the value of variable "template". assume it's "a.XXXXXX". then temporary file will be created at current working directory, not /tmp/. for more information, please check what user lsphp is running as, and the location of the php scripts and the directory permission. |
Thanks for the reply. What about the following error?
2011-09-04 06:28:22.654 [ERROR] [208.69.120.120:61555-0#APVH_207.32.184.195_example.com] Failed to initialize VMemBuf. |
Also, switching to apache the Pdf outputs as it should. It has to be an lsws/lsapi configuration issue somewhere. Just can't seem to figure out where.
FYI: lsws is running as apache:apache. |
Code:
FYI: lsws is running as apache:apache.Code:
2011-09-04 06:28:22.654 [ERROR] [208.69.120.120:61555-0#APVH_207.32.184.195_example.com] Failed to initialize VMemBuf. |
I figured it out. /tmp/lshttpd/swap was not owned by the apache user for some reason. chown'ing to apache fixed the problem.
Thanks for your help. |
| All times are GMT -7. The time now is 12:53 AM. |