LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2005, 10:05 PM   #1
Thanotos
Member
 
Registered: Oct 2005
Location: Nanaimo, BC. ~CANADA~
Posts: 70

Rep: Reputation: 15
PHP and Apache


I have tried to install Apache 2 and PHP 5. I was getting an error whenever I would attempt to start httpd via < /usr/local/apache2/bin/apachectl start > the error received was:
Code:
root@stealth:~# /usr/local/apache/bin/apachectl start
Syntax error on line 53 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/modules/libphp4.so into server:/usr/local/apache/modules/libphp4.so: und
/usr/local/apache/bin/apachectl start: 
httpd could not be started
so after countless attempts (failed) at trying to get it resolved I made clean all directories assoiciated with apache and php. On the thought that running the current versions may not be 100% stable I downloaded Apache 1.3.34 and PHP4.

After getting PHP installed and then installing Apache I was able to get the Apache screen showing that the server was installed properly. However after going into the httpd.conf file and adding support for PHP I came across the same error as above (this time though it is line 205).

After trying to read on the 'net and news groups for a resolution I am coming to a source I know has helped in the past.

Currently I am running Slackware 10,2 Apache 1.3.34 and PHP 4.
My httpd.conf file displays:
Code:
ServerRoot "/usr/local/apache"
# Dynamic Shared Object (DSO) Support
# LoadModule foo_module libexec/mod_foo.so
LoadModule php4_module modules/libphp4.so
I am including a read out for my libphp4

Code:
root@stealth:~# ldd -r /usr/local/apache/modules/libphp4.so
undefined symbol: _emalloc      (/usr/local/apache/modules/libphp4.so)
undefined symbol: _array_init   (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_next_index_stringl        (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_assoc_zval_ex     (/usr/local/apache/modules/libphp4.so)
undefined symbol: _zval_dtor    (/usr/local/apache/modules/libphp4.so)
undefined symbol: _efree        (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_assoc_stringl_ex  (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_add_or_update       (/usr/local/apache/modules/libphp4.so)
undefined symbol: _estrdup      (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_error_docref0     (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_find        (/usr/local/apache/modules/libphp4.so)
undefined symbol: core_globals  (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_checkuid  (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_check_open_basedir        (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_register_list_destructors_ex     (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_register_long_constant   (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_php_snprintf       (/usr/local/apache/modules/libphp4.so)
undefined symbol: _convert_to_string    (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_list_insert      (/usr/local/apache/modules/libphp4.so)
undefined symbol: _zval_copy_ctor       (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_fetch_resource   (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_parse_parameters (/usr/local/apache/modules/libphp4.so)
undefined symbol: _estrndup     (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_assoc_string_ex   (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_assoc_long_ex     (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_index_bool        (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_index_string      (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_index_zval        (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_internal_pointer_reset_ex   (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_get_current_data_ex (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_move_forward_ex     (/usr/local/apache/modules/libphp4.so)
undefined symbol: _zend_list_delete     (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_get_current_key_ex  (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_printf   (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_register_resource        (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_index_find  (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_wrong_param_count        (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_num_elements        (/usr/local/apache/modules/libphp4.so)
undefined symbol: _safe_emalloc (/usr/local/apache/modules/libphp4.so)
undefined symbol: _erealloc     (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_stream_context_get_option (/usr/local/apache/modules/libphp4.so)
undefined symbol: convert_to_long       (/usr/local/apache/modules/libphp4.so)
undefined symbol: zval_is_true  (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_sprintf   (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_get_parameters   (/usr/local/apache/modules/libphp4.so)
undefined symbol: sapi_module   (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_printf    (/usr/local/apache/modules/libphp4.so)
undefined symbol: executor_globals      (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_body_write        (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_start_ob_buffer   (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_print_zval_r     (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_ob_get_buffer     (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_end_ob_buffer     (/usr/local/apache/modules/libphp4.so)
undefined symbol: _zval_ptr_dtor        (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_info_print_css    (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_escape_html_entities      (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_ini_long (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_ini_sort_entries (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_init        (/usr/local/apache/modules/libphp4.so)
undefined symbol: module_registry       (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_copy        (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_qsort    (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_sort        (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_apply_with_argument (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_destroy     (/usr/local/apache/modules/libphp4.so)
undefined symbol: display_ini_entries   (/usr/local/apache/modules/libphp4.so)
undefined symbol: sapi_globals  (/usr/local/apache/modules/libphp4.so)
undefined symbol: get_zend_version      (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_ini_opened_path   (/usr/local/apache/modules/libphp4.so)
undefined symbol: _php_stream_get_url_stream_wrappers_hash      (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_get_parameters_ex        (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_get_module_version       (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_print_credits     (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_rwrite     (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_handle_aborted_connection (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_table_set (/usr/local/apache/modules/libphp4.so)
undefined symbol: sapi_free_header      (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_table_add (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_pstrdup   (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_set_content_type   (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_get_brigade        (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_brigade_flatten   (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_brigade_cleanup   (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_table_get (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_table_elts        (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_register_variable (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_hash_exists      (/usr/local/apache/modules/libphp4.so)
undefined symbol: empty_string  (/usr/local/apache/modules/libphp4.so)
undefined symbol: sapi_send_headers     (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_rflush     (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_log_rerror (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_log_error  (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_module_startup    (/usr/local/apache/modules/libphp4.so)
undefined symbol: sapi_shutdown (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_add_version_component      (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_mpm_query  (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_pool_userdata_get (/usr/local/apache/modules/libphp4.so)
undefined symbol: sapi_startup  (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_pool_cleanup_null (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_pool_cleanup_register     (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_pool_userdata_set (/usr/local/apache/modules/libphp4.so)
undefined symbol: sapi_get_default_content_type (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_table_unset       (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_auth_type  (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_handle_auth_data  (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_request_startup   (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_request_shutdown  (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_ini_deactivate   (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_add_common_vars    (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_add_cgi_vars       (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_brigade_create    (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_execute_scripts  (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_bucket_eos_create (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_pass_brigade       (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_execute_script    (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_get_highlight_struct      (/usr/local/apache/modules/libphp4.so)
undefined symbol: highlight_file        (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_update_mtime       (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_set_last_modified  (/usr/local/apache/modules/libphp4.so)
undefined symbol: _zend_bailout (/usr/local/apache/modules/libphp4.so)
undefined symbol: apr_palloc    (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_hook_pre_config    (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_hook_post_config   (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_hook_handler       (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_server_root_relative       (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_alter_ini_entry  (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_sub_req_lookup_uri (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_destroy_sub_req    (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_end_ob_buffers    (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_header    (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_run_sub_req        (/usr/local/apache/modules/libphp4.so)
undefined symbol: _object_init  (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_property_long_ex  (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_property_string_ex        (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_get_server_version (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_loaded_modules     (/usr/local/apache/modules/libphp4.so)
undefined symbol: add_next_index_string (/usr/local/apache/modules/libphp4.so)
undefined symbol: unixd_config  (/usr/local/apache/modules/libphp4.so)
undefined symbol: ap_server_root        (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_register_ini_entries     (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_unregister_ini_entries   (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_startup_extensions        (/usr/local/apache/modules/libphp4.so)
undefined symbol: php_module_shutdown_wrapper   (/usr/local/apache/modules/libphp4.so)
undefined symbol: zend_error    (/usr/local/apache/modules/libphp4.so)
undefined symbol: OnUpdateInt   (/usr/local/apache/modules/libphp4.so)
undefined symbol: xml_module_entry      (/usr/local/apache/modules/libphp4.so)
undefined symbol: tokenizer_module_entry        (/usr/local/apache/modules/libphp4.so)
undefined symbol: basic_functions_module        (/usr/local/apache/modules/libphp4.so)
undefined symbol: session_module_entry  (/usr/local/apache/modules/libphp4.so)
undefined symbol: posix_module_entry    (/usr/local/apache/modules/libphp4.so)
undefined symbol: pcre_module_entry     (/usr/local/apache/modules/libphp4.so)
undefined symbol: overload_module_entry (/usr/local/apache/modules/libphp4.so)
undefined symbol: mysql_module_entry    (/usr/local/apache/modules/libphp4.so)
undefined symbol: ctype_module_entry    (/usr/local/apache/modules/libphp4.so)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40036000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x40064000)
        libm.so.6 => /lib/libm.so.6 (0x40078000)
        libdl.so.2 => /lib/libdl.so.2 (0x4009b000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4009f000)
        libssl.so.0 => /usr/lib/libssl.so.0 (0x400b5000)
        libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x400e6000)
        libc.so.6 => /lib/libc.so.6 (0x401e7000)
        /lib/ld-linux.so.2 (0x80000000)
PLEASE PLEASE HELP ME !!!

I am sooooo out of ideas.
 
Old 12-13-2005, 10:40 PM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
are you reusing your httpd.conf? it sounds like it since apache is still trying to load libphp4.so. What I did when I upgraded from php4 to php5 was to delete /usr/local/apache/modules/libphp4.so and to delete the load module line in httpd.conf.

LoadModule php4_module modules/libphp4.so

The line below should be added when you install php5, but if it's not put it in.

LoadModule php5_module modules/libphp5.so

Then you need to add a handler for php5 (comment out the old handler for php4 or delete the old handler line).

# PHP 4
#AddHandler php-script .php

# PHP 5
AddHandler php5-script .php

You should be good to go.

Another thing, when you compile php, make sure you use the right abi. You can specify that with the ./configure flag:

--with-apxs2=/usr/local/apache/bin/apxs

use the correct path to your apache install.
 
Old 12-13-2005, 11:19 PM   #3
Thanotos
Member
 
Registered: Oct 2005
Location: Nanaimo, BC. ~CANADA~
Posts: 70

Original Poster
Rep: Reputation: 15
megaspaz.

thanks for the reply.

When I made clean the dir for apache I made sure to wipe the httpd.conf and the php.ini file.

I am not sure if I should "upgrade" again as I took a step back to apache 1.3.34 and PHP 4.

Do you think that it would be worth while to try going back to Apache 2 and PHP 5?
 
Old 12-14-2005, 10:23 PM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
well, apache 2.2.0 and php 5 work for me, but I don't do a whole lot of php stuff. Basically, I installed php 5 because I could and who knows? Maybe in the future I'll be doing more php coding.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 10:25 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
slackware, apache and PHP from .tgz - problems with PHP szymon Slackware 2 09-06-2004 04:57 PM
Apache php index.php problem neurotic Linux - Software 3 11-18-2003 06:02 PM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration