The online racing simulator
PHP Web Developing (Unrelated)
(11 posts, started , go to first unread)
PHP Web Developing (Unrelated)
Completely unrelated to LFS.


I'm kind of a newbie when it comes to web developing.
I've been working on an administration panel for my bio homepage about me.
Everything is working perfectly locally (xampp apache and mysql db on local computer).

But after uploaded to to my linux server (apache and mysql installed) I keep getting the internal 500 server error and its really grinding my gears.
I've downloaded the entire project to local computer and works fine with both cookies and mysql.

Now the question is: Do I need https in order for things to work properly?
The page is using jQuery, Javascript, HTML (of course) and PHP.

Try yourself:
#3 - Racon
I get "This site can’t be reached’s server DNS address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN" I looked it up with MXtoolbox's DNS tools and got "DNS Record not found".

That means it's not showing to the rest of the world, but you're seeing a 500 error. (I'd guess you have something in your windows hosts file that specifies the IP address of the linux server?)

You need to set your domain name to point to your server linux server - there should be a way to do it from your control panel for the domain name, but they vary so I can't be specific without more info. Look for something like 'Nameservers' or 'DNS setup'. Shout if you need any help Smile
Oh, my bad. I added a self generated SSL certificate. So I had to update the domain records abit. Changed the A record from me. to www. My bad. is the working link.

EDIT: I'm not that noob xD
With hours of research, I've found the solution for my issue I came here for earlier.

Okay, so.. I was running MySQL with PHP 7. But found out that PHP 7 wasn't compitable with MySQL anymore and there was a builtin extension for it (php.ini). I enabled that and switched my code to use mysqli instead of mysqli, its showing the pages and are able to insert into tables. I'd guess the rest of it should work too.

Sorry for the bump, I just had to let all the readers know.
#6 - Racon
Sorry, didn't know what you knew Wink

I'm getting a registration page now, but "Something went wrong, try again later..."
Yeah, I just haven't uploaded the latest files to db. Check back in 2 horus Smile
#8 - Ian.H
The mysql_* functions (and related module) have been deprecated for ages and finally removed in 7.x.

It sounds like you're using some real dated tutorials perhaps to learn from?

I'd go the PDO route personally for database stuff.

As for "do I need HTTPS?".. no, you don't _need_ it, but seeing as LetsEncrypt will issue free SSL certificates and the way everyone thinks they need to snoop on everyone's internet habits, enabling HTTPS is most definitely a plus.. and with HTTP/2 you'll often find it actually quicker these days than plain 'ol HTTP/1.1 =)


Ah, super outdated I guess then.
Yes, mostly learning. What's the difference between PDO and MySQLi? I've been reading a bit about it and seems like MySQLi has some improved performance.

Also, thanks for the info about https. I was using a self generated certificate for apache, I'm using https with LetsEncrypt. Thanks for that.
PDO == PHP Data Objects.

It's basically an abstraction to access multiple databases in the same fashion... so it takes modules, eg: pdo_mysql for accessing MySQL / Maria DBs, pdo_pgsql for accessing PostGreSQL DBs etc, but the code _you_ right then doesn't change. Makes it great if you wish down the line perhaps to decide that you want to use PostGreSQL instead of MySQL for example.

As for HTTPS.. self-signed is fine for local dev access.. but with LetsEncrypt being free and so simple to configure, as long as you have the access for it one way or another, it saves the additional "load this unsafe site" clicks in your browser =)

It's a long time since I've gone looking for PHP tutorials (I started back in v4.0x days 14 or so years ago) but there's definitely a lot around. If you focus on anything >=5.6 you should be pretty good. There were _some_ breaking changes between 5.x and 7.x but touch wood so far, even sites I coded back in 2003/4, the only changes I needed to make to get them up and running in 7.1 was swapping out mysql_* calls.

End of the day, have fun and explore. There's a lot of pros and cons of PHP and a _lot_ of political arguments on the interwebz about the language.. but personally I enjoy using the language.



PHP Web Developing (Unrelated)
(11 posts, started )