Jump to content

pwired

Members
  • Posts

    2,318
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by pwired

  1. Hi,

    I have been using Laragon for a while with good success.
    Today all of a sudden it starts to connect with the internet
    when I am opening a website in localhost. So for example
    I start Laragon, and open http://localhost/mywebsite
    before it opened immediately and never connected with the internet.
    However now it connects with the internet and it takes halve
    a minute before the website shows up for editing.
    Does anybody know how this new behaviour could happen ?

     

     

  2. Quote

    Is there a reason why you guys use Laragon instead of WSL?

    I tried a lot of them before: Ampps, EasyPHP, Fenix, HFS, UniForm, USB, Laragon, UWamp, Wamp and ZWamp.
    For me Laragon came definitely out as the best in:

    1) easy interface
    2) simple switching between php versions
    3) auto virtual hosts
    4) speed
    5) stability

     

     

     

     

     

     

     

     

     

    • Like 2
  3. Quote

    Unrecognized host HTTP: 'permaculturaorganica.info' - Update your $ config-> httpHosts setting /site/config.php - read more

    But I do nothing. Why did it happen? And what should I do?

    Hi franciccio,

    Did you develop that site locally and now moved it online ?
    First check your config.php file inside the site folder.

    Look for this line: $config->httpHosts = array('....... ');

    It should look like this:

    $config->httpHosts = array('permaculturaorganica.info', 'www.permaculturaorganica.info');

     

    • Like 3
  4. Since the day of forced p tags ckeditor is still haunting never getting it's settings the way a client really wants it.
    TinyMCE isn't the answer either. A client doesn't need hundreds of settings anyway. Just a simple editor would do fine.

     

  5. Yes, invisible format characters can mess up your website and drive you nuts because you can't trace the cause in a logical way. Coding with the right editor is crucial. For example the bluefish editor does not reveal invisible format characters but notepad++ does !!

  6. You must be the first one confusing post content with post title.
    Please tell us something about your server environment, php version
    and used processwire modules so we can help you in a better way.

    Did you put processwire debug mode on ?
    Please install Tracy Debugger as it will
    give you valuable debug information.

  7. Here you go, pwired's super language switcher:

    <ul>
    <?php
    $i = 1;
    foreach($languages as $language) {
    $var[$i] = $page->localUrl($language);
    $i++;
    }
    echo "<li>" . "<a href=" . '"' . $var[3] . '"' . ">" . "Deutsch" . "</a>" . "</li>";
    echo "<li>" . "<a href=" . '"' . $var[2] . '"' . ">" . "English" . "</a>" . "</li>";
    echo "<li>" . "<a href=" . '"' . $var[1] . '"' . ">" . "Español" . "</a>" . "</li>";
    ?>
    </ul>

    Feel free to modify for your own needs, and beautify <ul>, <li> and <a> with your own custom css

    Here is a recommended read not to fall into unexpected not working language urls:
    https://processwire.com/talk/topic/19356-language-switcher-do-i-need-to-update-all-urls-in-the-api/

     

     

     

    • Like 2
  8. Quote

    How I can change it? The certificate is installed on server!

    Hi Franciccio,

    The only part in Processwire you need to do is to uncomment 2 lines in the .htaccess file:

    # -----------------------------------------------------------------------------------------------
      # 9. If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below.
      # -----------------------------------------------------------------------------------------------
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    The rest is done on your hosting server.

    Many Hosters these days have an easy Let's Encrypt setup in their CPanel.
    Unless your Hosting is Godaddy. I had a hard time not so long ago with Godaddy's support.
    They conduct a very demotivational policy to let you setup Let's Encrypt.

     

  9. Quote

    I just found this (https://www.phpclasses.org/package/10950-PHP-Compress-files-and-create-archives-in-Zip-format.html), maybe it is of interest for you?

    Hi,

    I downloaded the script and tested the included test.php on my hoster and it is working very well with single files.

    I would like to modify the included test.php script to zip a directory.
    At the bottom of the included test.php it looks like this:

    //$zipFile = new \zipFly\zipFly64(GTEST_DIR.'onfly'.$nr.'.zip');
    $zipFile = new \zipFly\zipFly64();
    $zipFile->setDebugMode(false);
    $zipFile->setZipFeature(true, false);
    
    $zipFile->create(GTEST_DIR.'onfly'.$nr.'.zip');
    
    $zipFile->addFile(GTEST_DIR."zipFly/zipFly64.php", "zipFly64.php", \zipFly\zipFly64::METHOD_BZIP2);
    $zipFile->addFile(GTEST_DIR."zipFly/parts/headers.php", "parts/headers.php", \zipFly\zipFly64::METHOD_DEFLATE);
    $zipFile->addFromString("Zip64\nTest\n", 'test.txt');
    
    $zipFile->close();

    As you see it only uses $zipFile->addFile . . . .

    Maybe something like this would do it.

     

    // let's iterate
    foreach ($files as $name => $file) {
    	$filePath = $file->getRealPath();
    	$zip->addFile($filePath);
    }

     

     

×
×
  • Create New...