This question already has answers here:
Fatal error: Call to undefined function bccomp()
(1 answer)
Fatal error: Uncaught Error: Call to undefined function bcadd()
(2 answers)
Closed 3 years ago.
In the php documentation it say bcpowmod is available in php 5 and 7;
but yet it generates this error when I call it:
Fatal error: Uncaught Error: Call to undefined function bcpowmod() in /var/www/html/m_server/rsa.php:6 Stack trace: #0 {main} thrown in /var/www/html/m_server/rsa.php on line 6
my php version is 7.0.27-1;
<?php
ini_set('display_errors', 1);
$c="86783847632952977412086157561698243841978438961843526495248481240857540800614017742796157091701221586926521683406196232951346965101651654913853333085650688438660428140060738688295363790939030403663113072138797398019359530542546730283500339622261022663247354646694112723768264309805328780089319786037562291192214488451904988111676431033837081606505448192510640474394422008355618865476468661819287488467113947469066064351532882211055722742580973601215238607301587463704999000734946769990548457129880792474396943504719159957419427960698226323851531463715115829962063129967182895698939105651774298278618445630181392903579067705386501503424622616151507384709983459700805448223899164419189070843977815752563863588475502712438119988497573552779469083534213864790618248607122658013913186014816888901510955238307032045204457263801495403569694241566508819927514161696968685050229172515904442772033683417574230783704680046307727919574103050286602783573608426094599232802584618579738973419999663702376236337258483809546700130147658042814237744549458240705821040497452265471167128487575244533495484120735387077042971411156782721610194139107829736852115053243088786223095405479723223823923889351291061604592316562091202826842398663915387437585604";
$d="801665685888962888197244355884088727439852147080738599384144377429470366654760091829317271547663667107102634963299638571582670062299765457596581625546042480919883485650767793814981364729986819979010079615005445197035974890037933660206855787230268148967152098775913099326932632117226901576219789729374211873007220843565349910138877423270241765020138479950577344773811212067418198839640069663246598599280703915235208352274325047226192694506588063406721922738181096319148695850690404054801931592287128256478741056409246405670444940448497216507609489767759183168247268839949445073864727053124816942818790681169014344867634511901291066937920567017705184687592419928165669322008478022513161848810239449095792208785033427533322872409364729474503472728169548837899230837725517341986214499014590791748486944075718004125384809640974578599454121991026439095574324700306734940564683286827659354516913218016793396021022462783210922894523366494231641356077969171188025542933279442784522396359605530020771666753550799945626747810302259554267490367938977386460492598492541239378947561975189065440744663895679141964801213368229620012875799049950919160679135786728828907973303528749303513248751410937246551512936306242436519867393809170735195284582033";
$n="1009080091731743571693289351046278241659155498083785303035352630576483682623074792344677256278938918895213486490027434661118838548629426666048998770664368034265094380192339893659056461036168444300779464290105094723584425275005110019762929891439904806953870992537875327288233855319530969319723358035839083538610114708730118254922052965252983416320147803951157904283817950394929253204653540612303467376043089396012173967329974275344043917717479005713639124390046758142896479083599604550753931371023729968594615538237866970545537396039126533212829929914140390798168118502742034759840829272090061229622307933618363099135586969200319913219181083285817169327290144745937229465603077493943760681157087562540069184495178856684045027714672754211224808149519413663928777172520665297244664172704540586803832811952001281301884546420675460138826849834190710429042501652436751608626887733852781993360731407982325048521701074969303881260664281363419196819069525137620435949148247017351815733787896498196082515850943736055788543264778668878829810050965914513308763218840874107308940901471066562672957062596224174989283394676703932588704859675236701065558246056403144925176953413720405014347484111014961975119467666134936765515406687253464906925774503";
echo bcpowmod($c, $d,$n );
how can i solve this?
Related
This question already has answers here:
Fatal error: Declaration of .. must be compatible with .. PHP
(6 answers)
PHP: What does this error mean? Abstract method must be compatible?
(1 answer)
Closed yesterday.
I am getting an error that I have not been able to solve:
Fatal error: Declaration of & ADODB_mysql::MetaColumns($table) must be compatible with ADOConnection::MetaColumns($table, $upper = true) in /home/kajozbiz/easyloanman.kajozbizhub.africa/lib/drivers/adodb-mysql.inc.php on line 126
And below is the code on the line 126:
}
function &MetaColumns($table)
{
if ($this->metaColumnsSQL) {
global $ADODB_FETCH_MODE;
$save = $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
I have tried removing the line but the error move to the next line and so forth
This question already has an answer here:
What to do with mysqli problems? Errors like mysqli_fetch_array(): Argument #1 must be of type mysqli_result and such
(1 answer)
Closed 2 years ago.
I was writing this php code and then this error happened
Fatal error: Uncaught Error: Call to a member function fetch_object() on boolean in /storage/ssd3/364/15275364/public_html/ajax/ajax.dual.php:7 Stack trace: #0 /storage/ssd3/364/15275364/public_html/index.php(22): require_once() #1 {main} thrown in /storage/ssd3/364/15275364/public_html/ajax/ajax.dual.php on line 7
Here's my code
<?php
$qGet = $mysqli->query('
SELECT token, name, path, score
FROM photos
ORDER BY RAND()
LIMIT 2');
while ($dGet = $qGet->fetch_object())
$rows[] = $dGet;
Your call to mysqli->query returns false on failure, then you try access fetch_object method of that boolean so then you get your error.
You need to figure out why mysqli->query is returning false.
Documentation: https://www.php.net/manual/en/mysqli.query.php
This question already has answers here:
Reference - What does this error mean in PHP?
(38 answers)
Fatal error: Uncaught Error: Call to undefined function sql_regcase
(2 answers)
Closed 3 years ago.
I know that using PHP functions to avoid anti-sql injections is a bad idea, but I'm trying solve this function issue for custom purposes
function anti_injection($sql){
$sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"), "" ,$sql);
$sql = trim($sql);
$sql = strip_tags($sql);
$sql = (get_magic_quotes_gpc()) ? $sql : addslashes($sql);
return $sql;
}
I'm getting this error: Uncaught Error: Call to undefined function sql_regcase()
How can I solve this?
Thank you.
sql_regcase was deprecated in PHP 5.3.0, and removed in PHP 7.0.0.
https://www.php.net/manual/en/function.sql-regcase.php
This function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0.
Alternatives to this function include:
preg_match()
preg_quote()
source https://www.php.net/manual/en/function.sql-regcase.php
This question already has answers here:
How to solve the use of deprecated function ereg() of PHP 5.3.0 in Drupal 6.13
(8 answers)
PHP mail function doesn't complete sending of e-mail
(31 answers)
Closed 5 years ago.
I am very new to PHP. I did a contact form using HTML and PHP and I keep getting this error:
Fatal error: Uncaught Error: Call to undefined function eregi() in F:\xampp\htdocs\hotel\include\fgcontactform.php:548 Stack trace: #0 F:\xampp\htdocs\hotel\include\fgcontactform.php(387): FGContactForm->validate_email('lyubo841#gmail....') #1 F:\xampp\htdocs\hotel\include\fgcontactform.php(129): FGContactForm->Validate() #2 F:\xampp\htdocs\hotel\contactform.php(26): FGContactForm->ProcessForm() #3 {main} thrown in F:\xampp\htdocs\hotel\include\fgcontactform.php on line 548
I've been trying to fix it for hours but no success. I haven't provided any code because the code is long and don't know which part to provide.
Please assist and ask for the code if required.
ereg_replace function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0. So you must have to use preg_replace() function instead of ereg_replace() Where You Define In The COde
This question already has an answer here:
How to make PHP errors in text instead of HTML [duplicate]
(1 answer)
Closed 6 years ago.
I'm running a PHP script from the command line. Is it possible to disable HTML tags in error message?
For example, when an error occurs, instead of outputting like:
<br />
<b>Fatal error</b>: Uncaught exception 'Exception'
the error is output like this:
Fatal error: Uncaught exception 'Exception'
Add this line towards the top of the script:
ini_set('html_errors', false);