Results 1 to 4 of 4

Thread: PDO Usage from Command Line

  1. #1
    Member paradiselost's Avatar
    Join Date
    Apr 2004
    Location
    Lincoln, NE
    Posts
    31

    Default PDO Usage from Command Line

    I'm trying to run a PHP script from the command line that utilizes PDO and I get this error message:

    Code:
    Fatal error: Class 'PDO' not found in /path/to/my/file.php on line 365
    This file works fine if called via HTTP, but I get this error when running the file with PHP in the command line like this:

    Code:
    php cron.php
    Is this a limitation of the command line version of PHP that Dathorn has set up, or do I need to tell my script where PDO is? If this is a limitation, are there any workarounds?

    Thanks,

    James
    --
    ** DEVTRENCH **
    --
    James Ehly

  2. #2
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,634

    Default

    Please submit a ticket and include the path of the script that you are executing as well as the account's SSH login info so that we can take a look.

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Posts
    4

    Default

    I'm also using PHP CLI and getting this same error.

    Fatal error: Class 'PDO' not found in /home/
    What was the solution?

  4. #4
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,634

    Default

    Please submit a ticket concerning this. The jailshell environment does not have access to the modules, etc. that are necessary for this to work. We will have to copy them over to the account that you wish to run this on and you will have to utilize a custom php.ini via the CLI. Alternatively, you can run the script via cron and this won't be an issue.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •