473,394 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

HTML_ToPDF, I'm stuck some help please

Hi there,
I'm trying to get HTML_ToPDF (3.3) running on en dedicated server,
safe_mode enabled. Been trying for more than 2 days now, without success.
Have similar script running on my own personal server. Safe mode disabled.

This is what I did so far:
---
I copied html2ps, ps2pdf and curl into
/opt/guide/www.domain.invalid/HTML/config/html2pdf/, directory also
holds all HTML_ToPDF-files. Did chmod 777 to the specified folder.
Temp-folder is /opt/guide/www.domain.invalid/HTML/tmp (also 777).
The script:
---
// PDF (include class)
@require_once($_SERVER['DOCUMENT_ROOT']."/config/html2pdf/HTML_ToPDF.php");
$defaultDomain = "http://www.domain.invalid";

// PDF (path to html)
$htmlFile = $_SERVER['DOCUMENT_ROOT']."/pdf/input.html";

// PDF (path to pdf)
$pdfFile = $_SERVER['DOCUMENT_ROOT']."/pdf/output.pdf";

// PDF (settings)
$pdf = new HTML_ToPDF($htmlFile, $defaultDomain, $pdfFile);
$pdf->setDebug('true');
$pdf->setPs2Pdf('/opt/guide/www.domain.invalid/HTML/config/html2pdf/ps2pdf');
$pdf->setHtml2Ps('/opt/guide/www.domain.invalid/HTML/config/html2pdf/html2ps');
$pdf->setGetUrl('/opt/guide/www.domain.invalid/HTML/config/html2pdf/curl
-i');
$pdf->setTmpDir('/opt/guide/www.domain.invalid/HTML/tmp');
$pdf->addHtml2psSettings('break-table: 0');
$result = $pdf->convert();
Running the script returns:
---
DEBUG: html2ps command run:
/opt/guide/www.domain.invalid/HTML/config/html2pdf/html2ps -f
/opt/guide/www.domain.invalid/HTML/tmp/CONF-4omnhC -o
/opt/guide/www.domain.invalid/HTML/tmp/PS-YJn3Ar
/opt/guide/www.domain.invalid/HTML/tmp/HTML-SDrxWw.html 2>&1
DEBUG: html2ps output:
DEBUG: config file: /opt/guide/www.domain.invalid/HTML/tmp/CONF-4omnhC
(not removed)
DEBUG: html file:
/opt/guide/www.domain.invalid/HTML/tmp/HTML-SDrxWw.html (not removed)
DEBUG: ps file: /opt/guide/www.domain.invalid/HTML/tmp/PS-YJn3Ar (not
removed)
Error: there was a problem running the html2ps command. Error code
returned: 127. setDebug() for more information

---
DEBUG: html2ps output is empty, so I tried to execute the command from
shell. Created a file test.php containing:
<?
exec('/opt/guide/www.domain.invalid/HTML/config/html2pdf/html2ps -f
/opt/guide/www.domain.invalid/HTML/tmp/CONF-4omnhC -o
/opt/guide/www.domain.invalid/HTML/tmp/PS-YJn3Ar
/opt/guide/www.domain.invalid/HTML/tmp/HTML-SDrxWw.html 2>&1');
?>

running '/>php test.php' returned;
---
Error opening resource file:
/opt/guide/www.domain.invalid/HTML/tmp/CONF-N4OHnA
*** Error opening /opt/guide/www.domain.invalid/HTML/tmp/PS-JXAcZk for
output

The generated files in tmp-dir are owned by 'nobody:other', only nobody
has rw-access, group other has r-access.

Why can't php open the file?
What actions to take to solve this?

Thanks in advance!
Aug 18 '05 #1
0 1727

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vladimir | last post by:
I'm running ASP on IIS 5.1 on Windows XP, the same thing works on Windows 98 with PWS. The function below stuck the IIS - draws only frame with nothing inside and wait for infinite. All other...
17
by: JT | last post by:
Help me the following C++ question: Write a program to help a local bookshop automate its billing system. The program should do the following: (a)Let the user enter the ISBN, the system will...
8
by: MLH | last post by:
I use a mouse-down procedure to trap right mouse clicks and CTRL-Right mouse clicks. Running the procedure must put honey or some other sticky substance into my keyboard because subsequent...
12
by: MuZZy | last post by:
Hi, Sorry for a repeated post but i didn't receive an answer and will try to re-phrase my question: How do i close an additional thread from the main thread, if this additional thread is stuck...
1
by: jessebasketball | last post by:
i am a very beginner programmer and am stuck on a very simple problem. I am trying to make a game where the user is presented with a scenerio and options. ie you are standing in the parking lot...
2
by: rehet | last post by:
hye.. i really need ur guys help.. im stuck.. i want to count the word freq and print them according to the word length.. > the longest be output first.. ouh.. and my input must be alphabet or...
4
by: =?Utf-8?B?TWF1cg==?= | last post by:
My cd is stuck in the drive. I can open the drawer O K but the c d will not come out Help me please -- Maur
1
by: =?Utf-8?B?VHJ1cHRpIERhbGlh?= | last post by:
Hi to all, I am new in this newsgroup and new to .NET also. I am creating an application where I have to perform Mail Merge from my program. I have created a form which contain RTB and user can...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.