Jump to content

rushy

Members
  • Content Count

    31
  • Joined

  • Last visited

Community Reputation

7 Neutral

About rushy

  • Rank
    Jr. Member

Profile Information

  • Gender
    Male
  • Location
    Bournemouth & Málaga
  • Interests
    Motorcycles, music, meteorology, vintage radio restoration, computer chess programming, tech. in general

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you. That works! But I now realise I need to iterate each album to build a list of tagged images matching. I wonder if there is a sub selector that can do that? Thanks again I can get on with it now 🙂
  2. Hi I have a number of pages with images and I'm having a problem selecting on the image descriptions. In the code snippet below, the I added images.description field to my selector and it does work in that I get the expected no. of matches. So findTag gets me a list of images matching the tags in the code, but if I swap that line for the commented line $match->images->find it does not work giving 0 results. There is findTag for tags but for description there is not a dedicated function, so I should use find. But what selector will give me a list of images matched by image description? Many thanks. if($q !== '') { $keywords = $sanitizer->selectorValue($q); $matches = $pages->find("template=album, title|summary|images.tags|images.description~=$keywords"); echo "<p>match count: $matches->count</p>"; foreach($matches as $match){ echo "<p>{$match->title}</p>"; $i = $match->images->findTag($keywords); //$i = $match->images->find("template=album, images.description~=$keywords"); GIVES ZERO MATCHES $j = count($i); echo "<p>No. of image matching: $j</p>"; foreach($i as $img){ echo "<img src='{$img->url}' alt='{$img->description}'>"; } } }
  3. Thanks Horst. I created a test file with echo phpinfo() and found in the core table output the following listed as disabled: disable_functions shell_exec ,exec, system, popen, set_time_limit this for both local and master value columns in the table. i note your comments about switching or upgrading host! Paul
  4. I had no luck with any of the above, in the _init or config.php it gave an error as it's disabled by the host and in .htaccess the site did not run it just displayed a config error. Fasthosts have replied to my question saying there is no option to use set _time_limit on shared hosting. (see below) As a workaround I have commented out the set_time_limit call in the core and it works ok - for now...
  5. Hi. I've been using Processwire for a few years now and installed it on a few different shared hosting servers without issues, but I'm now running into an issue on a Fasthosts shared server that I've not seen before. The installation goes ok and I have a working default site profile but I am unable to complete any uploads of images. It just hangs at the progress spinner during the upload. I thought it might be a priviledge issue so have temporarily set the dir / file privs. as 777 / 666 just to test that but it made no difference. I have no errors in the wire log. In server error log I have: set_time_limit() has been disabled for security reasons in ....htdocs/wire/core/ImageSizerEngine.php on line 1035 and i note in the assets/file dir. where the image is being stored the date on the file being created has a year of 1970 and 0 length. If I leave the page this file disappears and nothing has been stored. Does anyone know how I can enable set_time_limit if this is likely to be the problem? Many thanks! Paul
  6. So far I found that using if(!$config->ajax): in my _main.php around head and foot parts and having a div targetted by Javascript as is commonly used - but in the case of an Ajax call I use wireRenderFile() to load markup from a file containing just the markup I need seems to work.... but I'm still playing with this. Paul
  7. Hello. I have recently adopted PW markup regions and really like this way of working. However, I am also trying to learn how to use Ajax and I am not sure of a good way to use the two together. Has anyone got any experience, tips or hints on using them together? For ajax - I've used a simple scheme where I have a "webservice" template and page that handles Ajax requests and returns the appropriate content wrapped with some markup for the requesting page. I have markup regions enabled and all my pages (bar webservice) include a _main.php which brings in the headers, a default body and the footer. My javascript intercepts the page links and does my ajax call to webservice and that sends back the appropriate markup which is then placed by in the div #body defined in _main.php. Does this seem a reasonable way to work? I guess I am looking for some advice before I invest too much time going the wrong way! Any guidance, remarks, comments, or a nudge in the right direction greatly appreciated. Paul
  8. Thanks for the suggestion. I couldn't see any errors in the Chrome developer network tab, but I did try adding the mod_security.c section as given in your other post. Unfortunately it didn't make any difference - the problem persists. I've installed Tracy debugger just in case it can throw any light on this problem. Now I have to learn how to use it properly! Rushy
  9. I'm using 3.0.98. I don't think it can be a PW problem though. I'm thinking perhaps server config? The fact is I've run the same build on a different server and the problem doesn't occur. Also it's fine on my local dev server. There are no errors seen to give me a clue (or I don't know where to look for config. errors)
  10. Good idea Robin, I will certainly try Tracy Debugger to see if it reports any problem in the backend. My $config is already set true and no visible errors are reported and everything else seems to work fine. Fingers crossed I can find something as I'm fresh out of ideas now...
  11. I tried the above to no avail. I'm really stumped now. Just can't get repeaters to work properly on this server but they are fine on another server. I can't see what the difference is...no errors or warnings. What a pain.
  12. I'm thinking this must be a PHP config. problem on the server. I found a problem with ini_set being disabled for security reasons and thought that would be the problem but now it's enabled the problem persists. See other post: override php.ini It's a long shot, but I think I will reinstall PW from scratch now that I have no server errors - just in case the installation had been affected by the PHP error. I wonder if there is a definitive statement of PHP functions that are required for correct operation of PW? That would help me track down the problem as I have no error messages anywhere now as far as I can see, but images in repeaters still don't work properly on this server. Paul
  13. No, I only have 2 'instances' of the repeater on my page, with 2 fields in the repeater 1 image and 1 TextareaLanguage. The image description field comes with the image.
  14. My problem seems specific to the description text fields provided with images. When used within repeaters, the description field is not saved and original text reappears after save. How can i enable extra logging to track down this problem? I have debug = true in config.php and no messages are seen. Any ideas of where to look? Thanks - Paul
  15. Thanks dragan. I have contacted the host support and they have changed the PHP config. to allow ini_set. The error in the error_log has now gone.
×
×
  • Create New...