i mean if i delete that line the erro go right ? but i have alot of error in the other file like user_register igot this error ( Warning : mysqli_stmt::execute() expects exactly 0 parameters, 1 given in /home/vol1_4/epizy.com/epiz_34199023/htdocs/user_register.php on line 25
Warning : mysqli_stmt::fetch() expects exactly 0 parameters, 1 given in /home/vol1_4/epizy.com/epiz_34199023/htdocs/user_register.php on line 26
Fatal error : Uncaught Error: Call to undefined method mysqli_stmt::rowCount() in /home/vol1_4/epizy.com/epiz_34199023/htdocs/user_register.php:28 Stack trace: #0 {main} thrown in /home/vol1_4/epizy.com/epiz_34199023/htdocs/user_register.php on line 28)
and by the way the same file works fine on 000webshot but i dont like it its so slow
The culprit does not have to be in a particular line
but it can be above or below that line
besides, itâs not enough to remove just one line and thatâs how you solved the problem
because all the code that can be below⌠depends on some parameter, variable, etc. that is defined in that line or above and you deleted it
i did remove all the function with the variable not one line but the same ,i think the problem is from infinityfree side im sorry to say that cause every think works fine on 000webhost and localy i dont know if there are deferance with 000webhost and infinityfree but the error only aprears in infinityfree,any fixes by the moderator or somthing like that ,and thank you for helping
@anon31714412 your forum account is disabled because you are using this acc as Clone of Raoufbakhtia to bypass the rate limit of the forum (the number of posts in a short period of time).
This is a forum, not a chat - so please be considerate.
Thank you in advance
I have no idea how this could be a hosting problem. Code is code, it does what you tell it to do, and it doesnât change behavior when you run it somewhere else.
The execute function only supports a params option in PHP 8.0 and higher, but our hosting is still on PHP 7.4. You can use the bind_param function to add query parameters, which works with basically any PHP version: PHP: mysqli_stmt::bind_param - Manual
The mysqli_stmt::fetch never accepts parameters.
The only occurrence for rowCount I see in the docs is for PDO, which is a different way to connect
That seems extremely unlikely to me. Your code clearly has problems, and I do not see any way how that behavior could change between different hosting environments (except for the PHP version, for that first error). All the mismatched brackets and such are coding errors.
If it does work on other environments, that means you code is not the same, or due to other factors takes a different branch through the code and hits a bit of broken code here that it doesnât hit elsewhere.
Please delete all the code you have with us, then take a copy of the code that does work, and upload those files to your account. Do not change anything other than the database connection settings. Then please try if you still get this issue.
for now idid redownload the file are in 000webhost and put it on infinityfree same issue and i ask chat gpt for this issue he said:
If the same code works without errors on 000webhost but produces an error on InfinityFree, it is possible that there is a difference in the MySQL server configuration between the two hosting providers.
You can contact the support team of InfinityFree to ask them for assistance with resolving the issue. They may be able to provide more information about the specific MySQL server configuration used on their platform and suggest changes to your code to make it work properly.
You can also try posting in the InfinityFree community forum to see if other users have encountered similar issues and found a solution. The forum is a good place to get help from other InfinityFree users and share your experiences with the platform.
It is worth noting that free hosting services like InfinityFree and 000webhost may have limitations and restrictions that can affect the performance and functionality of your website. If you are experiencing persistent issues with your website on these platforms, you may want to consider upgrading to a paid hosting service that offers more resources and features.
and this is py proof of the 000webhost same files can confirmt by link and the watermak of 000webhost
YOU CAN USE CHAT GPT FOR REFERENCE but NOT MAKING DECISION based on itâs reply!
If chat gpt said right, we need to check the requirements of your hosting files then only we can compare it with IF allocated specsâŚ!
So first kindly share the minimum requirement of php modules and version details for your source to run without any issue!
Then we can check with IF whether all the modules and machine required things given or not!
my website need at at least this versions:
php version 7.4.6
mysqli:Client API library version :mysqlnd 7.4.6
mysqlnd:Version mysqlnd 7.4.6
and on the data base side :
Web server:
Database client version: libmysql - mysqlnd 5.0.12-dev
PHP extension: mysqliDocumentation ,curlDocumentation, mbstring
PHP version: 7.3.32
Phpmyadmin side:
Version information: 4.9.5 and i did donwgrade my 000webhost php version to 7.4.6 and it works fine
This is PDO code. It even says PDO in the code. rowCount is a PDO method. For this to work, the $conn must be a PDO connection object.
But the $conn variable is a MySQLi connection object. The connect.php file where it originates from creates a MySQLi connection object.
That just isnât going to work. PDO and MySQLi are both perfectly fine to use for database connections (we provide both), but they each have distinct APIs. You cannot drop-in replace them.
And there is no possible way a hosting provider could change this behavior.
Please compare the connect.php file you have here with the one you have on 000webhost.com. Please make sure that the files are exactly the same, except for the database connection parameters (database name, username, password, hostname),
My guess is that you replaced the home.php file. But the problem wasnât in that file in the first place.
If you want to be sure the code is exactly the same, next time please delete everything and re-upload all files. Skipping the parts âthat are so simple it canât be the issueâ is attractive. But as you can see here, the problem can be in any line in the application, even the places you donât expect.