Advertisement:

Author Topic: PHP is NOT rendering and MySQL PROBLEMS!!!  (Read 1624 times)

Offline xXxbigdogxXx

  • Semi-Newbie
  • *
  • Posts: 25
PHP is NOT rendering and MySQL PROBLEMS!!!
« on: September 24, 2017, 05:41:55 PM »
Hi guys, I am running a clean installation of SMF (Like not even installed yet). As soon as I extract the files I go on the website and the php is in text form.

My website is here: http://galaxygaming.us/

I've tried reinstalling PHP to no avail. If it helps I am on Ubuntu Server 16.04 clean installation.

So for the MySQL server, when trying to use SH for the server logon I get the following return error message

"

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

"

I have no idea how to fix that.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,105
  • Gender: Male
    • Kindred-999 on GitHub
Re: PHP is NOT rendering and MySQL PROBLEMS!!!
« Reply #1 on: September 24, 2017, 07:48:00 PM »
Appearing in text is, invariably due to the configuration not having been completed correctly. Use repair_settings.php to correctly set your directories and URLs.

The MySQL issue. You would need to talk to your host about.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline xXxbigdogxXx

  • Semi-Newbie
  • *
  • Posts: 25
Re: PHP is NOT rendering and MySQL PROBLEMS!!!
« Reply #2 on: September 24, 2017, 10:41:48 PM »
I control the server entirely. There is no host.

Offline xXxbigdogxXx

  • Semi-Newbie
  • *
  • Posts: 25
Re: PHP is NOT rendering and MySQL PROBLEMS!!!
« Reply #3 on: September 24, 2017, 10:43:44 PM »
No no no... It's not the them..

Literally it is showing the php file as if it was a text file.

please go to the website http://galaxygaming.us so you know what I am talking about instead of assuming the problem detail.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,313
    • StoryBB/StoryBB on GitHub
Re: PHP is NOT rendering and MySQL PROBLEMS!!!
« Reply #4 on: September 25, 2017, 02:45:39 AM »
That sounds like your server is more than a bit misconfigured.

Are you running Apache or nginx? I'd guess Apache, in which case you need to install the package that connects PHP and Apache.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,451
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: PHP is NOT rendering and MySQL PROBLEMS!!!
« Reply #5 on: September 25, 2017, 05:09:01 AM »
your site is showing "index.php" so i can see your Settings.php. Put a password on your database, just to be safe.

maybe this will help with MySQL > https://dba.stackexchange.com/questions/98467/how-to-solve-cant-connect-to-local-mysql-server-through-socket-error

Arantor is right, search for LAMP install doco for your OS BUT read this first > https://stackoverflow.com/questions/5121495/php-code-is-not-being-executed-instead-code-shows-on-the-page
« Last Edit: September 25, 2017, 05:36:52 AM by aegersz »
The configuration of my Linux VPS (SMF 2.0 with 140+ mods) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,313
    • StoryBB/StoryBB on GitHub
Re: PHP is NOT rendering and MySQL PROBLEMS!!!
« Reply #6 on: September 25, 2017, 07:21:23 AM »
All of that SO post seems to talk about configuring XAMPP or similar, and for quite old versions. In a Ubuntu setup it's more likely to be:

Code: [Select]
sudo apt-get install php5 libapache2-mod-php5

But as a general rule it's advised not to run your production site on an unmanaged VPS if you don't know how to do it, it's way too easy to make it insecure without realising.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,451
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: PHP is NOT rendering and MySQL PROBLEMS!!!
« Reply #7 on: September 25, 2017, 07:45:09 AM »
yes, sorry - it was just meant to throw up ideas and not to be taken literally.

I'd offer to help him out with his system but i'm working too hard most days and need to catch up on rest for now.

how about searching for: "step-by-step guide to installing LAMP on Ubuntu" ?
The configuration of my Linux VPS (SMF 2.0 with 140+ mods) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,313
    • StoryBB/StoryBB on GitHub
Re: PHP is NOT rendering and MySQL PROBLEMS!!!
« Reply #8 on: September 25, 2017, 07:53:51 AM »
Honestly the best advice right now is "use a hosting company" rather than DIY.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.