Jump to content

PHP pages won't open at all on my server.


Recommended Posts

:facewall:

PHP pages won't open at all on my server.  HTML pages open fine, but when going to the PHP pages that are on my server, the browser tries to download the page like a file instead of presenting it by the browser.  What can I do to make the PHP processor to be handled properly?  Do I need to recompile it again, and if so, what switches should I use?

 

 

Link to comment
https://forums.phpfreaks.com/topic/169181-php-pages-wont-open-at-all-on-my-server/
Share on other sites

I'm on Fedora 2.6.11-1.1369_FC4 on that particular server.  I'm running PHP 5.2.9 which I downloaded directly from the php web site, then untarred, ran make, and make install commands as described in the php INSTALL file that was included with the distribution..

 

==================

 

  Example 2-4. Installation Instructions (Apache 2 Shared Module Version)

1.  gzip -d httpd-2_0_NN.tar.gz

2.  tar xvf httpd-2_0_NN.tar

3.  gunzip php-NN.tar.gz

4.  tar -xvf php-NN.tar

5.  cd httpd-2_0_NN

6.  ./configure --enable-so

7.  make

8.  make install

 

==================

 

You will probably try to talk me into using yum, which I have already tried to do, but it will not work on my system; it always fails on 'setting up repositories'.  Fixing this will have to be another project on its own and in th future.

 

 

I'm on Fedora 2.6.11-1.1369_FC4 on that particular server.  I'm running PHP 5.2.9 which I downloaded directly from the php web site, then untarred, ran make, and make install commands as described in the php INSTALL file that was included with the distribution..

 

==================

 

  Example 2-4. Installation Instructions (Apache 2 Shared Module Version)

1.  gzip -d httpd-2_0_NN.tar.gz

2.  tar xvf httpd-2_0_NN.tar

3.  gunzip php-NN.tar.gz

4.  tar -xvf php-NN.tar

5.  cd httpd-2_0_NN

6.  ./configure --enable-so

7.  make

8.  make install

 

==================

 

You will probably try to talk me into using yum, which I have already tried to do, but it will not work on my system; it always fails on 'setting up repositories'.  Fixing this will have to be another project on its own and in th future.

 

 

You will also need to configure Apache with PHP too. You need to add something like the following to Apaches config file (httpd.conf)

LoadModule php5_module "/full/path/to/php/php5apache2_2.so"
AddType application/x-httpd-php .php

However you are better of using YUM to install Apache, PHP. It will take care of everything for you.

These are the .so files that I could find on my server.  Which module(s) should I load to get PHP working with Apache?:

 

============

 

/usr/lib/httpd/modules/libphp5.so

/usr/lib/httpd/modules/mod_imap.so

/usr/lib/httpd/modules/mod_vhost_alias.so

/usr/lib/httpd/modules/mod_unique_id.so

/usr/lib/httpd/modules/mod_info.so

/usr/lib/httpd/modules/mod_alias.so

/usr/lib/httpd/modules/mod_mem_cache.so

/usr/lib/httpd/modules/mod_access.so

/usr/lib/httpd/modules/mod_asis.so

/usr/lib/httpd/modules/mod_headers.so

/usr/lib/httpd/modules/mod_auth_digest.so

/usr/lib/httpd/modules/mod_dav.so

/usr/lib/httpd/modules/mod_logio.so

/usr/lib/httpd/modules/mod_include.so

/usr/lib/httpd/modules/mod_autoindex.so

/usr/lib/httpd/modules/mod_env.so

/usr/lib/httpd/modules/mod_proxy_ftp.so

/usr/lib/httpd/modules/mod_negotiation.so

/usr/lib/httpd/modules/mod_ldap.so

/usr/lib/httpd/modules/mod_status.so

/usr/lib/httpd/modules/mod_ext_filter.so

/usr/lib/httpd/modules/mod_usertrack.so

/usr/lib/httpd/modules/mod_python.so

/usr/lib/httpd/modules/mod_proxy_http.so

/usr/lib/httpd/modules/mod_userdir.so

/usr/lib/httpd/modules/mod_actions.so

/usr/lib/httpd/modules/mod_disk_cache.so

/usr/lib/httpd/modules/mod_speling.so

/usr/lib/httpd/modules/mod_mime_magic.so

/usr/lib/httpd/modules/mod_auth_ldap.so

/usr/lib/httpd/modules/mod_perl.so

/usr/lib/httpd/modules/mod_cgid.so

/usr/lib/httpd/modules/mod_dir.so

/usr/lib/httpd/modules/mod_rewrite.so

/usr/lib/httpd/modules/mod_auth.so

/usr/lib/httpd/modules/mod_file_cache.so

/usr/lib/httpd/modules/mod_dav_fs.so

/usr/lib/httpd/modules/mod_log_forensic.so

/usr/local/apache2/modules/libphp5.so

/usr/local/apache2/lib/apr-util-1/apr_dbd_pgsql-1.so

/usr/local/apache2/lib/apr-util-1/apr_dbd_sqlite3.so

/usr/local/apache2/lib/apr-util-1/apr_dbd_pgsql.so

/usr/local/php/OLD/php-5.2.8/modules/pgsql.so

/usr/local/php/OLD/php-5.2.8/.libs/libphp5.so

/usr/local/php/OLD/php-5.2.8/ext/pgsql/.libs/pgsql.so

/usr/local/php/php-5.2.9/.libs/libphp5.so

/usr/local/php/php-5.2.9/libs/libphp5.so

 

============

 

I didn't see any .so file named "php5apache2_2.so", unless you were just making up that filename as an example.  Thanks.

 

OK.  What does this error mean?  There is no text containing "sqlite3ExprDelete" anywhere within the httpd.conf file:

 

# apachectl start

httpd: Syntax error on line 57 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/php/php-5.2.9/libs/libphp5.so into server: /usr/local/php/php-5.2.9/libs/libphp5.so: undefined symbol: sqlite3ExprDelete

 

In the context of a library a symbol is essentially a reference to a function (or something else).  For some reason it's looking for the sqlite3ExprDelete symbol and can't find it.  Unless you compiled/linked your self, I have no idea how in the world that's happening.

 

Actually, I would imagine the PHP library pulls other libraries in dynamically....  Do you have PHP loading the SQLite extension?

OK, I'm really starting to get irked about his whole PHP configuration issue; I've been working on this problem for over a month.  Modifying the httpd.conf and adding

 

LoadModule php5_module "/full/path/to/php/php5apache2_2.so"

AddType application/x-httpd-php .php

 

has not informed the server to parse PHP files as PHP.  Here's another thing, why are their so many php.ini and httpd.conf files?  Shouldn't there just be one of each?  Here's the locations I am finding on my server:

 

/usr/local/apache2/conf/httpd.conf

/usr/local/apache2/conf/original/httpd.conf

/usr/local/apache2/docs/conf/httpd.conf

/etc/httpd/conf/httpd.conf

 

/etc/httpd/conf.d/php.conf

 

/usr/local/lib/php.ini

/usr/local/php/php-5.2.9/php.ini

/etc/php.ini

/etc/php.d/php.ini

 

I just want to get this thing working correctly so I can get the server to parse PHP files as PHP.  I need to get past this so that I can move forward onto other things...

 

 

Thanks!

 

 

Like I said a few posts ago. Fix your yum issue and your problems will be resolved.

 

The reason you would have so many config files lying around is likely because you have tried to compile apache / php on a server that already had them installed by the looks of it. Package managers will usually install into /usr, most people install into /usr/local when they compile.

 

The config files within /etc would be the ones placed there by a package manager, the local ones (/usr/local/*) would be ones placed there when you tried to compile these things.

OK, I am taking your advice and trying to get yum fixed, but keep getting this Python error:

 

-----------------------------------------

 

yum check-update php5

There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:

 

cannot import name flagToString

 

Please install a package which provides this module, or

verify that the module is installed correctly.

 

It's possible that the above module doesn't match the

current version of Python, which is:

2.4.1 (#1, May 16 2005, 15:19:29)

[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)]

 

If you cannot solve this problem yourself, please go to

the yum faq at:

http://wiki.linux.duke.edu/YumFaq

 

-----------------------------------------

 

Any ideas as to what I need to do to get this issue fixed? I am running yum version 3.2.23 and Python version 3.1.1. Thanks.

 

I tried the solution to Q.7 but it didn't fix it.

 

I tried "python", "import yum" but it fails saying

 

>>> import yum

Traceback (most recent call last):

  File "<stdin>", line 1, in ?

  File "yum/__init__.py", line 23, in ?

    import rpm

ImportError: No module named rpm

>>>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.