Problem with creating image slots

0 views
Skip to first unread message

Stan

unread,
Dec 14, 2009, 3:21:18 PM12/14/09
to pkcontextcms
I installed the latest cmstest package a few days ago. All works fine
on my Mac development system, but I'm having problems with the same
version on a shared server.

As Admin, I can add richtext slots but not image or pdf slots. I can
upload images and pdf docs and I can see them in the media browser.
But when I click on an image to select the image to be inserted in a
slot on a target page, it just returns to the target page without
creating the image slot.

Netpbm is installed and the media_items folder contains sets of
resized image files. The database table pk_context_cms_slot does not
contain any image slots, only text slots.

On the shared server the log shows an entry like
Dec 14 14:46:13 symfony [info] ZZ action: http://www.mywebsite.com/media/info
params: ids=8&apikey=dummy&user=admin tags:
with nothing after,

whereas the log entry on the mac development server has a list of
parameters after "tags:" {"status":"ok","result":{"total":1,"items":
[{"type":"image","id":"19"... etc. }

Any ideas? After playing with permissions and configuration files, all
I can think of at this moment is to try a clean re-install of the
latest version (the one for symfony 1.4 in the sandbox).

Thanks

Tom Boutell

unread,
Dec 14, 2009, 3:40:12 PM12/14/09
to pkcont...@googlegroups.com
Hmm. I'd be looking for differences between your 'dev' and 'prod'
environment settings.

(We've been pushing through from 'dev' all the way to 'prod'
environments with project cloned from cmstest without issues, so I
don't recognize this one.)
> --
>
> You received this message because you are subscribed to the Google Groups "pkcontextcms" group.
> To post to this group, send email to pkcont...@googlegroups.com.
> To unsubscribe from this group, send email to pkcontextcms...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pkcontextcms?hl=en.
>
>
>



--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

Quentin Dugauthier

unread,
Dec 14, 2009, 4:45:39 PM12/14/09
to pkcont...@googlegroups.com
Hello,

Unfortunately, I don't have any bright idea to help you on this problem.
But I'd like to take this opportunity to tackle a question I have been asking myself for a while:
What does the Z and other ZZ means in your logging system ?

Quentin.

Tom Boutell

unread,
Dec 14, 2009, 5:05:29 PM12/14/09
to pkcont...@googlegroups.com
It means that (a) I like "grep," and (b) I am very lazy about removing
logging calls. My apologies. (:

Alex Gilbert

unread,
Dec 14, 2009, 4:59:24 PM12/14/09
to pkcont...@googlegroups.com
You know, this is something I'm curious about as well.

On Mon, Dec 14, 2009 at 4:45 PM, Quentin Dugauthier
<dugau...@gmail.com> wrote:
Alex Gilbert
P'unk Avenue
215-755-1330
al...@punkave.com

Stan

unread,
Jan 6, 2010, 5:46:07 PM1/6/10
to pkcontextcms
Solved. I had to replace file_get_contents() with curl because the
virtual server I'm using is not set up with a config that allows url
access with file_get_contents. Here is the code change in
pkMediaAPI.php that works for me:

$url = $this->site . "/media/$action";

// $content = file_get_contents($url, false, $context);

// curl replacement for file_get_contents
$postarguments = http_build_query($params);
$session = curl_init($url);
curl_setopt ($session, CURLOPT_POST, true);
curl_setopt ($session, CURLOPT_POSTFIELDS, $postarguments);
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec($session);
curl_close($session);
// end of curl replacement

> > For more options, visit this group athttp://groups.google.com/group/pkcontextcms?hl=en.

Tom Boutell

unread,
Jan 6, 2010, 5:48:17 PM1/6/10
to pkcont...@googlegroups.com
Good point, we may have to flag this as an issue for people soon. This
stuff gets very hairy very fast because some sites don't have *curl*
enabled... pick a feature, somebody disables it.

What host refuses URLs in fopen()?

> For more options, visit this group at http://groups.google.com/group/pkcontextcms?hl=en.

Reply all
Reply to author
Forward
0 new messages