Advertisement:

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

Offline xXxbigdogxXx

  • Semi-Newbie
  • *
  • Posts: 19
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/ [nofollow]

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: 55,115
  • 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: 19
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: 19
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 [nofollow] so you know what I am talking about instead of assuming the problem detail.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,047
    • Arantor 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • 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 »
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,047
    • Arantor 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • 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" ?
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,047
    • Arantor 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.