php script installation issue help!

Author
Emily Wilson Author
|
2 days ago Asked
|
14 Views
|
2 Replies
0

i'm totally stuck with this self-hosted php script i found, the installation is just failing constantly. it's one of those "free" ones we were talking about earlier, thought it would be a quick win but nope.

it's a simple little CMS clone, nothing fancy, supposed to be straightforward. the docs are kinda minimal, but it looked okay. i've been trying to get it running for like, the past three hours, and i'm just hitting a wall.

the problem is during the initial setup process. i go through the web installer, put in the database details, and then it just... breaks. doesn't complete, no success message, just a blank page or an error.

i've tried a few things:

  • checked my PHP version โ€“ server is running PHP 8.1, and the script claims it supports PHP 7.4+. seems fine.

  • made sure all the necessary folders had 777 permissions (i know, bad practice, but i was desperate!).

  • triple-checked the database connection details. user, pass, host, db name โ€“ all correct, i can connect via phpMyAdmin.

  • looked at the server error logs, and this is what keeps popping up. it's not making any sense to me:

    [01-Feb-2024 14:35:01 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/myscript/install.php:57
    Stack trace:
    #0 {main}
    thrown in /var/www/html/myscript/install.php on line 57

i'm completely stuck here. i really need to get this thing deployed. has anyone run into similar php script installation issues with older free php scripts? what am i missing? any common pitfalls for this kind of error?

thanks in advance!

2 Answers

0
MD Alamgir Hossain Nahid
Answered 1 day ago
Hey Emily Wilson, Battling a "free" legacy PHP script on a modern server can be a real headache, especially when it throws errors like that. (And hey, let's get that "i'm" capitalized next time you're not in the middle of a PHP war!) That mysql_connect() error is a classic indicator of a compatibility issue. Hereโ€™s the breakdown:
  • Your script is trying to use mysql_connect(), which was completely removed in PHP 7.0. Your PHP 8.1 server configuration simply won't recognize it.
  • You'll need to either find an updated version of the script that uses mysqli or PDO for database connections, or consider running your server with a much older PHP version (e.g., PHP 5.6) if absolutely necessary, though this isn't recommended for security or performance.
Given this, is migrating to a more modern, maintained CMS an option for you?
0
Emily Wilson
Answered 1 day ago

ahhh that makes so much sense, thanks for the heads up, now gotta figure out what modern CMS to even look at for something this simple...

Your Answer

You must Log In to post an answer and earn reputation.