Problem with PDO wamp and CentOS

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jak82
Forum Newbie
Posts: 11
Joined: Mon Oct 15, 2007 4:21 am

Problem with PDO wamp and CentOS

Post by jak82 »

Hi There,

Im having problem getting my code to work on our test server which uses CentOS,
Its the old story of 'It Works on My Machine' I am running a wamp server on windows,

This is the code that is falling over on the server yet working fine locally

Code: Select all

 
function getSurveyInfo($numberofUsers,$userInfo)
    {
        echo $numberofUsers;
        for ($x=0;$x<$numberofUsers ;$x++)
        {
            $y=0;
            $stmt = $this->dbh->prepare("SELECT `sid` FROM `lime_surveys` WHERE `owner_id` = '".$userInfo[$x][uid]."'");
            if ($stmt->execute(array($_GET['name']))) {
            while ($row = $stmt->fetch()) {
            $results[$x][$y] = $row;
            $y=$y+1;
            }
            }
            if (count($results[$x])==null)
            {
            }
            else
            {
            }
        }
        print_r($results);
        return $results;
    }
 
It seems to be something with PDO, we have pdo turned on the machine as other functions work,

Any Help Appreciated,

Chris
Post Reply