Re: A simple question

More
12 years 7 months ago #18149 by ianni.roberto@gmail.com
I have set up the ecommerce to show the PDF icon in the products, but when I press the button I get the error:

TCPDF ERROR: [Image] Unable to get image: /usr/local/apache/htdocs/images/stories/virtuemart/product/TOSHIBA_Satellite.jpg

and the warning:
Warning: curl_setopt () [function.curl-setopt]: CURLOPT_FOLLOWLOCATION can not be activated when to safe_mode or an open_basedir is enabled is set in. / home/a8297465/public_html/libraries/tcpdf/tcpdf.php on line 7543

As I can fix the error?
Thanks in advance.

Please Log in to join the conversation.

More
12 years 7 months ago #18161 by ivan.milic
Replied by ivan.milic on topic Re: A simple question
check if:

/usr/local/apache/htdocs/images/stories/virtuemart/product/TOSHIBA_Satellite.jpg

really exist on that path using ftp. Also check if letter case is correct.

Please Log in to join the conversation.

More
12 years 7 months ago #18165 by ianni.roberto@gmail.com
Thanks Ivan, the directory does not exist. The real path is / home/a8297465/public_html/images/stories/virtuemart/product/TOSHIBA_Satellite.jpg

I do not know why they changed /home/a8297465/public_html/
by
/usr/local/apache/htdocs/

Thanks in advance.

Please Log in to join the conversation.

More
12 years 7 months ago - 2 years 7 months ago #18185 by ivan.milic
Replied by ivan.milic on topic Re: A simple question
Try this, replace libraries/tcpdf/tcpdf.php with one in zipped attachment.
Last edit: 2 years 7 months ago by milos.

Please Log in to join the conversation.

More
12 years 7 months ago #18198 by ianni.roberto@gmail.com
I tried but does not work, but now generates many more warnings.

TCPDF error: Missing or incorrect image file: /usr/local/apache/htdocs/images/stories/virtuemart/product/Earbuds.jpg

Warning: getimagesize(/usr/local/apache/htdocs/images/stories/virtuemart/product/Earbuds.jpg) [function.getimagesize]: failed to open stream: Operation not permitted in /home/a8297465/public_html/libraries/tcpdf/tcpdf.php on line 3673

Please Log in to join the conversation.

More
12 years 7 months ago #18199 by ianni.roberto@gmail.com
Changing code in the file tcpdf.php work, but do not understand why.
Changing the line 23130

// replace relative path with real server path
if (($tag[0] == '/') AND !empty($_SERVERDOCUMENT_ROOT[/b]']) AND ($_SERVERDOCUMENT_ROOT[/b]'] != '/')) {
$findroot = strpos($tag, $_SERVERDOCUMENT_ROOT[/b]']);
if (($findroot === false) OR ($findroot > 1)) {
if (substr($_SERVERDOCUMENT_ROOT[/b]'], -1) == '/') {
$tag = substr($_SERVERDOCUMENT_ROOT[/b]'], 0, -1).$tag;
} else {
$tag = $_SERVERDOCUMENT_ROOT[/b]'].$tag;
}
}
}

Changing by this line
$tag = '/home/a8297465/public_html/'.$tag;

Why use the variable DOCUMENT_ROOT?
It be changed?
Thanks Ivan!

Attachments:

Please Log in to join the conversation.

Time to create page: 0.149 seconds
Powered by Kunena Forum