473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

perl-freeze like alternative to php_serialize()

Hi ,
we are looking for an efficient method to transport array structures from a
php script to some other engine. Currently we offer phps internal serialize
function and (if present) the json encoding. For installations where the
latter is _not_ present we are looking for something else, especially to
hand over arrays to perl.
Now there is a perl class living in CPAN that can unserialize php-serialized
arrays but I wonder if there is some (already existing) way to generate a
perl-freeze representations from within php ?
Does anyone have a hint here, or maybe an alternative?

Thanks, arkascha
Jul 11 '07 #1
2 1898
You might store the array as XML, for example:

http://simonwillison.net/2003/Apr/29/xmlWriter/

Perl can load it with XML::Simple:

http://articles.techrepublic.com.com...2-5363190.html

On Jul 11, 7:52 am, arkascha <no_spam@no_spam.orgwrote:
Hi ,
we are looking for an efficient method to transport array structures from a
php script to some other engine. Currently we offer phps internal serialize
function and (if present) the json encoding. For installations where the
latter is _not_ present we are looking for something else, especially to
hand over arrays to perl.
Now there is a perl class living in CPAN that can unserialize php-serialized
arrays but I wonder if there is some (already existing) way to generate a
perl-freeze representations from within php ?
Does anyone have a hint here, or maybe an alternative?

Thanks, arkascha

Jul 11 '07 #2
petersprc wrote:
You might store the array as XML, for example:
http://simonwillison.net/2003/Apr/29/xmlWriter/
Perl can load it with XML::Simple:
http://articles.techrepublic.com.com...2-5363190.html
Thanks for the hint, I'll give it a glimpse. I am always a fan of more than
one possible solution, this adds stability to the general solution...

Actually I have to admit that we are now using JSON more intense. I realized
in the meantime that JSON is availible as a PECL extension that's quite
easy to install. Works like charm :-)
On Jul 11, 7:52 am, arkascha <no_spam@no_spam.orgwrote:
>Hi ,
we are looking for an efficient method to transport array structures from
a php script to some other engine. Currently we offer phps internal
serialize function and (if present) the json encoding. For installations
where the latter is _not_ present we are looking for something else,
especially to hand over arrays to perl.
Now there is a perl class living in CPAN that can unserialize
php-serialized arrays but I wonder if there is some (already existing)
way to generate a perl-freeze representations from within php ?
Does anyone have a hint here, or maybe an alternative?

Jul 13 '07 #3

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...
3
by: David F. Skoll | last post by:
Hi, I'm tearing my hair out on this one. I'm trying to embed a Perl interpreter into a C program. I need to be able to create and destroy the interpreter periodically, but will never actually...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...

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.