Help with PHP Shell Scripting

From: Date: Fri, 19 Jan 2001 01:51:03 +0000
Subject: Help with PHP Shell Scripting
Groups: php.general 
Request: Send a blank email to php-general+get-35546@lists.php.net to get a copy of this message
Hi, When I tried connecting to Postgres through a shell script that I wrote, I get the following error: "Fatal error: Call to undefined function: pg_connect()" After searching the web for a solution, I realized that I have to compile PHP into its CGI version. Currently, PHP is installed as an Apache module on my machine. So, I tried to compile PHP by doing the following in the /usr/local/php-4.0RC1 directory where the source files for PHP4.0RC1 are located: ./configure -with-pgsql make But then I get the following error below after typing "make": =============================================================================== <snipped> . . . CONFIG_FILES= CONFIG_HEADERS= ./config.status creating internal_functions.c internal_functions.c is unchanged +--------------------------------------------------------------------+ | Warning: | | You will be compiling the CGI version of PHP without any | | redirection checking. By putting this cgi binary somewhere in | | your web space, users may be able to circumvent existing .htaccess | | security by loading files directly through the parser. See | | http://www.php.net/manual/config-security.php3 for more details. | +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ /bin/sh ./libtool --silent --mode=link gcc -g -O2 -Wall -o php -export-dynamic stub.lo libphp4.la /usr/lib/crt1.o: In function `_start': /usr/lib/crt1.o(.text+0x18): undefined reference to `main' .libs/libphp4.so: undefined reference to `ap_chdir_file' .libs/libphp4.so: undefined reference to `ap_user_id' .libs/libphp4.so: undefined reference to `ap_pclosef' .libs/libphp4.so: undefined reference to `ap_table_get' .libs/libphp4.so: undefined reference to `ap_update_mtime' .libs/libphp4.so: undefined reference to `ap_kill_timeout' .libs/libphp4.so: undefined reference to `ap_uudecode' .libs/libphp4.so: undefined reference to `ap_setup_client_block' .libs/libphp4.so: undefined reference to `ap_getword' .libs/libphp4.so: undefined reference to `ap_add_cgi_vars' .libs/libphp4.so: undefined reference to `ap_getword_nulls_nc' .libs/libphp4.so: undefined reference to `ap_server_root' .libs/libphp4.so: undefined reference to `ap_destroy_sub_req' .libs/libphp4.so: undefined reference to `ap_group_id' .libs/libphp4.so: undefined reference to `ap_user_name' .libs/libphp4.so: undefined reference to `ap_pstrdup' .libs/libphp4.so: undefined reference to `ap_log_error' .libs/libphp4.so: undefined reference to `ap_table_add' .libs/libphp4.so: undefined reference to `ap_sub_req_lookup_uri' .libs/libphp4.so: undefined reference to `ap_run_sub_req' .libs/libphp4.so: undefined reference to `ap_register_cleanup' .libs/libphp4.so: undefined reference to `ap_signal' .libs/libphp4.so: undefined reference to `ap_send_http_header' .libs/libphp4.so: undefined reference to `ap_log_reason' .libs/libphp4.so: undefined reference to `ap_block_alarms' .libs/libphp4.so: undefined reference to `ap_set_etag' .libs/libphp4.so: undefined reference to `ap_rwrite' .libs/libphp4.so: undefined reference to `ap_popenf' .libs/libphp4.so: undefined reference to `ap_table_set' .libs/libphp4.so: undefined reference to `ap_get_client_block' .libs/libphp4.so: undefined reference to `ap_add_version_component' .libs/libphp4.so: undefined reference to `ap_hard_timeout' .libs/libphp4.so: undefined reference to `ap_rflush' .libs/libphp4.so: undefined reference to `top_module' .libs/libphp4.so: undefined reference to `ap_set_last_modified' .libs/libphp4.so: undefined reference to `ap_reset_timeout' .libs/libphp4.so: undefined reference to `ap_max_requests_per_child' .libs/libphp4.so: undefined reference to `ap_unblock_alarms' .libs/libphp4.so: undefined reference to `ap_add_common_vars' collect2: ld returned 1 exit status make[1]: *** [php] Error 1 make[1]: Leaving directory `/usr/local/php-4.0RC1' make: *** [all-recursive] Error 1 ================================================================================ Any help would be greatly appreciated! Justin

« previous php.general (#35546) next »