LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems running PHP script in command line (https://www.linuxquestions.org/questions/linux-software-2/problems-running-php-script-in-command-line-563382/)

Hondro 06-21-2007 02:46 AM

Problems running PHP script in command line
 
Hi, i need to run one PHP script from linux command line, but when i try to do it, i have got:

Quote:

PHP Fatal error: Call to undefined function: dbase_open()
When i try to run this script from other PC (Apache) which is in my lan network, everything goes good.

I have slackware 10.2, apache 1.3.7, php 4.4.4

Thanks in advance :)

Guttorm 06-21-2007 04:16 AM

Hi

I don't know Slackware, but it's common to use two different php.ini files - one for Apache and one for command line interface (CLI). On my system I have "/etc/php4/apache/php.ini" and "/etc/php4/cli/php.ini". It might be useful to use a different configuration for the two, but it can be confusing. I usually delete the cli version and make a symlink to the other instead. So when I change one, the other is also changed:

rm /etc/php4/cli/php.ini
ln -s /etc/php4/apache/php.ini /etc/php4/cli/php.ini


All times are GMT -5. The time now is 12:30 AM.