GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Questions about working with php (https://gfy.com/showthread.php?t=1341038)

Hamilton Steele 01-21-2021 09:51 AM

Questions about working with php
 
I'm resurecting an old site of mine and sadly, it needs a good update and facelift. Now despite my education and best efforts, I remain a horrible coder. Let's just say there are good reasons why I always try to use my dick to make money and not my brain. I know that I'm an idiot and I've given up trying to hide it.

Problem: The original site is in php and it's over 10 years old.

Questions:

1. What do I need to download so that I can create a php enviroment on my desktop?

2. I've been working with Dreamweaver so long that I don't know anything else. Is there something better?

3. What other questions should a moron like myself be asking about this subject?



;

k0nr4d 01-21-2021 10:08 AM

Quote:

Originally Posted by Hamilton Steele (Post 22810188)
I'm resurecting an old site of mine and sadly, it needs a good update and facelift. Now despite my education and best efforts, I remain a horrible coder. Let's just say there are good reasons why I always try to use my dick to make money and not my brain. I know that I'm an idiot and I've given up trying to hide it.

Problem: The original site is in php and it's over 10 years old.

Questions:

1. What do I need to download so that I can create a php enviroment on my desktop?

2. I've been working with Dreamweaver so long that I don't know anything else. Is there something better?

3. What other questions should a moron like myself be asking about this subject?



;

1) XAMP
2) I use Notepad++, but alot use netbeans, php storm, sublime
3) Read up on xss, sql injection and csrf.

Klen 01-21-2021 10:08 AM

Try this: https://www.apachefriends.org/download.html

sarettah 01-21-2021 10:31 AM

I use WAMP on my desktop

PSPad as my editor

And keep a browser open to https://www.php.net/ for reference

.

Paul&John 01-21-2021 10:58 AM

WAMP + Notepad++ here as well :)

redwhiteandblue 01-21-2021 11:04 AM

You can run Apache and PHP on your desktop although the versions are slightly different to what a server would be running. If the code is really really old there may be some things that are deprecated in newer versions of PHP which might break it but if you run it on PHP 5.6 I don't think you'll find too many. Netbeans is good and free as an IDE, the latest versions need the Java SDK to install.

Hamilton Steele 01-21-2021 11:51 AM

Quote:

Originally Posted by redwhiteandblue (Post 22810214)
If the code is really really old there may be some things that are deprecated in newer versions of PHP which might break it but if you run it on PHP 5.6

The code is PHP 3. So it's REALLY OLD


I studied computer science in university but I have always been a less than mediocre when it comes to any kind of code. Which unfortunately also includes html, php, etc.

sarettah 01-21-2021 11:56 AM

Quote:

Originally Posted by Hamilton Steele (Post 22810238)
The code is PHP 3. So it's REALLY OLD


I studied computer science in university but I have always been a less than mediocre when it comes to any kind of code. Which unfortunately also includes html, php, etc.

Install an environment (Xamp, WAMP) make sure to have error_reporting turned on and try to run the code. You will get the errors back, go through and fix, rinse, repeat until you come up with a clean run.

Once you get past all the syntax and deprecated errors you can get down to making the code actually work again.

You will learn more about php code by going through the debug than any other method, just my opinion of course.

Edited in: My answer assumes that you want to learn php coding, of course.

.

Pink24 01-21-2021 12:46 PM

Am I the only one who doesn't like Notepad++

I prefer normal Notepad.

sarettah 01-21-2021 12:49 PM

Quote:

Originally Posted by Pink24 (Post 22810263)
Am I the only one who doesn't like Notepad++

I prefer normal Notepad.

Notepad++ gives you syntax highlighting and lists the functions for a shit ton of different languages.

.

CurrentlySober 01-21-2021 01:15 PM

i still use frontpage express...

Colmike9 01-21-2021 01:39 PM

Quote:

Originally Posted by sarettah (Post 22810267)
Notepad++ gives you syntax highlighting and lists the functions for a shit ton of different languages.

.

I need to use that more often, I usually do just black and white. Editors mess me up a lot, when I'm typing in brackets, quotations, etc, that get auto-closed, I end up not paying attention and doubling them.

Anyone remember having to run list then stop where you want to look at a section of code, or just printing it all out to debug? :upsidedow

Colmike9 01-21-2021 01:40 PM

Quote:

Originally Posted by CurrentlySober (Post 22810281)
i still use frontpage express...

Nexus ftw

Pink24 01-21-2021 02:21 PM

Quote:

Originally Posted by sarettah (Post 22810267)
Notepad++ gives you syntax highlighting and lists the functions for a shit ton of different languages.

.

I don't like the way it stores all old tabs. Like, I can edit an SQL in March and it's still there in September. No idea how to get tid of it. I close the tab and the next time I start the app it's back again.
Wouldn't mind but these SQL files are friggin huge.

I wouldn't even attempt to open that with normal Notepad though. Think it would shit the bed.

Pink24 01-21-2021 02:23 PM

Quote:

Originally Posted by Colmike7 (Post 22810291)
I need to use that more often, I usually do just black and white. Editors mess me up a lot, when I'm typing in brackets, quotations, etc, that get auto-closed, I end up not paying attention and doubling them.

Anyone remember having to run list then stop where you want to look at a section of code, or just printing it all out to debug? :upsidedow

Yeah, I don't like this either. Tags that auto close themselves. I know it's supposed to help but I end up putting them in twice and wonder why I have a load of errors.

Colmike9 01-21-2021 02:26 PM

Quote:

Originally Posted by Pink24 (Post 22810318)
I don't like the way it stores all old tabs. Like, I can edit an SQL in March and it's still there in September. No idea how to get tid of it. I close the tab and the next time I start the app it's back again.
Wouldn't mind but these SQL files are friggin huge.

I wouldn't even attempt to open that with normal Notepad though. Think it would shit the bed.

Maybe try turning off remember current session for next launch in Settings > Preferences > Backup?

sexchatvr 01-21-2021 02:31 PM

Wamp or Mamp to create local server. If you're connecting to a database you might need to change it from mysql to mysqli, other than that you shouldn't have too much trouble. My editor of choice is sublime but each to their own :)

Hit me up if you need any help. slowdown [at] gmail

sarettah 01-21-2021 02:32 PM

I have no idea on any of that. I do not use Notepad++, I have played with it in the past but I have been using PSPad for at least 10 years so it is my go to.

In PSPad, if you so not close the file before shutting it down, it will attempt to reopen the file when you start back up. But, if you close the file before you shut down, it does not do that.

I would imagine that Notepad++ is pretty similar.

The auto brackets and parens has never bothered me in any way, shape or form. They are right there on the screen. I can see them so I rarely end up typing them.

.

Hamilton Steele 01-21-2021 03:45 PM

Quote:

Originally Posted by sarettah (Post 22810242)
My answer assumes that you want to learn php coding, of course.

.

The only way that I'm going to stop being a moron is to keep learning different things.

I'm working through this but it's going to take me some time.

NatalieK 01-21-2021 04:03 PM

Quote:

Originally Posted by Hamilton Steele (Post 22810375)
The only way that I'm going to stop being a moron is to keep learning different things.

I'm working through this but it's going to take me some time.

not sure why, but your not accepting private messages???

wanting to send you a PM :thumbsup

Pink24 01-21-2021 04:05 PM

Quote:

Originally Posted by Colmike7 (Post 22810323)
Maybe try turning off remember current session for next launch in Settings > Preferences > Backup?

Nice tip :)

Cyber Fucker 01-21-2021 04:17 PM

Don't be so harsh on yourself.

As for the coding/testing your project locally I find EasyPHP most convenient/easiest, hence the name? (Sadly only for Windows OS)

Mentioned above Notepad++ is good for small edits. For coding in php bigger things/from scratch some php IDE.

sarettah 01-21-2021 04:39 PM

Quote:

Originally Posted by NatalieK (Post 22810386)
not sure why, but your not accepting private messages???

wanting to send you a PM :thumbsup

He just got to 30 posts.

.

NatalieK 01-21-2021 06:51 PM

Quote:

Originally Posted by sarettah (Post 22810412)
He just got to 30 posts.

.

how many posts do you need to make before you can accept messages?

Pink24 01-21-2021 06:52 PM

Quote:

Originally Posted by NatalieK (Post 22810500)
how many posts do you need to make before you can accept messages?

30 posts.

NatalieK 01-22-2021 01:27 AM

Quote:

Originally Posted by Pink24 (Post 22810501)
30 posts.

so how come still unable to send messages, and 31?

says, and I quote..

Quote:

Hamilton Steele has chosen not to receive private messages or may not be allowed to receive private messages. Therefore you may not send your message to him/her.

Applebite Media 01-22-2021 07:09 AM

Apache NETBEANS!!! Best damn program for coding out there and it's FREE!!!

See sig if you want help. I'm slow at the moment and can help if you need it. ;)

Hamilton Steele 01-22-2021 08:23 AM

Quote:

Originally Posted by sarettah (Post 22810412)
He just got to 30 posts.

.

I'm hoping to get back the original account I registered in 2003. So, I've been talking via email with one of the mods and I'll see how it goes. If I get it back, I'll have to start over againl


Quote:

Originally Posted by NatalieK (Post 22810647)
so how come still unable to send messages, and 31?

says, and I quote..

Bizarre but I'll take a look at my user cp

FYI: I've been talking to one of the admins and I'm hoping that they'll give me the account that I registered in 2003. If that happens then I'll once again need to post 30Xs in order to get private messages.

S3X_Jay 01-23-2021 06:51 AM

I use PhpStorm. It's a pretty good IDE.

You don't really need a to run PHP locally. Just create a dev area on your server and run it there. When you save a file in PhpStorm it can automatically upload it, so no need to jump through any complicated processes. And by running it on the server it will be the same exact environment as when you deploy it publicly, so no surprises down the road.

k0nr4d 01-23-2021 06:59 AM

Quote:

Originally Posted by S3X_Jay (Post 22811264)
I use PhpStorm. It's a pretty good IDE.

It's nice, but it doesn't do anything to justify a 200eur/year license cost

Applebite Media 01-23-2021 07:17 AM

Quote:

Originally Posted by k0nr4d (Post 22811268)
It's nice, but it doesn't do anything to justify a 200eur/year license cost



Agreed :thumbsup

I tried the demo.... It was ok but lacking.

S3X_Jay 01-23-2021 09:54 AM

Quote:

Originally Posted by k0nr4d (Post 22811268)
It's nice, but it doesn't do anything to justify a 200eur/year license cost

Click on "For Individual Use" and you'll see you can get it for a lot less than 200. Most people in porn don't work for big corporations, so individual use is probably the appropriate license.

And also notice the amount you pay goes down every year.

NickBaer 01-24-2021 04:45 AM

I use Komodo for actual php editing, but since 2015 I have liked Bootstrap pages...

So I find a Bootstrap site package that looks interesting, then copy/paste the design elements into my Komodo .php page. And I use my MojoHost SQL, as well as Google Sheets as data sources.

Like https://Coach-Karl.com or https://the-British-Beef.com or https://gay-dvds-for-women-and-men.com/

My sites are catalog pages, not member sites, and feature my self-built shopping cart, based on a plan from CCBill. CCBill is my payment processor. https://Porno-Mall.com is actually about 200 lines of .php, reading a massive Google Sheet.

Yesterday, I found a "Heat Map" sample page in js. (For sales statistics for a Cam site I broadcast on.) I used Komodo to make a .php script to read data from my Google Sheet, then output the .txt file in the format that the HeatMap script needs. Which BTW, is .html and .js! Not that I really needed to do this, as I only have a couple of hours a day to broadcast during, but it is practice for something bigger in the future. Such would look more interesting for a model who is on longer hours, or on multiple shifts per day.

http://www.coach-karl.com/ForumPics/HeatMap.png

k0nr4d 01-24-2021 05:32 AM

Quote:

Originally Posted by S3X_Jay (Post 22811310)
Click on "For Individual Use" and you'll see you can get it for a lot less than 200. Most people in porn don't work for big corporations, so individual use is probably the appropriate license.

And also notice the amount you pay goes down every year.

Yeah, In my case though I'm a software company so it's not individual use, and honestly if I had to blow like 2k euros per year on a text editor for all my staff when it doesn't really do much more then netbeans...

Edit: I just installed phpstorm demo version. At a quick glance not much here that netbeans doesn't have. I'll stick with notepad++

NickBaer 01-24-2021 05:46 AM

Since 2005, I have written many hundreds of .php scripts, some with Bootstrap, .js, and more like Google Maps, using Komodo.

I edit my page, upload the file to my MojoHost account (either via FTP or the Komodo built-in FTP save option), and refresh my Chrome page.

I never use a desktop environment, as what matters is the php runtime on MojoHost - with local files, SQL or Google Sheets data sources.

NickBaer 01-24-2021 06:02 AM

php.net is the source reference.

You can use StackOverflow as a reference. Use a fresh Google page to search on your php question. It will generally find a half-dozen StackOverflow threads.

Usually better to not pose a direct question on SO, but rather to use Google to search for previous threads. It will also find references on W3Schools, and other industry specific forums.

Reading SO threads can be a bit tedious. The OP states the question, then others jump in with wrong answers and misinformation - like here. So you do need to read all the way to the bottom, then by trial and error, find what works best for your instance.


All times are GMT -7. The time now is 02:39 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc