Solved

linux php XSLT installation

Posted on 2006-11-14
25
1,083 Views
Last Modified: 2013-12-15
I need to be able to use the XSLT Extentions that comes with Dreamweaver 8 but my tests to proccess XSLT fail.

You can check this link for an example:
http://www.travelht.com/carnival/xslttest/test.php
 I have tried MANY tutorials and sites for information on installing domxslt on my server to no avail - either the information is so old that it doesn't apply to my server, the specifed files they suggest aren't there/broken links or the explaination is just too complex for me to grasp.

I'm not used to installing software on a linux box.

My only hope is that you guys will be able to help and explain this proccess and provide the files needed, to a dunce so that I don't break anyhthing.

I really need to upgrade the whole server but even the leasee (EV1 Servers) has had problems with that in the past and I can't afford to be down right now.  They said they would have to do a full re-image.

This is a non-managed server that I lease.

Here r the specs for my box:
Apache Redhat Enterprise 3.2.3-54 Taroon Update 8 Kernel 2.4.21 (phpinfo shows api 2.0.46)
Plesk 7.5.4
MySql 3.23.58
PHP 4.3.2

domxml
DOM/XML  enabled  
DOM/XML API Version  20020815  
libxml Version  20510  
HTML Support  enabled  
XPath Support  enabled  
XPointer Support  enabled  

xml
XML Support  active  
XML Namespace Support  active  
EXPAT Version  expat_1.95.5  

standard
Regex Library  Bundled library enabled  
Dynamic Library Support  enabled  
Path to sendmail  /usr/sbin/sendmail -t -i  

I don't think u needed that last STANDARD - but what the hey...

Also - even though I don't see it anywhere - EV1 said earlier today that libxslt was installed - this make me wonder why php doesn't see it - maybe something to do with the php.ini?

As always this problems is urgent!!!

Thanks very much

Cliff

0
Comment
Question by:cacookejr
  • 14
  • 11
25 Comments
 
LVL 24

Expert Comment

by:slyong
ID: 17943423
Hi Cliff,

Can you provide a php page:

<?php
phpinfo();
?>

So that we can have a look at what extensions are installed?
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17943525
www.travelht.com/phpinfo.php

I thought I included anything pertenit in my first post - the last 3 paragraphs r straight from phpinfo.php
Thanks
0
 
LVL 24

Expert Comment

by:slyong
ID: 17943577
Hi Cliff,

Just want to confirm that you don't have XSLT enabled in your PHP and from the phpinfo(), you really don't have XSLT enabled.  I am not sure if you hosting provider is able to do it because currently the PHP is without XSLT support.  If XSLT support is enabled, you will have

'--enable-xslt=shared' '--with-xslt-sablot' '--with-sablot-js=/usr' in your <Configure Command> and a <xslt> section that say xslt: enabled...

However, if your hosting provide can try to do:

1) # yum install php-xslt
to install php-xslt and dependencies

2) put an extra line of code in your test.php file:
dl('xslt.so');
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17943643
checking
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17944479
I tried installing that php-xslt - php-xslt-4.2.3-10.i386.rpm
it says it needed sablot
I installed that
Then I tried again - got this:
[root@srv1 root]# rpm -ihv php-xslt-4.2.3-10.i386.rpm
warning: php-xslt-4.2.3-10.i386.rpm: V3 DSA signature: NOKEY, key ID e01260f1
error: Failed dependencies:
        php-common = 4.2.3 is needed by php-xslt-4.2.3-10
tried installing php-common - got this:
[root@srv1 root]# rpm -Uhv php-common-4.2.3-10.i386.rpm
warning: php-common-4.2.3-10.i386.rpm: V3 DSA signature: NOKEY, key ID e01260f1
Preparing...                ########################################### [100%]
   1:php-common             ########################################### [100%]
warning: group http does not exist - using root

This shows it was installed I think:
[root@srv1 root]# rpm -q php-common
php-common-4.2.3-10

and then again with this:
[root@srv1 root]# rpm -ihv php-xslt-4.2.3-10.i386.rpm
warning: php-xslt-4.2.3-10.i386.rpm: V3 DSA signature: NOKEY, key ID e01260f1
error: Failed dependencies:
        php-common = 4.2.3 is needed by php-xslt-4.2.3-10

Also tried with the -Uhv option

Any Ideas?

0
 
LVL 24

Expert Comment

by:slyong
ID: 17944637
Hi Cliff,

I assume you have experience with Plesk PHP/Apache, otherwise, you better ask your hosting provider to set it up for you.  Plesk actually uses their own rpms.  By installing the normal rpm distributed you might create problem with Plesk.  If you read the documentation from Plesk (http://download1.swsoft.com/Plesk/Plesk7.5/RedHatEL3.0/psa-7.5.4-rhel3.build75060413.12.i586.txt), php-xslt is available from Plesk package.  You can download the latest version from Plesk if you have a user account, otherwise, ask your hosting provider to download it for you.

0
 
LVL 1

Author Comment

by:cacookejr
ID: 17944720
Thanks - since it is a non-managed server they are not always alot of help.
I will check out the link u sent and keep u informed.

I had no idea this would be Plesk specific

I will update this as soon as possible

Thanks again
0
 
LVL 24

Expert Comment

by:slyong
ID: 17944733
No worries Cliff, you can go to http://www.plesk.com/ and sign up an account.  After that you should be able to download the RPMs.
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17944827
From what I'm reading:

Upgrading Plesk from the Control Panel
======================================

To update or upgrade your Plesk software from the control panel,
1.      Login to Plesk as administrator, and click the Server shortcut in the left side navigation pane. The Server Administration screen opens.
2.      Click the Updater icon in the Services group. The control panel connects to the Plesk Update server, retrieves information on the available releases, then analyses the components installed in your system, and displays the lists of available releases and component updates. For each Plesk version released a brief description of available operations is displayed.
 
            Note: If you want to update/upgrade from a locally stored Plesk distribution or Plesk update server mirror inside your network, click Preferences, select the "Network storage" source type, specify the URL and click OK.  
            
3.      Select the Plesk version that you want to update, or upgrade to. A list of available components appears.
4.      Select the check boxes corresponding to the components you wish to install and click Install. A confirmation page appears.
5.      Specify your e-mail address. You will be sent a notice by e-mail once update is completed. To confirm installation of the selected components, select the checkbox and click OK. The components/updates you selected will be downloaded and automatically installed in the background mode.

Then a search for XSLT:

If you plan to use SiteBuilder and Sitebuilder module for Plesk, you should install the following packages from the Third_Party directory of your Plesk distribution or RedHat Enterprise Linux 3 disc:
  lynx-2.8.5-11.i386.rpm
  gnupg-1.2.1-10.i386.rpm
  indexhtml-3-1.noarch.rpm
  openldap-2.0.27-17.i386.rpm
  cyrus-sasl-md5-2.1.15-10.i386.rpm
  cyrus-sasl-2.1.15-10.i386.rpm
From the 'opt/sitebuilder' directory of your Plesk distribution:
  Sitebuilder-2.1.1-rhel3.build051014.20.i386.rpm
  js-1.5rc5a-1.i386.rpm
  sablotron-1.0.1-2.i386.rpm
  php-xslt-1.0-0.i386.rpm
  psa-sbm2-1.1-49.noarch.rpm

The sitebuilder and sitebuilder module are not installed on my system at all, but it is available from the server update section of my plesk control panel.  Think I could just install that package there and it automaically install the correct rpms?

Maybe be off and running?

Please advise...

Thanks

0
 
LVL 24

Expert Comment

by:slyong
ID: 17945351
Hi Cliff,

Yes if SiteBuilder is installed, the php-xslt RPMs will be installed.
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17949601
installed sitebuilder from the plesk updater and it broke apache

0
 
LVL 24

Expert Comment

by:slyong
ID: 17950695
Hi,

Sorry to hear that you really ought to get the hosting provide to reimage and install the php-xslt package in Plesk for you.  If you are not going to go down that path, you can reinstall apache package by downloading the package from Plesk and install it using rpm --force.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 1

Author Comment

by:cacookejr
ID: 17962322
Plesk had to get in on the action to get the server back up.

their reply was:

I found that zend_extension was defined twice in /etc/php.ini and in
/etc/php.d/ioncube-loader.ini files. So I commented out one.


site builder is installed now with XSLT support enabled, BUT that doesn't mean that XSLT is actually installed, correct?

Just check www.travelht.com/phpinfo.php again

domxml
DOM/XML  enabled  
DOM/XML API Version  20020815  
libxml Version  20510  
HTML Support  enabled  
XPath Support  enabled  
XPointer Support  enabled  

sitebuilder
SiteBuilder support enabled 1.0.1
SB Database support  enabled  1.0  
SB Database MySql support  enabled  3.23.58  
SB Database Sqlite support  enabled  3.2.2  
SB Database ODBC support  disabled  no value  
SB File support  enabled  1.0  
SB XSLT support  enabled  1.0  
SB GPG support  enabled  1.0  
SB Logger  enabled  1.0  
SB FTP client  enabled  1.0  
SB Storage  enabled  1.0  
SB XML  enabled  0.1a  

xml
XML Support  active  
XML Namespace Support  active  
EXPAT Version  expat_1.95.5  

Apparently my hosting provider EV1servers.net (I lease the boxes from) will not/cannot help install XSLT.

Please advise...

thanks,

Cliff
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17962343
u also stated early on to add this:

2) put an extra line of code in your test.php file:
dl('xslt.so');

exactly what does dl mean and where am I supposed to put this?


0
 
LVL 24

Expert Comment

by:slyong
ID: 17963461
Hi,

dl('xslt.so'); is to load a PHP extension during runtime (ref: http://au2.php.net/dl).  It should be put in the php file/program that you need to use XSLT.  I will check out if there is otherway to load the extension.
0
 
LVL 24

Accepted Solution

by:
slyong earned 500 total points
ID: 17963548
Hi Cliff,

I check again on Plesk's website, there is a php-xslt, if you go to http://www.swsoft.com/en/download/plesk/patches/, you will see "Plesk 7.5.4 for Unix/Linux Patches" section, there's build 75060413.12 for RHEL 3.  If you read the release note, http://download1.swsoft.com/Plesk/Plesk7.5/RedHatEL3.0/psa-7.5.4-rhel3.build75060413.12.i586.txt,

From the 'opt/sitebuilder' directory of your Plesk distribution:
  Sitebuilder-2.1.1-rhel3.build051014.20.i386.rpm
  js-1.5rc5a-1.i386.rpm
  sablotron-1.0.1-2.i386.rpm
  php-xslt-1.0-0.i386.rpm
  psa-sbm2-1.1-49.noarch.rpm

you need to install php-xslt and sablotron, I am not sure if you need js.  However take note that Plesk 7.5.4 only support up to php-xslt-1.0.. so it is quite old.  Hope that at least that version will work with what you need to do.
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17973769
do u have a # I can call u at?

I'm at 828-278-0017

0
 
LVL 1

Author Comment

by:cacookejr
ID: 17973777
I really need ur help
0
 
LVL 24

Expert Comment

by:slyong
ID: 17973792
Hi Cliff,

Sorry I am not in the States and it is not possible to get help over the phone on EE.  We can only assist here.
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17973966
kool - I think I have everything reay - now I need to re-compile php with xslt support... how?
0
 
LVL 24

Expert Comment

by:slyong
ID: 17975399
Could you let me know what did you get?
0
 
LVL 1

Author Comment

by:cacookejr
ID: 17975580
http://www.sitepoint.com/print/transform-php-xslt

Finally, you're ready to compile and install PHP with XSLT support. Presumably you already have PHP installed on your server, but as with most module installations, you'll have to download the PHP source files and recompile PHP to add XSLT support. This process is fully documented in Build your own Database Driven Website using PHP & MySQL - Part 1: Installation [14]; all that changes is the set of switches you need to use when configuring PHP prior to compilation:

./configure \
 --prefix=/usr/local/php \
 --with-config-file-path=/usr/local/php \
 --with-apxs=/usr/sbin/apxs \
 --enable-track-vars \
 --enable-magic-quotes \
 --enable-debugger \
 
These r the 2 lines


--enable-xslt \
 --with-xslt-sablot





The lines in bold add XML and XSLT support to your PHP configuration. From there, PHP installation should be completed as usual by performing a make and then a make install. Once you restart your Web server with the newly-compiled PHP module installed, PHP should be fully equipped to process XML data with XSLT. To make sure, you can create a simple PHP script that just calls phpinfo(), then view the results on your server. The page produced should contain the following section:

Now let's take the XSLT functions for a test drive.




I just need to add those 2 lines to my php compile - but no one seems to know how...

I can't even find the file to modify - let alone do the recompile.

PLEASE HELP!!!

If u need into the server - no problem - I'm hoping I can trust you.

0
 
LVL 1

Author Comment

by:cacookejr
ID: 17976933
I had to hire an outside company to fix this issue, but thank you for ur help

0
 
LVL 1

Author Comment

by:cacookejr
ID: 17976952
This is not actually the answer to the question but I felt that slyong deserved something for all his/her efforsts
I had to hire an outside company to take care of this

0
 
LVL 24

Expert Comment

by:slyong
ID: 17977066
Hi Cliff,

Thank you very much, you could have asked for a refund.  It is actually better to get someone to compile the PHP for you because Plesk system is a bit different from normal Linux installation.  However, I am glad that you are able to get someone to do it.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now