Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP5 with Apache2 problem -- simplexml related?

Status
Not open for further replies.

mrampton

Programmer
Jan 11, 2001
7
US
Hey guys,

So I'm having problems with php5 on apache2. Basically, instead of the server executing the php scripts, it prompts you to dl the source.

The php files in question are for my wiki (dokuwiki) which was running fine until i upgraded my solaris10 box the other night (using blastwave pkg manager). As far as I can tell, the configuration for both php and apache remained in tact and properly setup.

I know the first thing I thought was that somehow the loadmodule and AddType directives in apache's httpd.conf file must not be set properly. This is not the case as far as I can tell.

In any case, here are the directives just in case I'm mistaken.

##
LoadModule php5_module libexec/libphp5.so

DirectoryIndex index.html index.php

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
##

And the only message that appears in my error logs:

PHP Warning: Cannot load module 'SPL' because required module 'simplexml' is not loaded in Unknown on line 0

----

Ok -- so judging from this, I'm missing a module here that's keeping SPL from starting up and running properly? But it was my understanding that php5 came reconfigured with simplexml (maybe I'm wrong?).

I had read of similar issues with simplexml being resolved by setting the following line in php.ini to off (which it is): zend.ze1_compatibility_mode = Off


And these are the modules that php5 lists as present:

[root@zone001 etc]$ php -m
[PHP Modules]
bz2
ctype
curl
dba
domxml
ftp
gd
gettext
iconv
imap
ldap
mcal
mssql
mysql
odbc
openssl
overload
pcre
pgsql
posix
readline
session
standard
tokenizer
xml
zlib

[Zend Modules]


----

I haven't come across any good documentation on how to manually configure php5 for simplexml, but I can't imagine it's too difficult. Has anyone already gone through this? Love to hear from you if you have.

Thanks!
mark
 
why don't you try the apache forum...

Steve Davis

NOTE: This sig does not include any reference to voting, stars, or marking posts as helpful as doing so is cause for membership termination.
 
Great answer dude!

Anyway had the same Problem. I found this thread via google but no answer. But by now I got one from a helpful collegue.


The problem in my case (using Solaris and CSW) was that in the Module even though it was in the directory with all the *.so extension wasn't found.

my path being

"mypath/php5/lib/php/extensions/no-debug-non-zts-XXXXXXX/"

So I ended up having to add that module in my php.ini in order to for it to find it.

Failry simple once u know how and why.

I added under "CSW Extensions"

extension=simplexml.so

and restarted the server and php worked just fine.

T
 
schwotte,

Thanks for the reply -- sorry to take so long in getting back. I tried your solution and saw some small progress but still was unable to get php working correctly.

Instead i went through and backed up all my config files and reinstalled all my php and apache packages (turns out blastwave pkg-get managed this in a way that kept the configuration files intact anyway). So took an hour but it's been working great ever since.

thanks!
mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top