LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > [solved] Executing PHP within Perl served pages

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2011, 03:48 AM
dougconran dougconran is offline
Member
 
Join Date: Jan 2010
Posts: 15
Default [solved] Executing PHP within Perl served pages

Hi,

I'm using Litespeed v4.1.1 standard edition, primarily to serve pages generated by Perl scripts.

I have PHP set up to serve some pages generated by Wordpress which uses PHP.

I want to be able to use one (or more) of the Wordpress routines within my Perl generated scripts and cannot work out how to achieve this.

Just embedding <?php ... ?> within the Perl generated pages does not work because they have a .pl extension and so do not connect to the php intepreter. If I change the perl scripts to have a .php extension then, of course, the Perl interpreter does not pick them up.

How can I do what I want to do?

TIA

Doug

Last edited by NiteWave; 06-14-2011 at 06:14 PM..
Reply With Quote
  #2  
Old 06-13-2011, 11:00 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,389
You can try PHP::Interpreter CPAN module in your perl script to call PHP script/function in this case.

More details can be found at http://www.linuxjournal.com/article/9282
Reply With Quote
  #3  
Old 06-13-2011, 02:27 PM
dougconran dougconran is offline
Member
 
Join Date: Jan 2010
Posts: 15
Thanks for the pointer. At the moment, though, I'm having problems compiling the module - I get an error during the make process but no clue as to why it is in error.

In the absence of PHP::Interpreter is there anything else I can do?

Rgds

Doug
Reply With Quote
  #4  
Old 06-13-2011, 03:41 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,389
You can try call wp URL (php script) from perl script and parse the output (if any) like in http://www.aota.net/forums/showthread.php?t=12843. the point is that you have to it at the application level.
Reply With Quote
  #5  
Old 06-14-2011, 03:29 PM
dougconran dougconran is offline
Member
 
Join Date: Jan 2010
Posts: 15
Default [RESOLVED] Executing PHP within Perl served pages

Many thanks for the second suggestion. That is what I did and it works fine.

Rgds

Doug
Reply With Quote
Reply

Tags
perl, php

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:45 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.