ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

libraries/Functions.php error. Not sure why though?

February 27, 2012 8:00am

Subscribe [1]
  • #1 / Feb 27, 2012 8:00am

    Mark Bowen

    12637 posts

    Hi,

    I recently upgraded a site from 1.x to 2.x and had a cron job that used to hit a template which would create a simple html page and then email the information using the email class in ExpressionEngine. I’ve updated everything to be 2.x syntax correct but I’m now getting this error below when hitting the template.

    A PHP Error was encountered

    Severity: Warning

    Message: mysql_connect() [function.mysql-connect]: Unknown MySQL server host ‘domain’ (1)

    Filename: libraries/Functions.php(659) : eval()‘d code

    Line Number: 74

    Anyone any ideas what this means and also how to fix it?

    Thanks,

    Mark

     

  • #2 / Feb 27, 2012 8:13am

    Mark Bowen

    12637 posts

    Hmmmm. Strange this one.

    I had deliberately left in the 1.x code for the email PHP until I had it all working completely however each line was definitely commented out in the code. Literally deleting all the code now allows the page to come up without an error.

    I’m still waiting to see if I get the email sent to me so will let you know if it ever comes through however that does seem to have gotten rid of the error there.

    I checked five times and every single line of code which wasn’t required was definitely commented out though so it appears like something very strange was going on here as those lines shouldn’t really have affected it at all. I’ve never ever had that happen before with commented out lines so not sure why ExpressionEngine would still be reading them thus causing the error here?

    Thanks,

    Mark

  • #3 / Feb 27, 2012 5:07pm

    Dan Decker

    7338 posts

    Hi Mark,

    Certainly odd, commenting out the code should have been sufficient.

    Noe that the template displays correctly, are there any other error indicators?

    Have you received the email yet?

    I look forward to your reply!

    Cheers,

  • #4 / Feb 28, 2012 3:30am

    Mark Bowen

    12637 posts

    Hi Dan,

    Yep very very strange. The email did come through in the end. Unfortunately yesterday everything that could go wrong did go wrong starting with only getting 10KB/s internet speed down to a random foreign driver coming to the door asking directions and with him unable to speak a word of English. You can probably guess how that went 😉

    Anyway it is all working now but still a little strange why leaving commented lines in made it baulk like that. I’ve checked the lines 5 times now and they are definitely commented out so really not too sure why it was doing that.

    Please go ahead and close this one out now though as all is good with the world again. Just thought I’d ask incase there was something I was missing somewhere though.

    Best wishes,

    Mark

  • #5 / Feb 28, 2012 6:32pm

    Sean C. Smith

    3818 posts

    Mark,

    Agree with Dan, very odd on the comment lines affecting the code. Closing at your request.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases