Machform PHP Errors

We recently upgraded our GoDaddy hosting platform to cPanel. We are now getting some errors on a form we have on our website. Our web developer is unable to assist at this time and I need to figure out how to fix these problems on my own. I've tried going into the php files and looking at the code on each line, but can't make sense of what needs to be changed. Can anyone help me figure this out? Below are the error we get when submitting the form.

Warning: date_default_timezone_set() expects exactly 1 parameter, 2 given in /home/business/public_html/machform/includes/entry-functions.php on line 336

Deprecated: Function eregi() is deprecated in/home/business/public_html/machform/lib/class.phpmailer.phpon line 591

Warning: fsockopen(): unable to connect to relay-hosting.secureserver.net:25 (No route to host) in/home/business/public_html/machform/lib/class.smtp.php on line 122
Error sending email: SMTP Error: Could not connect to SMTP host.
Warning: date_default_timezone_set() expects exactly 1 parameter, 2 given in /home/business/public_html/machform/includes/entry-functions.php on line 336

Deprecated: Function eregi() is deprecated in/home/business/public_html/machform/lib/class.phpmailer.phpon line 591

Warning: fsockopen(): unable to connect to relay-hosting.secureserver.net:25 (No route to host) in/home/business/public_html/machform/lib/class.smtp.php on line 122
Error sending email: SMTP Error: Could not connect to SMTP host.
Warning: Cannot modify header information - headers already sent by (output started at /home/business/public_html/machform/includes/entry-functions.php:336) in/home/business/public_html/machform/embed.php on line 42
ITPro44Asked:
Who is Participating?
 
ITPro44Connect With a Mentor Author Commented:
Upgrading machform resolved the problem.  Thanks everyone for your help!
0
 
Marco GasiFreelancerCommented:
The first error is what it say to be: the function date_default_timezone_set() expects 1 parameter and in your code is called passing it 2 parameters. Since Php 5.1.0 this function has been rewritten so maybe it required two parameters in older versions of Php (you can read about here http://www.php.net/manual/en/function.date-default-timezone-set.php)

The functions ereg() and eregi() are deprectaed: now you have to use preg_match or preg_match_all

fsockopen and email errors probably refer to server settings and you should tell about to GoDaddy (I heared no good things about this provider but I don't have a direct experience)

Summarizing, I fear your code is outdated and probably there are several parts of it which need to be rewritten. I'm sorry, but I don't think this can be done so quickly and easily as you wish.

Best of luck
Marco
0
 
GaryCommented:
For the error Warning: date_default_timezone_set()
Go into your php.ini and set your timezone locale
http://php.net/manual/en/timezones.php

For the error Warning: fsockopen(): unable to connect to relay-hosting.secureserver.net
GoDaddy uses a relay hosting so you will need to go to your mailer code and set the username/password and make sure the From field is using an address from your domain
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
Your version of PHP has been upgraded in the change to PHP 5.3 I believe.  You will have to get your programmer involved because I think you will probably see more errors after you fix these.
0
 
GaryCommented:
see more errors after you fix these
Very probably...
0
 
GaryCommented:
If you know what the old version was and it is still installed you can revert back to it.
http://www.siteground.com/tutorials/cpanel/php_version_change.htm
0
 
Dave BaldwinFixer of ProblemsCommented:
Godaddy has been trying to get all their clients to upgrade PHP to version 5.3.  They still had people on PHP 4.4.  I got one job last year because the client was 'automatically' upgraded from 4.4 to 5.3 and everything stopped working.  The farthest back Godaddy would go was PHP 5.2.  They wouldn't let them go back to PHP 4.4.
0
 
ITPro44Author Commented:
OK, so I'm not attempting to upgrade the machform as it appeared the PHP was outdated.  When attempting the upgrade I get the following error:

Fatal error: Class 'PDO' not found in /home/business/public_html/machform/includes/db-core.php on line 12

Any ideas?
0
 
GaryCommented:
In php.ini again, look for
extension=pdo.so
extension=pdo_mysql.so


And remove the # from the beginning of the lines, if they don't exist then add them
Restart Apache
0
 
ITPro44Author Commented:
This is what our php.ini fiel loks like.  How should I modify it?  And how do I restart Apache?

Set session.auto_start = 1
Set register_globals = 0
allow_url_fopen = on
date.timezone = "US/Pacific"

expose_php = Off
max_input_time = 600000
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = localhost.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
upload_max_filesize = 700M
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-2.5.7
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-2.5.7
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so                                                                  
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so                                                            
session.bug_compat_42
post_max_size = 700M
0
 
GaryConnect With a Mentor Commented:
Just add those two lines to the end of the file and save
To restart goto Restart Services menu and select HTTPD
http://docs.cpanel.net/twiki/bin/view/11_30/WHMDocs/RestartServices

You can enable PDO thru easyApache, exhaustive options
http://docs.cpanel.net/twiki/bin/view/EasyApache/WebHome
0
 
ITPro44Author Commented:
I got PDO working, thanks!  I'm now awaiting Machform support to respond to me with instructions on how to reset the admin password as the password info changed during the upgrade.  I'm hoping that will be the last of it.  We'll see...
0
 
Terry WoodsIT GuruCommented:
If you want help converting patterns for ereg* calls to preg* then you'll get an excellent response if you post to the Regular Expressions topic area.
0
 
ITPro44Author Commented:
thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.