• Breaking News

    Tuesday, December 7, 2021

    Django 4.0 released web developers

    Django 4.0 released web developers


    Django 4.0 released

    Posted: 07 Dec 2021 03:23 AM PST

    Site keeps getting hacked: index.php and robots.txt files keep getting changed

    Posted: 07 Dec 2021 02:41 AM PST

    Not sure if this is the right sub to post but hopefully!

    So I'm literally in depression bcs of this!

    I've been running this site for nearly 4 years now, I published lots of articles and just when everything started going my way, the hackers keep redirecting my site to their japanese pages!

    Whenever this happens I just remove my wp core files and replace it with new wp core files, that turns down the problem for a few hours or one day at max but then they again somehow be able to modify my robots.txt and index.php!

    Here's what it looks like:

    index.php: https://ibb.co/vqfSk6H

    robots.txt: https://ibb.co/ZKJGW9X

    I've already done lots of steps like:

    1. Enabling 2factor on my wordpress, cpanel, my hosting account.
    2. Directory protected my wp-admin folder
    3. Changed my login url from wp-login to something that cant be guessed easily
    4. Disabled directory browsing
    5. Disabled php execution
    6. Changed all my cpanel's emails password
    7. Installed the plugin yesterday that would only let ME get to the login page, anyone whose ip is not whitelisted cant get to the login page!
    8. and what not!

    And despite all this my files keep getting changed and hence hacked!

    I'm so frustrated right now i just dont know what to do! :'(

    Any help is appreciated.

    submitted by /u/Lost_Chemical_7327
    [link] [comments]

    It's not Saturday, but I still want to show off my new photography website. I made it with Hugo, TailwindCSS, and not much JavaScript (yet!).

    Posted: 07 Dec 2021 04:58 AM PST

    What is the behaviour of flex-items, are they similar to inline elements or inline-block elements ?

    Posted: 07 Dec 2021 03:01 AM PST

    Concept of flex items :)

    submitted by /u/Upbeat_Combination74
    [link] [comments]

    The beginning of a journey

    Posted: 07 Dec 2021 05:00 AM PST

    Why do I need to use an npm package like serve to serve the build of my react app locally?

    Posted: 07 Dec 2021 04:54 AM PST

    I tried building my react app by npm run build. After that I tried to navigate with my file explorer to the build folder, then click on the index.html file that opens in my browser. For some reason my browser is not able to access the css and js files, so I just see a blank page. Then when I use a tool like serve to serve my build bolder, then it suddenly works fine. Why is that?

    submitted by /u/borii0066
    [link] [comments]

    are the udemy Web Developer Bootcamps good ?

    Posted: 07 Dec 2021 04:53 AM PST

    basically title. there are two of them one by a guy name colt steel, another a lady angela yu. in addition, do you think they can make you employable ? does hr respect these udemy courses ?

    submitted by /u/NEETWorkingAtHome
    [link] [comments]

    How to run WP-CLI command in the background from PHP?

    Posted: 07 Dec 2021 04:37 AM PST

    I tried asking this on SO, but was downvoted and marked as duplicate although I have clearly tried what is in the duplicate... So I'll try my luck here and hope I don't get triggered with negative emotions after spending hours on research and trying to get this solved:

    I have a long running script in WordPress that creates a report and writes it to an Excel-file, before sending it by email to the user. This project is now complicated enough that I run into timeout issues. I have therefore moved the script into WP-CLI.
    I have a button in the WordPress admin panel that fires an AJAX-request to run a function hooked into wp_ajax_{$action}. Then I was planning on running the WP-CLI-command with WP_CLI::runcommand() inside the function called by AJAX. The problem is that WP_CLI is not available at this point. I then tried to use exec and shell_exec:

    exec("wp command_name args"); 

    This works as I want it to, but it blocks the script from continuing, and the browser waits for the AJAX-request to finish. Ok, so I thought I would find a way to run this WP-CLI-command in the background somehow. I have tried everything I could find, but I can't get it to work.
    These lines run the command, but PHP hangs and is blocked until the command finishes:

    exec("wp command_name args"); 

    exec("wp command_name args > log.txt &"); exec("wp command_name args > NUL &"); exec("wp command_name args > \$null &"); shell_exec("wp command_name args"); shell_exec("wp command_name args > log.txt &"); shell_exec("wp command_name args > NUL &"); shell_exec("wp command_name args > \$null &");

    These work for getting the non-blocking functionality I am after, but the command seem to not run at all (I at least get no error messages in the Apache log, and the file the command is supposed to create is never created):

    exec("wp command_name args > /dev/null &"); 

    exec("wp command_name args > /dev/null 2>&1 &"); exec("nohup wp command_name args > log.txt &"); exec("wp command_name args > /dev/null 2>/dev/null &"); exec("wp command_name args &> /dev/null &"); shell_exec("wp command_name args > /dev/null &"); shell_exec("wp command_name args > /dev/null 2>&1 &"); shell_exec("nohup wp command_name args > log.txt &"); shell_exec("wp command_name args > /dev/null 2>/dev/null &"); shell_exec("wp command_name args &> /dev/null &");

    I can't for the life of me figure out how to run a WP-CLI command from PHP, but let it run in the background and do its thing without halting PHP execution.
    I am on XAMPP for Windows 10 right now for testing, if that matters.

    submitted by /u/trsdm
    [link] [comments]

    At what point during the Web Design process do you prefer to create the XML sitemap?

    Posted: 07 Dec 2021 03:24 AM PST

    Hi Everyone. I am new to the world of web design & development and I am currently working on a very small project as practice.

    I am at the stage where I have completed client and user research, created the project scope definition etc and just created a visual sitemap.

    I now need to create the XML sitemap. However, I need to include URL's, modified dates etc. I was wondering, though, at what point during the web design process people tend to create the XML sitemap?

    Do people create it early on, before the visual design stage but when they know the pages that are required? If so, what do you put in the "date last modified" fields?

    Or do they wait until the websites pages have been coded and then create the XML version just before the testing stage? To me this makes more sense as you can put the date created as the "last modified date".

    What do you all prefer to do? What do you all think is best practice?

    submitted by /u/PaulGardinerLP
    [link] [comments]

    No comments:

    Post a Comment