PHP 5.2.2 missing dependencies php-xml

Support/Development for PHP
Sigmus
Forum User
Forum User
Posts: 8
Joined: Wed Oct 03, 2007 10:44 am

Unread post by Sigmus »

Hello Scott.
It's been quite some time since my last post, but I have some updates concerning the matter we discussed here last october, so I thought it would be a good time for some thread-necromancy.
The website I intended to host rested on a shelf for quite some time and I was using an alternative webhost during that time. Recently, I was finally able to install the latest PHP version (5.2.5) on my server, utilizing your package the same way I tired some time ago. I guess there was something wrong with the older version that caused problems back then, but 5.2.5 did install itself more or less flawlessly.
But, and here comes the new problem, the website still doesn't work:
It uses a XML-based CMS and the PHP version that was installed is configured with --disable dom, -- disable xmlwriter and so on.
Naturally, what one would do now, would be to run the usual "configure -> make -> make install" procedure to change the config settings, but there is no configure script present to do so. There seems to be a makefile, but of what use would that be without being able to change the config? I'm still a complete noob regarding anything Linux, so I'm totally lost.
Any suggestions?

Thanks in advance,
Sigmus
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Yeah ignore the output from phpinfo, it is no longer an accurate way of looking at the php configuration. Use:

yum list 'php*'
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

You probably want to yum install php-xml and reload apache.
Lemonbit Internet Dedicated Server Management
Sigmus
Forum User
Forum User
Posts: 8
Joined: Wed Oct 03, 2007 10:44 am

Unread post by Sigmus »

Thanks for the quick reply!
scott wrote:Yeah ignore the output from phpinfo, it is no longer an accurate way of looking at the php configuration. Use:

yum list 'php*'
I had a look at it, the neccessary elements didn't show, so I'd say the informations given by phpinfo() were more or less correct after all: xmlreader, xmlwriter and dom are disabled. The fact that neither the guestbook nor the news update system works is the best proof for that.
breun wrote:You probably want to yum install php-xml and reload apache.
I tried that, but it didn't change the config. Still no xml functions available and no configure script present to change that.

So, what can I do to add the neccessary stuff like --with-xml, --enable-dom etc. to the config without a configure script?
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

breun wrote:You probably want to yum install php-xml and reload apache.
I tried that, but it didn't change the config.
Like Scott said, that's expected. That config line is only for the base php package. Extensions are compiled as separate packages and won't alter that configure line that phpinfo() shows. Just stop looking at that configure line.
Still no xml functions available and no configure script present to change that.

So, what can I do to add the neccessary stuff like --with-xml, --enable-dom etc. to the config without a configure script?
You just need to install php-xml and reload apache afterwards. That's really all you should need to do. Did you install the php-xml package (what does rpm -q php-xml say?)? Did you reload apache afterwards? If so, what do you see in the domain's error_log?

Really, forget about configure. This is not an install from source.
Lemonbit Internet Dedicated Server Management
Sigmus
Forum User
Forum User
Posts: 8
Joined: Wed Oct 03, 2007 10:44 am

Unread post by Sigmus »

Yes, I did install php-xml (even though the files weren't missing before, it looked like they were just overwritten in the process) and reloaded apache afterwards. No change.

rpm -q php-xml said:
php-xml-5.2.5-4.el4.art

And here's the related log entry:
[Fri Jan 25 14:23:48 2008] [error] [client 91.58.91.172] PHP Warning: DOMDocument::save(../admin/guestbook.xml) [<a href='function.DOMDocument-save'>function.DOMDocument-save</a>]: failed to open stream: Permission denied in /var/www/vhosts/noobz-music.de/httpdocs/resources/newGBEntry.php on line 175, referer: http://88.84.144.84/main.php?page=gb&se ... =&gbpage=1
Line 175, of which the log says that it has caused the error, is this one: $myDocument->save('../admin/guestbook.xml');
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

The problem isn't that php-xml isn't working. The script tries to write to ../admin/guestbook.xml, but permission is denied. Check permissions on that directory. The apache user needs to be able to write to it.
Lemonbit Internet Dedicated Server Management
Sigmus
Forum User
Forum User
Posts: 8
Joined: Wed Oct 03, 2007 10:44 am

Unread post by Sigmus »

[s]Sounds good, but the problem is that I have already set the permissions for that folder via Plesk when I read that log entry for the first time. It had no effect, so I assumed something else must be wrong and php simply provided the wrong error message. But since you said it's definitely a permission-problem, I know now that this assumption was wrong.
But why doesn't it work when changing the permission in Plesk to "rwx rwx rwx"?
Do I have to create a special user group for it to work, or something? Are there more options for setting up permissions when using the console? And how exactly would I do anything of that?[/s]

EDIT: Hah, I figured it out! The folder had all the permissions, but the xml-files inside it didn't. I just set up the permissions for each file on it's own and now everything works as it should.

Thanks a lot, breun and scott, for all your help and patience.
Post Reply