PHP mailer with html [duplicate] - 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

Related

PHP Warning in Wordpress [duplicate]

This question already has answers here:
What does the PHP error message "Notice: Use of undefined constant" mean?
(2 answers)
Closed 2 years ago.
I keep getting these messages on my custom post pages on my wordpress site....
Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /home/customer/www/stayjam.show/public_html/wp-content/themes/flatsome-child/template-parts/portfolio/single-portfolio-sidebar-right.php on line 1
Here is my line 1 but I can't figure out what I need to do!
<?php#
get_template_part('template-parts/portfolio/portfolio-title', flatsome_option('portfolio_title'));
?>
I'm assuming the warning is given as undefined constant php due to the opening tag in your php file.
Try to ensure the file is enclosed with <?php ?> tags.

php 7 Call to undefined function bcpowmod() [duplicate]

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?

The each() function is deprecated. This message will be suppressed on further calls PHP 7.2 [duplicate]

This question already has answers here:
How can I update code that uses the deprecated each() function?
(12 answers)
Closed 4 years ago.
I have the below each() line in a PHP file on a server where I recently upgraded the PHP version from 5 to 7.
while(list($file, $info) = each($this->images))
The error below is thrown by the web server after the restart.
The each() function is deprecated. This message will be suppressed on further calls
What will be the correct way of re-writing the above line of code in PHP 7.2?
Thank you.
You should be able to swap out your each for a foreach in the most part.
<?php
foreach($this->images as $file => $info) {
// ...
}

Call to undefined function set_magic_quotes_runtime() [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
So, on my website I'm getting this error:
Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /homepages/4/d661770438/htdocs/awptical/initdata.php:382 Stack trace: #0 /homepages/4/d661770438/htdocs/awptical/index.php(21): require_once() #1 {main} thrown in /homepages/4/d661770438/htdocs/awptical/initdata.php on line 382
Does anybody know what this means?
The function no longer exists in PHP 7, nor the setting it works with, so you will need to remove its usages. You will need to save the current state of your code and try to remove all the instances of this function call and see whether the site is working and if so, whether it is working as you expect it to work. Alternatively, you can implement a dummy version of the function and make it available everywhere:
if (!function_exists('set_magic_quotes_runtime')) {
function set_magic_quotes_runtime($new_setting) {
return true;
}
}
You are using PHP version 7.x.x, at which set_magic_quotes_runtime() was removed.
This function was DEPRECATED in PHP 5.3.0, and REMOVED as of PHP 7.0.0.

Fatal error: Uncaught Error: Call to undefined function ereg_replace() PHP 7 [duplicate]

This question already has answers here:
How can I convert ereg expressions to preg in PHP?
(4 answers)
Closed 3 years ago.
below code is giving me the fatal error in php 7
$jquery_click_hook = ereg_replace("[^A-Za-z0-9]", "", strtolower($value['name']));
is there any way to make it compatible with php 7?
Switch to preg_replaceDocs and update the expression to use preg syntax (PCRE) instead of ereg syntax (POSIX) where there are differencesDocs (just as it says to do in the manual for ereg_replaceDocs).
Your above code should be this way:
$jquery_click_hook = preg_replace("[^A-Za-z0-9]", "", strtolower($value['name']));
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()

Categories