Jump to content

Name cannot begin with the '' character, hexadecimal value 0x20. Line 1.


jakebur01

Recommended Posts

Any idea what would cause this error?  It doesn't matter what code I have or whether I use <? ?> or <?PHP ?>.  It always throws this error in a third party program I have called PopMonger that will allow you to run a php script to handle a returned e-mail.

Name cannot begin with the '' character, hexadecimal value 0x20. Line 1.

 

I changed my code to this:

<?$Popmonger = new Popmonger();$body = $Popmonger->BodyText();$pattern = '~fax\s+#\s+:\s+\K(??!from).)+~i';preg_match($pattern, $bodytext, $matches);$faxnumber = trim($matches[0]);$body = $Popmonger->BodyText();$pattern = '~fax\s+#\s+:\s+\K(??!from).)+~i';preg_match($pattern, $bodytext, $matches);$faxnumber = trim($matches[0]);$myFile = "vsifax_failures.txt";$fh = fopen($myFile, 'a') or die("can't open file");$stringData = "$faxnumber\n";fwrite($fh, $stringData);fclose($fh);?>

 

I am still getting:

Name cannot begin with the '' character, hexadecimal value 0x20. Line 1. Position 12.

 

The error is always Line 1. Position 12. no matter what I put in the file.

<?php $Popmonger = new Popmonger();$body = $Popmonger->BodyText();$pattern = '~fax\s+#\s+:\s+\K(??!from).)+~i';preg_match($pattern, $bodytext, $matches);$faxnumber = trim($matches[0]);$body = $Popmonger->BodyText();$pattern = '~fax\s+#\s+:\s+\K(??!from).)+~i';preg_match($pattern, $bodytext, $matches);$faxnumber = trim($matches[0]);$myFile = "vsifax_failures.txt";$fh = fopen($myFile, 'a') or die("can't open file");$stringData = "$faxnumber\n";fwrite($fh, $stringData);fclose($fh);?>

 

Does not give me this error on my machine. It's a server issue, not a PHP code issue.

I opened it notepad and this is what I have:

<?php $Popmonger = new Popmonger();$body = $Popmonger->BodyText();$pattern = '~fax\s+#\s+:\s+\K(??!from).)+~i';preg_match($pattern, $bodytext, $matches);$faxnumber = trim($matches[0]);$body = $Popmonger->BodyText();$pattern = '~fax\s+#\s+:\s+\K(??!from).)+~i';preg_match($pattern, $bodytext, $matches);$faxnumber = trim($matches[0]);$myFile = "vsifax_failures.txt";$fh = fopen($myFile, 'a') or die("can't open file");$stringData = "$faxnumber\n";fwrite($fh, $stringData);fclose($fh);?>

 

But, if I only put tags in there, I get the same error.  I have tried posting to the support group from the company, but I have yet to receive a response. http://support.mach5.com/showthread.php?tid=139

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.