Jump to content

PeterBubresko

Members
  • Posts

    29
  • Joined

  • Last visited

About PeterBubresko

  • Birthday 06/17/1975

Profile Information

  • Gender
    Male
  • Location
    Oslo/Tromsø
  • Interests
    I work and have worked as a Journalist alongside a job as a professional fisherman when I have been in Tromsø. I have lost that job, but today I work as a Journalist for Norwegian TV2. There my colleague and I are the hosts of the morning broadcasts. Therefore, many of my areas of interest are related to TV or journalistic areas. Now I want to learn programming to see if I can use this in my job as a journalist, Appreciate Norwegian nature and love to exploit nature.
  • Age
    49

Recent Profile Visitors

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

PeterBubresko's Achievements

Member

Member (2/5)

1

Reputation

  1. I try to run my PHP code in VS Code, but get a message in the console telling me: Cannot evaluate code without a connection. I tried to set up a connection to my webhotel MySQL account, but nothing happens. And why can't I choose "Debug PHP Script" from the context menu to the right for the play/debug button in the upper right corner? Other choices except Run PHP Script are disabled.
  2. Moderator: I was looking around and asked myself. Did I post this thread in the wrong place? If so, please place it in the right section and delete what I am writing now.
  3. Thanks, Gizmola🥰 You saved my day. Not only this day, but a lot of days with troubleshooting.
  4. Thank you for the solution requinix. I am sure it will work for others, but the problem stil resist for me. I read some about it, and it could be something about adding PHP to the windows path (or something), but i dont understand how to fix it because this Indian guy is talking so bad english and way to fast. Is the correct way using 2 \\ or one, on both the "php.executables": { "PHP8.4.3 ": "C:\\laragon\\bin\\php\\php-8.4.3-Win32-vs17 x64\\php.exe", }, "php.executablePath": "C:\\laragon\\bin\\php\\php-8.4.3-Win32-vs17x64\\php.exe"
  5. Point taken Gizmola🫡 PHP on webhotel server is 8.4...🫣🫢 Now I am running 8.4.3 on local webserver too. (shame on me). So now Laragon PHP is upgraded. Thanks for waking me up Gizmola
  6. I got this message, but I have no idea what to write where. I need a step-by-step guide to get this right. Is it okay to use the php.exe that is in Laragon? In that case, php.exe is in the path and folder: C:\laragon\bin\php\php-7.4.33-Win32-vc15-x64\php.exe Thanks for all your help, below is the image file with the error message:
  7. Before I had a debugging script I pasted it on top of the .php file. The result was shown as ... or, on a white and orange screen. Does anyone have that little script block? Could you please tell me where to find it, or please give it to me?
  8. Thanks to both of you. I am so new to this so got to admit I don't know what is or what, or what is the best way to do this or other things, but I am learning. So for now I move the file(s) outside of the www dir, and later when my experience has grown, I will use Moorcams solution. I Choose to do it this way because I don't need more scripting to remember now. So, for a later time when I have other things under control, I keep in mind Moorcams solution.
  9. Thank you Maxxd. Could this be done without moving the includes directory outside the www directory by only changing the permissions on the includes directory while inside the www? directory?
  10. Quote from a book: Instead of repeating this code at the top of every file, we can move it to an include file. Include files are just like normal PHP files, but typically they contain snippets of code that are only useful within the context of a larger scripts. As such, as with templates, we don't want people to be able to navigate directly to these files by typing the filename into their browser, as they only Structured PHP Programming 224 contain small snippets that won't produce any meaningful output on their own. We'll solve this problem the same way we did with templates: by creating a directory outside the public directory, so that any files are placed in this new one directory can only be accessed by other PHP scripts. We'll call this directory includes, and use it to store our code snippets. Inside the new includes directory, create a file called DatabaseConnection.php and place the database connection code inside it: Quote end. Does this mean that I/you create an area outside the www directory on the server, or is the new "includes" directory placed in the root of www directory?
  11. Thank you both very much. These answers were very well explained. I Will come back to these topics. It was a lot to digest at once.
  12. I am trying to read me up on PHP again, and now I am trying to understand what a framework is, and what a controller is, and what a controller does. Okay, first thing first. I have understood or misunderstood that a framework is a platform or an application developers are using to program or set up a site or a script like VS Code or Dream Weaver etc. If I read about a framework on another website a framework is like a template. Can someone please tell me what it is. There is also this with controls. Is this a script that will operate in several places or be called on several times? To save time, this is put into a separate file that is called on from different places multiple times. What is the right thing here, and am I completely out of my mind? I am confused about this.
  13. First thing first: What do the three letters, GIT, mean in GitHub? What is a GIT? Apart from that, the word "mode" was used in a lack of a better word. Thank you for all your well-explained answers. Since I'm a small-scale "hobby programmer", I'll give GitHub a chance, but it will probably mostly be in private "mode". Docker has a utility value equal to zero in my eyes. So, I may have more questions about GitHub coming up.
  14. Thank you requinix. I understand that Docker is complicated, and I don't see that it's something I absolutely need, at least not yet. But the questions still arise. As I understand you, and what I have read about Docker online, Docker is "a place" where you find PHP, MySQL etc. as a kind of pre-installed "something" so that you don't have to burden your computer with heavy tasks and in some cases to save space. When it comes to saving storage space, I guess GitHub is a more suitable place/service, because as I understood you, it's something that can be compared to a "repository", because that's what it is, right? I don't know if I'm on shaky ground now, but in my small-scale hobby programming projects, it's just as well for me to install MySQL and PHP locally on my computer and let "my old trotter" struggle a little more, it's despite all not the heaviest tasks I feed my computer with. As for GitHub, this seems more applicable and more relevant to me. A question that quickly arose, and which I think I have heard talked about or read online. Does GitHub work in two different modes? Is it designed so that in public mode the code is open to everyone so that they can go in and correct the code or comment on the code? By correcting the code, I mean that you can give help and get help from others who can read the code on GitHub. Maybe I was completely wrong now? Eagerly waiting for a reply.
  15. I am trying to familiarize myself with, install and configure Visual Studio Code, but this seems like you have to be a skilled programmer just to set up VS Code. Among other things, there is a file called Json, or something similar. This file that needs to be configured. Have no idea what this is, or what to do with that file. Here you have to enter commands and paths that I have no idea what they are, or how they should look/point to etc. I will primarily use VS Code for PHP, MySQL and Python, and eventually for JavaScript. Is there anyone in here who can help me with the installation and configuration? During the installation, I get to a step where I have to choose from several boxes, but I can't find anything about debugging PHP or MYSQL, which I will primarily use VS Code for, and what is this Docker and GitHub? Do I need it, and for what? I'm still new when it comes to programming, so I need input at the feeding me kindly T-Spoon level. Can someone please help me understand this?
×
×
  • 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.