I have pear installed on my local windows machine (as part of an xammp install from apachefriends.org) and am using DataObjects. EVerything works fine locally.

I have a shared hosting account and installed the pear libs manually (copy and paste libs and ini_set to add to include path).

I can run a simple DB package based query but i can't get DataObject based ones to respond on the shared host.

If I deliberately screw up the path to pear I get the expected unable to find file errors. If I deliberately screw up the DB credentials in the DO ini file I get the expected DB connect fail error.

However if i set everything to the correct values I get no response what so ever, not even an error message. If I am viewing the folder the script is in in a browser and click on a link to a DO based script, the browser attempts to connect then just remains on the same page. I can't even echo out a manually. The behaviour appears exactly like doing a header based redirect to the refering page.

Can anyone help me with this problem?

Thanks

fgf

    Hi,

    where did you copy PEAR to and how does your ini_set look like ?
    If the hosted server runs apache and php you might try to put a .htaccess file in DOCUMENT_ROOT and set the include path in that file. Make sure that you set the absolute path to the PEAR directory.

    Thomas

      Thanks for the reply.

      I did get to the bottom of this last night.

      I Stepped through the thread of execution commenting out code until it would run with errors slowly letting more code run until i found the offending line(s).

      Basically it was interpreting this line (378 or so) in DataObject.php

      $this->_build_condition($this->table()) ;

      as static call to a non existant method with a name something like £"%$£%.

      Then it would totally fail if i left any further method calls runs.

      However rewritting the line as

      $temp=$this->table();
         	$this->_build_condition($temp) ;

      fixed it and allowed expected execution.

      Anybody who can offer any explainations of informed guesses as to why this should be so please speak up cos i'm clueless.

      I can only assume that it is some weird flaw in the php module or the server its self.

      fgf

        Hi,

        which version of PHP do you use ?

        Thomas

          Its 4.3.4 on the server and 4.3.6 locally

          fgf

            Hi,

            this is a known issue with DataObject.php and MMcache (if PHP has been compiled with --with-mm, I guess).

            The solution for this problem is exactly what you did ... splitting up the code.

            Either your local PHP installation doesn't have mm enabled or the module versions differ between the two servers.

            Thomas

              Can you point me to more info on the subject?

              thanks

              fgf

                Write a Reply...