Webapplication does not start

Greetings to the forum, a few days ago I registered on the site to test a web application developed in PHP that works quietly in my localhost with the following characteristics:

  • Apache/2.4.25 (Win64) PHP/5.3.13
  • Versione del client del database: libmysql - mysqlnd 5.0.8-dev - 20102224 - $Id: 65fe78e70ce53d27a6cd578597722950e490b0d0 $
  • Estensioni PHP: mysqli
    I just transferred the entire web application to my InfinityFree site by copying it into a subfolder of htdocs but if I try to start the web application by calling the following link: (termoidraulicapaita.free.nf/if0_37374346_caldaie/login.php

    )] it doesn’t start and gives me the HTTP ERROR 500 error. What could this depend on? Thanks

Website URL

(please specify the URL of the site on which you are experiencing the problem)

Error Message

(please share the FULL error message you see, if applicable)

Other Information

(other information and details relevant to your question)

Hi and welcome to the forum!

Plus, since you wrote your application for an older and unsupported version of PHP, you’ll also have to rewrite it to run on PHP 8.2 if necessary.

5 Likes

I imagined that this depended on the obsolete version of php. Can I ask you if in the paid version, where I saw that it is possible to select the version of php, the one I use is provided? Thanks

I don’t know, but I think everything from PHP 5.2 onwards should still be supported on premium hosting with HardenedPHP (so even PHP 5.3 and you won’t have any security problems as those PHP versions are still updated with latest patches). I still recommend you, though, to rewrite/update your software so that it runs on the latest PHP version to avoid any security vulnerability that might be available.

Oh, I also saw the database driver you use on your development platform is even older and more unsupported than the MySQL version we have, so you’ll probably have to update your database structure as well if it can’t be imported successfully.

6 Likes

It might just be that only the PHP client library is old (because it’s a very old PHP build), but a more modern server was being used. Also, it’s not impossible to design a database structure that works with all MySQL versions 5.0 and up.

Still, from the original post, I got the idea that this software was built yourself recently. If so, I EXTREMELY STRONGLY recommend to update your development server. Judging by the PHP version, it’s from May or June 2012. PHP 5.3 is ancient and contains tons of security vulnerabilities, so you should never write new software for such an old platform.

5 Likes

I thank everyone for the precious advice. I was and am aware of using very dated tools but this is simply due to the fact that it has been a long time since I developed and I was asked for a very small web application that manages very little data, which is not particularly sensitive. I therefore exploited what I had and left out aspects that, as you correctly suggested, become fundamental on recent platforms. In consideration of what has been said, I will evaluate whether to install a local WAMP platform on the machine or resume studying and migrate everything to more recent products. Thanks again to everyone also for the speed with which you gave me feedback. Good work

2 Likes

So, I updated the php version to 8.3.3 but my site still doesn’t work. I wanted to take a step back to avoid making mistakes. So, locally on my machine I’m developing my site in the /htdocs/site_name folder. I have a doubt. But when I go to transfer the webapplication to my site can I copy the files and the caftelle in a subfolder of htdocs or do I have to transfer everything to the root of htdocs? To tell the truth I tried and it doesn’t work in any of the ways but I would like to clarify. Thanks

This is the link to my application: https://termoidraulicapaita.free.nf/if0_37374346_caldaie/login.php

I would like to point out that locally, where everything works perfectly, I am testing the web application in the EasyPHP Devserver environment with the following modules:

Apache 2.4.25 x86 -
PHP 5.6.30 x86
Port: 80

MySQL 5.7.17 x86
Port: 3306

You can do either. As long as it isn’t above the htdocs directory, it will be accessible to visitors.

That’s probably the issue right there. Could you please try running it locally on PHP 8.2? That way you could update it successfully since you’ll be able to test it properly.

5 Likes

Good morning, as suggested I installed the PHP 8.2 version and recompiled the code but the result does not change. I would like to point out that the development of the web application is produced through the PHPMaker 2019 software which relies on Composer. Locally everything works correctly. Thanks

Please enable this

so we can see where the problem is
and since you don’t have a certificate, use this URL

http://termoidraulicapaita.free.nf/if0_37374346_caldaie/login.php

not httpS

6 Likes

Unfortunately, still nothing. Is it possible that it is a webserver problem?

I noticed that at root level the .htaccess file present, which I also deleted in the attempt to modify, did not have the login.php page in the Directory Index. What do you think?

Please Read that.

You should not and cannot delete the .htaccess file in the root directory. If you want to create your own .htaccess rule, create a .htaccess file in your htdocs folder

4 Likes

As suggested I activated the Alter PHP Config module and here are the error strings. It seems to me that it is due to the database connection but I’m not sure…

Fatal error : Uncaught mysqli_sql_exception: No such file or directory in /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/MySqlConnection.php:200 Stack trace: #0 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/MySqlConnection.php(200): mysqli_real_connect(Object(mysqli), ‘localhost’, ‘if0_37374346’, Object(SensitiveParameterValue), ‘if0_37374346_ca…’, 3306, ‘’, 0) #1 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/MySqlConnection.php(101): MySqlConnection->_connect(‘localhost’, ‘if0_37374346’, ‘’, ‘if0_37374346_ca…’, false, NULL) #2 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/phpfn15.php(6979): MySqlConnection->Connect(‘localhost’, ‘if0_37374346’, ‘’, ‘if0_37374346_ca…’, NULL) #3 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/phpfn15.php(6879): PHPMaker2019\lavoro\ConnectDb(Array) #4 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/phpfn15.php(6920): PHPMaker2019\lavoro\Conn(‘DB’) #5 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/login.php(351): PHPMaker2019\lavoro\GetConnection(‘DB’) #6 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/login.php(20): PHPMaker2019\lavoro\login->__construct() #7 {main} thrown in /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/MySqlConnection.php on line 200

1 Like

image

localhost !

5 Likes

Greetings to the forum, I changed the connection to the DB in the MySqlConnection.php file but the problem doesn’t seem to have been resolved. One question: is the sql304.infinityfree.com database password protected? This aspect is not clear to me.

Fatal error : Uncaught mysqli_sql_exception: Access denied for user ‘if0_37374346’@‘192.168.0.56’ (using password: NO) in /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/MySqlConnection.php:200 Stack trace: #0 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/MySqlConnection.php(200): mysqli_real_connect(Object(mysqli), ‘sql304.infinity…’, ‘if0_37374346’, Object(SensitiveParameterValue), ‘if0_37374346_ca…’, 3306, ‘’, 0) #1 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/MySqlConnection.php(101): MySqlConnection->_connect(‘sql304.infinity…’, ‘if0_37374346’, ‘’, ‘if0_37374346_ca…’, false, NULL) #2 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/phpfn15.php(6979): MySqlConnection->Connect(‘sql304.infinity…’, ‘if0_37374346’, ‘’, ‘if0_37374346_ca…’, NULL) #3 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/phpfn15.php(6879): PHPMaker2019\lavoro\ConnectDb(Array) #4 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/phpfn15.php(6920): PHPMaker2019\lavoro\Conn(‘DB’) #5 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/login.php(351): PHPMaker2019\lavoro\GetConnection(‘DB’) #6 /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/login.php(20): PHPMaker2019\lavoro\login->__construct() #7 {main} thrown in /home/vol3_8/infinityfree.com/if0_37374346/htdocs/if0_37374346_caldaie/classes/MySqlConnection.php on line 200

It is, because I saw the (using password: NO) part on the new error you posted and from that I presumed you weren’t using any password ay all. Make sure you use the hosting account password you find on the Client Area, also making sure to show it first on your side before you copy it; also, make sure not to share the password with everybody else, not even in the forum!

4 Likes

Perfect !!. The web app works. By modifying the connection parameters and entering the DB password I am online. I thank you for your valuable contribution and I congratulate you on the speed and competence with which you provided me with support. Obviously I don’t rule out returning to the forum for other questions and therefore mine is goodbye. Thanks again. :slightly_smiling_face:

3 Likes