Andrew Kelly wrote:

On Sat, 2004-03-20 at 20:03, Chris Hewitt wrote:

Andrew Kelly wrote:

Hi all,

I just scanned the list archives and couldn't find my problem listed,
forgive me if I just did a poor search.

I've just been forced to take the 'emergency migration' of an active
website that uses php to communicate with a postgresql backend.
(php 4.2.3, apache 1.3.29, postgresql 7.2.4)

There was minimal communication with the previous "owner" and all I've
had to work from is a pretty weak Configuration Inventory document. I'm
sure I'll find scads more problems in the days to come, but at the
moment the critical one is this:

There is a script which calls php from the command line to import a
series of records generated on a remote site. The 'local' php was
compliled with (among others) --enable-mbstring --enable-mbregex, and
this functionality is available when the app is accessed through a
browser. However, when the script is run from the command line, it fails
claiming that it cannot find the function mb_ereg_replace(). The command
line script is being run as the same user that runs the online app, from
within the same tree.
php -i shows indicates that the same php.ini file is being used as I can
see in a phpinfo() call through the browser.

This is all very new to me and I have a ton of pressure from above
because this app is well used.


Why is more or less core functionality not available from the command
line? Where should I start digging? I'd really, REALLY appreciate any
pointers you can give me.

With great thanks in advance,

Andrew,

I've no direct answer unfortunately, but as I've seen no answers, I offer some thoughts that may be helpful.


Thank you, Chris, I appreciate that. When I posted my issue, I immediately received nearly a dozen mails from automated systems saying pretty much "I don't read this list, don't send me mail", but no other response ever came. I figured that this was a dead list and forgot about hoping to find any help in it. The next day I twigged to what my problem probably was and was able to fix it.

What IS the status of this list, please?

I know no more than you really. It used to be quite a popular list, though never the volume of php-general. Then the autoresponders started and I think a lot of people got fed up with getting a dozen of them replying to each post they did and so unsubscribed. I think its a relatively small list now. Its either that someone has subscribed all these automated email addresses, or that someone legitimately on the list is running MS Windows with a virus. I've exchanged emails with a few of these autoresponder admins and they have all been convinced its someone running MS Windows with a virus. I'm running Redhat linux as I have been since before I joined this list, and this is the only list that I'm on with this autoresponder problem.

Is the mb_ereg_replace() function that fails the first mbstring function that the code calls? If it is then I'd suspect the wrong php executable, if it is not then perhaps its the function overloading setting in php.ini. mbstring.func_overload needs to be set between 4 and 7 for the overloaded regex funtions to be available, by calling the base one (in this case ereg_replace()). Is the mbstring function being called directly or the base function and relying on the overload setting?


This is new to me and I'm not really sure I understand what you're talking about. Could you go into more detail or point me to some docu, please?

Yes. I got it from the manual at http://www.php.net/manual/en/ref.mbstring.php
The idea is that you can chose to use the main functions (e.g. ereg_replace) but because of the ini setting it will be overloaded and mb_ereg_replace actually called. I've not used the mbstring functions myself, so I was just looking up resources to see what I could come up with.


Regards

Chris

Reply via email to