473,466 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PHP in PErl

I am calling a perl script that writes a WEB page - Plain and simple except
that the perl script also writes out some PHP processing. All works fine
when I just create an html file of the program but when I use perl to write
it the php tags are ignored ?

I have the apache Xbithack on so php is parsed for all html files and the
perl script says it is an html file as below.

This code is called from a WEB page

#!/usr/local/bin/perl
print <<END;
Content-type: text/html

<?php
SCRIPT etc etc
?>
END

PHP tags are just printed on the screen.

Any pointers.
Gary


Jul 19 '05 #1
4 2918
"Gary" <re*****@netlink.info> multi-posts.

Please don't do that.
Jul 19 '05 #2
Gary wrote:
I am calling a perl script that writes a WEB page - Plain and simple except
that the perl script also writes out some PHP processing. All works fine
when I just create an html file of the program but when I use perl to write
it the php tags are ignored ?


PHP is processed on the server only when the server reads it from a file.
Jul 19 '05 #3
Look at your first line - #!usr/local/bin/perl - does your perl binary
actually sit in /usr/local/bin/? Mine is in /usr/bin
Try $whereis perl

Wayne

"Gary" <re*****@netlink.info> wrote in message
news:jBTWc.141014$Oi.66269@fed1read04...
I am calling a perl script that writes a WEB page - Plain and simple except that the perl script also writes out some PHP processing. All works fine
when I just create an html file of the program but when I use perl to write it the php tags are ignored ?

I have the apache Xbithack on so php is parsed for all html files and the
perl script says it is an html file as below.

This code is called from a WEB page

#!/usr/local/bin/perl
print <<END;
Content-type: text/html

<?php
SCRIPT etc etc
?>
END

PHP tags are just printed on the screen.

Any pointers.
Gary

Jul 19 '05 #4

"Joe Smith" <Jo*******@inwap.com> wrote in message
news:At4Xc.232601$eM2.48080@attbi_s51...
Gary wrote:
I am calling a perl script that writes a WEB page - Plain and simple except that the perl script also writes out some PHP processing. All works fine
when I just create an html file of the program but when I use perl to write it the php tags are ignored ?


PHP is processed on the server only when the server reads it from a file.


So basically this will never work.

The reason for this is as follows.

I want to load an HTML page with PHP tags that then calls a CGI written in
Perl but also to pass it parameters. The perl program does some work, and
will then need to return resulkts to the PHP program for display . I guess I
could have the perl program write the results to a file and then have PHP
readc the file but this seems crude it at all possible anyway ?

Gary
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
31
by: surfunbear | last post by:
I've read some posts on Perl versus Python and studied a bit of my Python book. I'm a software engineer, familiar with C++ objected oriented development, but have been using Perl because it is...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
13
by: Otto J. Makela | last post by:
I'm trying to install to php the Perl-1.0.0.tgz package (from http://pecl.php.net/package/perl, enabling one to call perl libraries) to a pre-existing Solaris system. Unfortunately, the attempt...
6
by: surfivor | last post by:
I may be involved in a data migration project involving databases and creating XML feeds. Our site is PHP based, so I imagine the team might suggest PHP, but I had a look at the PHP documentation...
4
by: billb | last post by:
I installed a perl extension for PHP to use some perl inside my php primarily because I have perl working with oracle and not php and oracle. So I want to use my old perl scripts, and use the...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.