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
For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
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., 2023: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho