I have been working on my first PHP contact form.
I have also been running into some problems. I have gotten the files to all talk to each other, and it has gotten to the point where it looks like it is going to work. But, after you input the information in the form, press send, it comes back with this error:
Deprecated: Function eregi() is deprecated in /home/content/12/11666412/html/phpMailer/class.phpmailer.php on line 594
Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.gmail.com:587 (Connection refused) in /home/content/12/11666412/html/phpMailer/class.smtp.php on line 122
Thank you!
So, I assume 2 things:
1: I should try using a different port # for connecting to google (587 has worked for me in the past on a different server, is this something that sometimes changes?). What port number should I be using?
2: Something is wrong in the PHP mailer files (that I downloaded from the PHPmailer site). Should I try redownloading them? I doubt anything is wrong with the PHPmailer, seems to be a very reputable tool that people use, the code is too advanced for me to analyze.
Any help would be appreciated.
Related
I'm running a wordpress/woocommerce website running PHP7 on Windows IIS.
After clicking update plugins, I now get the following error when trying to do anything in the WP dashboard (the actual website still works fine, just not when logged in to WordPress):
Fatal error: require_once(): Failed opening required 'C:\inetpub(dir removed)\wordpress\wp-content\plugins\code-snippets/php/admin-menus/class-manage-menu.php' (include_path='.;C:\php\pear') in C:\inetpub(dir removed)\wordpress\wp-content\plugins\code-snippets\code-snippets.php on line 75
Line 75 of the code snippets file is:
/* Load the class */
require_once $class_path . "class-{$class_file}.php";
I tried the recovery email, but just got the message:
Recovery Mode not initialized.
I can't see that may be wrong - any ideas of next steps to try?
Thanks, Mark
I don't know why - but now the site appears to be working. It's as if WP "fixed itself" after a period of time (approx 30 minutes).
So if you get this error - try leaving it for a little while and see if it resolves itself. If anyone knows why/how it can do this, please say. Thanks, Mark
I'm trying to connect to a Firebase Database server but I'm getting:
PHP Fatal error: Uncaught Error: Call to undefined function ibase_connect()
It was working good, but today it started to throw that error. I've been for the last hours searching on the internet in every page, even in Portuguese, but nothing helps.
Almost in every post they are dealing with W/L/XAMPP, but that doesn't help.
I'm trying this on a valueserver shared host (I don't even know which company is that). PHP Version: 7.2.1
The file is running via cron job.
This is what I'd tried:
Verify in php.ini that interbase is uncommented.
Look for server errors (none).
Please I don't know what to do.
I'm currently trying to connect to a MSSQL database, but from what i've read so far, there are actually extensions and files that i need to download from microsoft itself which i've went and download it here.
https://www.microsoft.com/en-us/download/details.aspx?id=20098
The error that i'm receiving currently receiving is the following.
Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in C:\xampp\htdocs\index.php:5 Stack trace: #0 {main} thrown in C:\xampp\htdocs\index.php on line 5
As far as i understand, i know that i'm supposed to append some extensions into the php.ini located in my xampp\php\php.ini file. However, even after appending the file from microsoft, i still can't seem to get connected.
I heard some people mentioned that the php version that i'm using which is currently PHP Version 7.1.1 has some issues connecting back to MSSQL databases but i'm not entirely sure.
Would someone be able to point me to right direction? i've tried looking up and down appending different files into the extension but i still can't seem to do it.
Thank you very much in advance.
edit:
PHP 7 on IIS: Call_user_function could not be located
i've also visited this link, however i'm unsure whether if this is related to the issue I have as i'm on 7.1
I am trying to uplaod my web to a host, I've had some problems I managed to solve but no this one. It's related to the database, and it only happens sometimes.
In some cases I have to query the database or even for the user registration it works fine, but in other cases I got the error:
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346
I debugged the error (thanks #Valeh Hajiyev: CodeIgniter: Unable to connect to your database server using the provided settings Error Message) and in every case the connection seemed to be fine.
I hope someone who has had this problem before could help me.
EDIT: Oh snap! I just found out that refreshing the page a couple of times makes it work. What??
I'm getting what looks like rather serious database errors in my CodeIgniter application. In the log file it says:
User anders already has more than 'max_user_connections' active connections
And there are several hundred of those lines... I've read a bit by Googling, and some suggested that it was because you didn't close the connection after it was used, but others said that this was nonsense, and that the connection was automatically closed (which is what I read in the docs too).
Also, later in the log file, I have these error messages:
ERROR - 2011-10-12 10:50:19 --> Severity: Warning --> file_get_contents(http://localhost/expertinfo/error/error_general) [function.file-get-contents]: failed to open stream: HTTP request failed! /Applications/MAMP/htdocs/expertinfo/application/errors/error_general.php 4
This seems to have something to do with the fact that I'm using a custom error page by using
echo file_get_contents($config['base_url'] . 'error/error_db');
to redirect to a custom page.
Finally, I'm also getting:
ERROR - 2011-10-12 10:52:19 --> Severity: Warning --> mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on 'mydb24.surftown.se' (4) /Applications/MAMP/htdocs/expertinfo/system/database/drivers/mysql/mysql_driver.php 88
In these last two, I don't understand what the local path is doing there (The path to my CodeIgniter app on my computer). I mean this is a part of the system folder and the one on the remote server should be used, right? I have the database set up as the remote database, and I don't have any local paths as far as I know....
So why does this happen, and what can I do about it?
Please help, this seems rather urgent. I'm a bit of a newbie to both php and CodeIgniter too, so a clear and simple answer would be greatly appreciated!
Local path as I see shows you file where your error happened, because your driver /Applications/MAMP/htdocs/expertinfo/system/database/drivers/mysql/mysql_driver.php possible on it's 88 line contain connect() function and it raise an exception
The problem is with your mydb24.surftown.se remote server, you should check your access credentials, etc. to find what exactly happened
Just an FYI, mysql_pconnect is usually a bad practice on shared hosting (you can see why here:http://stackoverflow.com/questions/1830830/advantages-disadvantages-of-pconnect-option-in-codeigniter)
You might just disable pconnect on application/config/database.php and see the error going away as your connections will be realluy lower.
For the quote: "mysql_pconnect is usually a bad practice on shared hosting".
I changed to use mysql_connect. It made no difference.