Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Python, Lua and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Java, C, C++, Ruby, MySQL and Linux / Tomcat systems
PHP Warnings

Posted by Anji (Anji), 23 August 2002
When submitting a form to append to a text file, I get the error, "WARNING: REG_EMPTY" and have been unable to find any mention of the meaning of this in PHP references.  Anybody any ideas?

Posted by John_Moylan (John_Moylan), 24 August 2002
Don't quote this as a definitive answer, but I'll have a go.

First off, did the error give you a line number? and if so did it happen to be near a regular expression?

I think whats happening is you've passed an empty string to ereg().

Back in a few minutes, I'll go and check...


Posted by John_Moylan (John_Moylan), 24 August 2002
yep, seems so.
I can replicate this error with the code below


if (ereg('', 'someText')) print "success";


as you can see there is no regular expression in ereg (the regex should be the first argument) and it throws the error below.

: REG_EMPTY in /home/moylan/test.php on line 3

Have you mistyped a variable?

Do let me know what it was when you fix it though.


Posted by Anji (Anji), 28 August 2002
Thanks John, it was indeed a problem with an empty string being passed!

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2018: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: • WEB: • SKYPE: wellho