Jump to content

dil_bert

Members
  • Posts

    939
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by dil_bert

  1. update: found some ideas about the debug-mode: 


    1. go to the file 

    config/production/config.yml

    2. add the following stuff

    	parameters:
        debug.load_time: true
        debug.sql_explain: true
        debug.memory: true
        debug.show_errors: true
        debug.exceptions: true 
    	imports:
        - { resource: ../default/config.yml }
    parameters:
        debug.load_time: true
        debug.sql_explain: true
        debug.memory: true
        debug.show_errors: true
        debug.exceptions: true
    

  2. hello dear all,

     

    how to debug the phpBB-forum software: i allways get   500 error 

    tried to do a fresh install of phpBB on php version 7.4.2 

    got the error 
    SPL support enabled

    Interfaces OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

     

    now the admin of the server downgraded to php 7.2.8 

     

    note: i did not have installed the phpBB  

    there a phpBB version 3.3 is on the server. But - yes: it is not installed yet!

    at the moment i get  a 500 error 

    how to debug phpbb!? 

    are there any ways and methods to get more insights what is going on on the server!?

  3. hello dear Experts on PHPFreaks  - dear Freaks, 

    well - while upgrading php from version 5.6 to 7.4.2 i get a critical error on the wp-site: 


    There has been a critical error on your website.
    Learn more about debugging in WordPress.

    and i get linked to the page https://wordpress.org/support/article/debugging-in-wordpress/

    where i learn_; 


    WP_DEBUG # WP_DEBUG

    WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the “debug” mode throughout WordPress. It is assumed to be false by default and is usually set to true in the wp-config.php file on development copies of WordPress.

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG', false );
    

    Note: The true and false values in the example are not surrounded by apostrophes (‘) because they are boolean (true/false) values. If you set constants to 'false', they will be interpreted as true because the quotes make it a string rather than a boolean.

    so i activate the debugmode and get the follwing: 


    Deprecated: Array and string offset access syntax with curly braces is deprecated in /sites/www.my-domain.com/wp-content/plugins/participants-database/classes/PDb_Base.php on line 1844
    

    see more here..: 

    Fatal error: Uncaught Exception: Cannot open source device in /sites/www.my-domain.com/wp-content/plugins/participants-database/vendor/wp-session-manager/wp-session-manager.php:46 Stack trace: #0 /sites/www.my-domain.com/wp-content/plugins/participants-database/vendor/wp-session-manager/wp-session-manager.php(46): session_start() #1 /sites/www.my-domain.com/wp-includes/class-wp-hook.php(286): wp_session_manager_start_session() #2 /sites/www.my-domain.com/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array) #3 /sites/www.my-domain.com/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #4 /sites/www.my-domain.com/wp-settings.php(392): do_action('plugins_loaded') #5 /sites/www.my-domain.com/wp-config.php(90): require_once('/sites/www.my-domain-...') #6 /sites/www.my-domain.com/wp-load.php(37): require_once('/sites/www.my-domain-...') #7 /sites/www.my-domain.com/wp-blog-header.php(13): require_once('/sites/www.my-domain-...') #8 /sites/www.my-domain.com/index.php(17): require('/sites/www.my-domain-...') #9 in /sites/www.my-domain.com/wp-content/plugins/participants-database/vendor/wp-session-manager/wp-session-manager.php on line 46
    There has been a critical error on your website.
    

    and ideas - any hints!?


    It is not recommended to use WP_DEBUG or the other debug tools on live sites; they are meant for local testing and staging installs.

  4. On 1/9/2020 at 2:45 PM, isabelwilliams said:

     

    Hello dear Isabellwilliiams and hello dear dip7 

     

    many many thanks for the reply and all your tipps and the shared insights.  I am happy to hear from you.  I will follow your advices and will do all you mention.

    The SSL-Ideas were very interesting and i like them.  And also the htaccess-things. 

    I will digg deeper into these techniques. 

     

    Again - many thanks for all you do

    have a great weekend 

    cheers 

    dil_bert

     

    On 1/9/2020 at 2:45 PM, isabelwilliams said:

    When you install a fresh wordpress website, the CMS by default create TWO config-php files which are:

    • wp-config-sample.php
    • wp-config.php

    Once, installation is done, then it is always recommended to remove "wp-config-sample.php" from the server, so that hackers can't use it to hack your website.

    Now coming, to your question, where did you added the DB Name, ID and Password?

    But, if your website was already live and shifted your wordpress website from one server to another then you may notice an 404 error all across the pages. This may be because of SSL issue and .htaccess. 

    You may have to install and activate ssl on your website using cpanel read this

    My website issue fixed using ssl installation.

     

     

     

    ssl.jpg

     

  5. Dear Barand 

    first of all;  many many thanks for the quick reply - now i managed to go ahead some steps. In other words: i was able to import the data. 

    The issue: i had a worng data-sheme. in other words: i generated the data set out of a csv-file that was indicating the date-formate as a "text" data-set and not a real and valid date-field. 

    so i run into issues and trouble. 

     

    finally got there: now it works.  i am very happy. 

     

    have a great day ;)

     

     

     

     

  6. good day dear Barand, 

     

    well first of all - many many thanks for all your help: the results of the import look like not so good. 

    see them here: 
    https://imgur.com/a/9653POx

    https://imgur.com/QuqfAlO

    https://imgur.com/EWsoncO

    https://imgur.com/lYelymb

    well  - i want to have displayed the text at once.  - is this doable - in other words am i able to add the text to the google-calendar in that way!?


    image.thumb.png.cb8030514430b9026964a4ef758e0fb3.png

  7. Dear Barand 

    first of all;  many many thanks for the quick reply - now i managed to go ahead some steps. In other words: i was able to import the data. 

     

    But now i want to export the data from Base to a calc sheet.  This is not working as expected. 

     

    image.thumb.png.55fb6bd09588ab7969699bca587fcb56.png

     

    in fact:  i cannot export the data.

    about the dataset: there are 365 lines of data - 

    i want to export them to a calc sheet - but at the moment i do not manage to do this step. 

     

     

     

  8.  


    hello dear experts, 

    on my  root-server i struggle with some issues on webmin:   they can be described as so: overview on the created vhosts lack some servers that are up and running

    here some data: Apache Webserver

    Quote

    Apache version 2.4.25
    Webmin version 1.910
    Theme Royal Blue

    The issue : i have some vhosts that run - and which created domains are available over http:

    but they are not visible in the vhost-overview?!

    why is this so!?

    by the way:  see the following thread https://www.virtualmin.com/node/45327

    Re-check configuration throws an Apache virtual host was not found: You can discover which domain is missing it's Apache virtual host by SSHing in as root and running :


    virtualmin validate-domains --all-domains --feature web

    Apache virtual host was not found happens when you have a website in /etc/webmin/virtual-server/domains/ 
    that does not exist in apache configs (e.g. may caused by IP/PORT mismatch). You may check your domains there and see what is wrong.

     Howdy -- we may want to verify that your Apache version is what Virtualmin is expecting, and that the config files are in the correct directory.
    What is the output of these commands:


    dpkg -l apache2
    ls /etc/apache2/sites-enabled/
    dpkg -l apache2
    ls /etc/apache2/sites-enabled/

    futhermore:  see the following thread: https://www.virtualmin.com/node/5878

    When i add a new virtual server i receive the following error`: Adding Apache user apache to server's group .. .. done`

    Apache website failed! : Undefined subroutine &main::save_domain_ruby_mode called at `/usr/libexec/webmin/virtual-server/feature-web.pl line 1856.`

    when i check apache, the virtualhost is created and running, but when managing the virtual server "Web virtual server enabled?" is not checked.  When i try to delete the server, everything is removed with exception of the the apache virtualhost. The above error prevents virtualmin from "remembering" that the virtualhost exists.


    added the following stuff: 


    web_ruby_suexec=-1 to the templates.

    Now its complaining that httpd is not running. Applying web server configuration .... not running!

    anwer: Have you started apache? Maybe your stopped it for some reason and forgot to start it again.

    well this seems to be an annoying bug - and i have encountered this malfunction and bad behaviour several times in the past years.

    conclusio: any idea how to fix it!? How would you proceeed.

    Note i have no console- or terminal-access to the server.

    any idea how to fix this malfunction - or how to proceed !?
    Should i stop and start the Apache !?! Do you think that this may help ?

    look forward to any and all help


     

  9. hello dear friends - 

     

    i mused bout the update &/  upgrade-process in MX-Linux. 

     

    and i guess that we can say: *"full upgrade" is the full equivalent to "apt-get dist-upgrade"*

     

    taken from here:  https://forum.mxlinux.org/viewtopic.php?t=45813


    Just as a general question, with updates on MX 17, I always do the full upgrade which I guess is equivalent to the terminal command 'sudo apt upgrade'.
    No problem but why would it be recommended in this Debian based distro when it's definitely not recommended in Mint which uses Ubuntu? They claim it's more likely to break the system. Is this down to the difference between Debian and Ubuntu or are they being over cautious?

    "full upgrade" is equivalent to "apt-get dist-upgrade".



    and its recommended because antiX recommends it and we have an antiX base (antiX-core, heavily modified). dist-upgrade is also our default because its a more complete update.
    mint and ubuntu allow ppa's, which would be included in any dist-upgrades they would be doing, so I can see how they might be a little more leary of that. third party repos can hose a debian system too, especially larger repos like deb-multimedia that have a lot of packages, but there are way more ppas in the wild on the ubuntu side of things.



    Theoretically full-upgrade (or dist-upgrade) command is more dangerous than simple "upgrade" because "apt-get upgrade" never removes or adds packages while "apt-get full-upgrade" (or dist-upgrade) can remove and add packages.
    If you don't mess with the sources we actually recommend full-upgrade because this way you get new packages we add or remove the obsolete ones. However, there are two pre-conditions: no monkeying with the sources, and reading and understanding the prompts. Also, I don't think full-upgrade is appropriate for auto upgrade for the second reason: you cannot really check the prompts, you'd have to assume "y" response which would be dangerous. Problems might show even if you don't monkey with the sources, if one source is down then you might pull only from another source and depending on dependency resolution you might have surprises (not entirely sure that can happen or that is likely, but logically it looks to me like a risk -- I guess you'd need to have a different version of the package in the secondary source that would somehow require removal of a package -- probably not likely).


    I have always used Synaptic, since Mepis I think, although sometimes use the CLI method (often following an inadvertent mouse click...yeah...whatever...), or GDebi, when these appear via the forum for tweaks or tests. So I've never given much consideration to apt methods.
    I think some version upgrades have specified apt upgrades for migrating, but I just tend to rely on the stability of Synaptic. I haven't needed to pin a version for donkey's (years) or do anything fancy.
    Am I missing anything important or am I just just a typical, contented low-maintenance MX user? Interesting OP though, to make me think over my habits.


    Synaptic in MX uses apt-get dist-upgrade by default as far as I know, so if you haven't had any issues, it shows that MX works fine with apt-get dist-upgrade, regardless of warnings in Ubuntu/Mint.
    Of course, you are probably a model user who, like Adrian was saying, does not monkey around with sources. :p
    By the way, I just upgrade my Mint 17 system all the time with apt-get dist-upgrade, without issue. But then, I don't use PPAs.


    well - conclusio: i take the above mentioned process on commandline - and run it... - then all packages will update... 

     

  10. Hello dear all

    i am running MX-Linux on a lenovo notebook. 


    yesterday i recognized that the brightness is to low - how can i customize and solve this issue. how to change the settings: 


    should i go like so: 

    https://forum.mxlinux.org/viewtopic.php?t=41893


    I have installed MX 16 on my laptop and am quite impressed with it. I usually set the Display Brightness to 50% as it is more convenient for me. What I found is after I restart MX 16, the brightness reverts back to 100% and I will have to reset it to 50% manually. The same thing gets repeated after restarting the OS. Please do something to correct it.
    its a quirk in xfce. I use a utility called "xbacklight" to set the brightness level to where I want. in my case, 70%

    xbacklight -set 70
    

    or should i go like so: 

    Brightness: acpi_video0 & intel_backlight

    https://forum.mxlinux.org/viewtopic.php?t=47809



    [Cross-posted in Xfce forums, 'coz ToZ]

    Hello. I have some trouble with the brightness controls on my netbook (hardware and software details below):

    Fn+F5/F6 seems to use acpi_video0. Fn keys make the brightness change, and the notification popup appear, but don't move the bar in the popup nor the slider in the Power Manager plugin.

    Xfce Power Manager v 1.6.1 seems to use intel_backlight when I use the slider or scroll over the panel icon. This way I can get higher max brightness compared to using the Fn keys.

    I'd like to use intel_backlight, as it has a bigger max value and is more fine grained (off-topic, anyone knows about the logarithmic scale proposed here, sounded great!), and marginally would like the slider and notification popup update their position properly.

    Here's some info from my system:    


    user@netbook:~$ cat /proc/cmdline
    BOOT_IMAGE=/boot/vmlinuz-4.13.0-1-686-pae root=UUID=bcb90034-53b6-482c-a4b1-b35db0c2b510 ro quiet

    
    


    I tried some of the "popular" acpi options on the grub command line, to no visible effect.


    user@netbook:~$ lspci -k | grep -iA2 VGA
    00:02.0 VGA compatible controller: Intel Corporation Mobile 945GSE Express Integrated Graphics Controller (rev 03)
        Subsystem: ASUSTeK Computer Inc. Mobile 945GSE Express Integrated Graphics Controller
        Kernel driver in use: i915

    
    



    user@netbook:~$ for i in /sys/class/backlight/*; do echo $i;cat $i/brightness;cat $i/max_brightness;done
    /sys/class/backlight/acpi_video0
    14
    15
    /sys/class/backlight/intel_backlight
    7989
    39780

    
    



    user@netbook:~$ pastebinit /var/log/Xorg.0.log
    https://pastebin.com/60pFPuSy

    
    



    user@netbook    :~$ inxi -GMS
    System:    Host: mx1 Kernel: 4.13.0-1-686-pae i686 bits: 32 Desktop: Xfce 4.12.3 
               Distro: MX-17_386 Horizon December 15  2017 
    Machine:   Type: Laptop System: ASUSTeK product: 1005HA v: x.x serial: <root required> 
               Mobo: ASUSTeK model: 1005HA v: x.xx serial: <root required> BIOS: American Megatrends v: 1102 
               date: 10/16/2009 
    Graphics:  Device-1: Intel Mobile 945GSE Express Integrated Graphics driver: i915 v: kernel 
               Display: x11 server: X.Org 1.19.2 driver: intel resolution: 1024x600~60Hz 
               OpenGL: renderer: Mesa DRI Intel 945GME x86/MMX/SSE2 v: 1.4 Mesa 18.2.6 

    
    

    Following advice from old forum posts, I modified these two file, maybe I should just modify one of them?

    user@netbook:~$ cat /usr/share/X11/xorg.conf.d/20-intel.conf
    Section "Device"
            Identifier  "card0"
            Driver      "intel"
            Option      "Backlight"    "intel_backlight"
            BusID       "PCI:0:2:0"
    EndSection

    
    



    user@netbook:~$ cat /etc/X11/xorg.conf.d/20-intel.conf 
    Section "Device"
       Identifier  "Intel Graphics"
       Driver      "intel"
       Option      "AccelMethod" "sna"             # was "uxa"
       Option      "Backlight"   "intel_backlight" # I added this line
       Option      "TearFree"    "true"
       BusID       "PCI:0:2:0"                     # and maybe this one too? I don't remember!

    
    

    Thanks for any help

    i love to hear from you

  11. hello dear all freaks

     

    after having recognized that the brightness of my notebook could be at a higher level - i tried this

    root@mx:/home/martin# xbacklight -set 70
    bash: xbacklight: Kommando nicht gefunden.
    root@mx:/home/martin# xbacklight -set 70
    bash: xbacklight: Kommando nicht gefunden.
    root@mx:/home/martin#
    


    so far so good  - now i installed the package - taken from the repos, 

    besides this - i found out that i can update the repos - see the image

     

    well the question:- did i manage to that i can update the repos - see the image

    i am not sure if i updated all the repos so far...

     

    image.png.58d04d3e79897db39fc1edf47714c39e.png

     

    look forward to hear from you

  12. dear Barand  i have to do a import of  a calc-based-dataset (365 lines of data) into a libreoffice db 

     

    i get the above mentioned error all the time - this nearly drives me nuts ;) 

    i have struggled with the dataset for more than a whole week 

    image.png.daaaf2dc8fe76816ffb2fead1cbbbce9.png

     

    i try to do some uploads into cloud and give you link to the issued sheets. 

    at the moment i think that i have tried out nearly everything that is possible - thinkable. 

     

    see the database - a engine that is capable to translate the 7956 verses of the Novum Testamentum  into several (at the moment three) languages

    ancient greek 

    english 

    french 

    ... all based on the German base - and the yearly new edition of quotes - (that  are published here https://www.losungen.de/download/

     

    there fore i have to add the calc seeht /(see the little imabe above ) to the table in the db - called GERMAN_VERSES -  

    see the db: NT-Verses-D-EN.odb
    see the table  __Losungen__2020__.ods  that has to be imported in the table GERMAN_VERSES

    this step allways fails - i do not know why... i allways and ever get the above mentioned error... 

     

    dear Barand again many thanks for the quick reply,.... 

    btw: (i hoped that i get a reply from you - since you are a true db-expert ;) 

     

     

  13. hello 

    while trying to import data to a hsqldb table i allways get errors.

    die data-exception:

    Quote

    data exception: invalid datetime format do you want to continue

    question - should i change

    from

     08.12.2020 
    09.12.2020 
    10.12.2020

    to:

    20020-12-08 
    20020-09-08
    20020-10-08
    


    see also: https://stackoverflow.com/questions/39817149/hsqldb-invalid-datetime-format-for-dd-mm-yyyy-but-not-for-yyyy-mm-dd?rq=1

    question: Can someone please tell me what is wrong?

    answer: The answer is simply that HSQLDB will only accept string literals for dates if they follow the 'yyyy-mm-dd' format. It is willing to be helpful – to a point – in that it will allow us to omit the DATE keyword from a "proper" HSQLDB date literal value

    DATE '2016-01-02'

    and let us simply provide

    '2016-01-02'

    but it will not accept '01/02/2016' (which is ambiguous, anyway) or any of the many other ways that we silly humans can represent dates.


    look forward to hear  from you 

    best regarsd

  14. hello dear Freaks, good day, 

     

    finding out the best way to bookmark links and websites - which tool do you use!?

    Consider the following case-scenario: you sit in front of your notebook and you just stumbled across an exciting article you really want to read, unfortunatly you have no time at all at the moment; you have a bunch of work that need to be done before you can sit down and read it. What can you do?

     

    - leave the text open in your browser. 
    - email the the URL-link to yourself, but 
    - use the toolset of your browser to bookmark the site... or ...- skip the text 


    question: is there a more convenient and easy-to-read way. 


    i have seen some of the following tools and toolsets

    - Evernote Web Clipper
    - Trello
    - Bitly
    - Pocket
    - Pinterest

    and besides the above mentioned i have had a quick view on Digg and Mix and even to Reddit

    and others more. I would choose a easy to use one. 

    Question: is there a google-tool also available. 

    At the moment i use the bookmark tool in Chrome. 

     

    which do you use!? 

    look forward to hear from you 

     

    regards, dil_bert 

  15. hello dear experts,  good day dear buddies on PHPFreaks - 

    good day - happy seasons-greetings to all of you - and a merry xmas. 
    btw: it would be great if we have a special wordpress-forum here. This would be great

    the topic of today - Width on mega menu dropdown - how to achieve that... 

    i am currently working on the customizing of the menubar of max-mega-menu. 
    what is aimed: i want to take a whole row in the theme twentyseventeen: 

    preliminiaries: -  I wanted the menubar to be between the logo and the center of the theme.
    ?
    my approach:
    I add this CSS:

    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    @media screen and (max-width: 600px) { 
        .navbar-header { width:100%} 
    }

    and changed the original sequence in the html code from:

    <div class="navbar-header">


    if(th_is_woocommerce_activated()) // Shopping cart
    <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">

     

    to


    <div class="navbar-header">
    <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
    if(th_is_wp-job-manager_activated()) // Wp-Job-Manager - the plugin for jobs 

    I have tried out this out - the above mentioned code - but i am not very happy with it. 

    i hoped that the above mentioned code solved the problem. But the Mega menu is extremly small on both desktop and mobile view now. I would like the dropmenu is getting the max width. 
    But I cannot figure out where to set the width?

    again - what is aimed: I am trying to make the mega menu occupied the full page width from the far left to the far right.
    I have almost tried everything that i can thing about. if the container that is dictating the width of the Mega Menu.  i guess that i need to make it separate from its parent div.

    i am trying to add this theme's custom CSS or child theme CSS

    @media (min-width: 1200px) /* i might have to add the code for other screen sizes too depending on the mentioned theme */
    .sf-menu .megamenu .megamenu_wrap {
        position: fixed;
        z-index: 999;
        width: 100%;
        margin-top: 30px;
    }
    	@media (min-width: 992px) /* i might have to add the code for other screen sizes too depending on the theme */
    .sf-menu .megamenu .megamenu_wrap {
       left: 0;
    }
    /* i think that i have to use !important where necessary if the changes do not reflect on the site.
     Refrain from using it unless absolutely necessary. */
    

    i think that i should test the code above on a  test site using Inspect in Chrome - the developer-toolset.
    i want to edit child theme or custom CSS box provided in the theme - since it is not clever to do the changes in the core theme.


    again - happy seasons-greetings to all of you
     - and a merry xmas. 
     

  16. hello dear all, good day dear php-freaks,

     

    i want to rssify content from another website into my wordpress-page:

    see the source: https://europa.eu/youth/volunteering/project_en

    well - is it possible to do this?

    of course - i have to ask bout the permission at the site of source.

    but the technical site is also interesting :do you think that this is doable!?

    note: i only am interested in the summary of the data - that is only a little piece of text.

     

     

  17. hello dear freaks  

     

    probably the Apache-supforum fits most here - for this setup-question. 

     

    I'm currently working on a setup of a server to host multiple websites on a single IP. Note: i am on openSuse and Webmin. 

    configurations and setup: i have installed Webmin on an OpenSuse-server.  I created the directory /var/www/sites/my_testsite. Then I created a virtual host under Webmin->Servers->Apache Webserver with the following settings:

    Address: Any
    Port: 80
    Document Root: /var/www/sites/my_testsite
    Server Name: my_testsite.com
     

    Address: Any
    Port: 80
    Document Root: /var/www/sites/my_testsite
    Server Name: my_testsite.com

     

    Then, to test it, I edited the hosts file on my local machine and added

    [my.server.ip.address] my_testsite.com. 

    Then went to my_testsite.com in my browser and encountered a issue: 

    the problem i encountered: the browser is loading the default site (at /var/www) instead of the virtual one I just have been creating
    (I verfied this by adding 

    different index.html files in /var/www and /var/www/sites/my_testsite).


    Well i muse what goes wrong here at the moment: 

    I have written down the directives and all the config-things: 

    Here are the directives webmin created in /etc/apache2/sites-available/webmin.1372499999999888777656578.conf

    DocumentRoot /var/www/sites/my_testsite
    <Directory "/var/www/sites/my_testsite">
    allow from all
    Options +Indexes
    </Directory>
    ServerName my_testsite.com
    ServerAlias www.my_testsite.com


    an update: i fixed this by adding directive ServerAlias domain.tld *.domain.tld
    i found this at the setup under Apache -> the Virtual Domain settings -> Networking and Addresses -> Alternate virtual server names FIELD.
    domain.tld *.domain.tld

    question: 
    - is it very important to add server name initially and then webmin virtual host edit/delete, 
    - i can imagine that if i do so, it does not updated the directive and subsequently the Server Name will be missing in it
    - so the question is: do i need to add the Server name and then Restarting apache in order to make it work? 

     

    Servers -> Apache Webserver: Select your virtual Server -> Edit Directives

     

    and subsequently: 

    Server Name: my_testsite.com
    Others -> Command Shell
    
    service apache2 restart


    i then opened the web address in browser.

    besides this: is it thinkable that the mixing with 'Any' with a specific port doesn't play nicely for some reason.


    so the question here is: should i try to run with the vhost settings to:

    Address: Any
    Port: Any
    Document Root: /var/www/sites/my_testsite
    Server Name: my_testsite.com

    and do not choose or select a specific port!?

    on a side note, should i do the setting of my sites to not allow directory indexing?


    look forward to hear from you 


    yours dil_bert

  18. good evening dear php-freaks, 

     

    hope you are all right. 


    i am currently working on a parser that gets  data via OSM Overpass API with PHP-SimpleXML. I am workin with the pretty new to the work with PHPSimpleXML so do not bear with me for askin newby questions.  I am tryin to get data using Open Street Maps. I want to write a code that works with the endpoint of openstreetmap - and the given data is the starting point for further explorations.

    My tactic is as follows:

     
    I fetch data from the openstreetmap-endpoint 

    1. i run requests to the openstreetmap-endpoint- (see below) and i try three different APIs per request isn't that easy on ressources and 

    2. I don't know how to work with the results that i gather from the OpenStreetmap-Endpoint

     

    as of the first point:  - workin on the endpoint of  OSM-Overpass-API.... see my approach: 

    
    <?php
    /**
     * OSM Overpass API with PHP SimpleXML / XPath
     *
     * PHP Version: 5.4 - Can be back-ported to 5.3 by using 5.3 Array-Syntax (not PHP 5.4's square brackets)
     */
    //
    // 1.) Query an OSM Overpass API Endpoint
    //
    
    $query = 'node
      ["amenity"~".*"]
      (38.415938460513274,16.06338500976562,39.52205163048525,17.51220703125);
    out;';
    
    $context = stream_context_create(['http' => [
        'method'  => 'POST',
        'header' => ['Content-Type: application/x-www-form-urlencoded'],
        'content' => 'data=' . urlencode($query),
    ]]);
    
    # please do not stress this service, this example is for demonstration purposes only.
    $endpoint = 'http://overpass-api.de/api/interpreter';
    libxml_set_streams_context($context);
    $start = microtime(true);
    
    $result = simplexml_load_file($endpoint);
    printf("Query returned %2\$d node(s) and took %1\$.5f seconds.\n\n", microtime(true) - $start, count($result->node));
    
    //
    // 2.) Work with the XML Result
    //

     

    so far so good:  with this i get a bunch of data..... 


    I have data in a file retrieved from a API pull request at the openstreetmap data source that looks something like this:

     

    <?xml version="1.0" encoding="UTF-8"?>
    <osm version="0.6" generator="Osmosis SNAPSHOT-r26564" xapi:planetDate="2014-10-07T15:42:02Z" xmlns:xapi="http://jxapi.openstreetmap.org/">
       <node id="251652819" version="6" timestamp="2013-10-19T14:03:10Z" uid="1198089" user="GeorgeKaplan" changeset="18434238" lat="48.8527413" lon="2.3333559">
         <tag k="dispensing" v="yes"/>
         <tag k="website" v="http://www.pharmacie-paris-citypharma.fr/"/>
         <tag k="name" v="Pharmacie Citypharma in downtown paris"/>
         <tag k="amenity" v="pharmacy"/>
      </node>
      <node id="251774849" version="9" timestamp="2014-07-28T21:28:26Z" uid="92075" user="Art Penteur" changeset="24411346" lat="48.8468043" lon="2.3696423">
         <tag k="phone" v="0143430996"/>
         <tag k="dispensing" v="yes"/>
         <tag k="name" v="Pharmacie de la Rapée in downtown paris"/>
         <tag k="amenity" v="pharmacy"/>
         <tag k="opening_hours" v="Mo-Fr 08:30-20:30; Sa 09:00-19:30"/>
     </node>
     <node id="263262912" version="3" timestamp="2014-07-28T21:37:24Z" uid="92075" user="Art Penteur" changeset="24411346" lat="48.8446917" lon="2.3101829">
         <tag k="dispensing" v="yes"/>
         <tag k="amenity" v="pharmacy"/>
     </node>


    and so forth and so forth ....etc.

    what is aimed: I am trying to filter the records based on the attributes that i find in the dataset,
     basically i am trying to retrieve the records that do not have a

        <tag k="name" v="blahblahblah"/> field.

     

    I have been looking around and the classical way to do it its easy, however because of my poor skills in doing anything 
    xml related i do have a couple of questions:

    Is it possible to apply xml filtering for tags that look like this

    <tag k="dispensing" v="yes"/> 

    ones that do not have the

     <tag></tag>

    .....format. Also how can i filter the records when each child of the node has different attributes,like v, 
    i would knew how to do it if it would look like this

      <tag k="name">Pharmacie in Paris-downtown -  Rapée-metro-station</tag> 


    but within this format received at this moment i cannot  not see a way out on how to get the children that i need

    i have had a quick look at the PHP-SimpleXML and the XPath-approach: it may help me in achieving what is aimed.

     

    but at the moment - i think i got stuck. 

     

    i greatly appreciated hints and some ideas that may fit her. 

     

    have a great day. -  yours dil_bert ;)
     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.