Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

phar.createdefaultstub(3) [php man page]

PHAR.CREATEDEFAULTSTUB(3)						 1						 PHAR.CREATEDEFAULTSTUB(3)

Phar::createDefaultStub - Create a phar-file format specific stub

SYNOPSIS
finalpublicstatic string Phar::createDefaultStub ([string $indexfile], [string $webindexfile]) DESCRIPTION
This method is intended for creation of phar-file format-specific stubs, and is not intended for use with tar- or zip-based phar archives. Phar archives contain a bootstrap loader, or stub written in PHP that is executed when the archive is executed in PHP either via include: <?php include 'myphar.phar'; ?> php myphar.phar This method provides a simple and easy method to create a stub that will run a startup file from the phar archive. In addition, different files can be specified for running the phar archive from the command line versus through a web server. The loader stub also calls Phar.interceptFileFuncs(3) to allow easy bundling of a PHP application that accesses the file system. If the phar extension is not present, the loader stub will extract the phar archive to a temporary directory and then operate on the files. A shutdown function erases the tempo- rary files on exit. RETURN VALUES
Returns a string containing the contents of a customized bootstrap loader (stub) that allows the created Phar archive to work with or without the Phar extension enabled. ERRORS
/EXCEPTIONS Throws UnexpectedValueException if either parameter is longer than 400 bytes. EXAMPLES
Example #1 A Phar.createDefaultStub(3) example <?php try { $phar = new Phar('myphar.phar'); $phar->setStub($phar->createDefaultStub('cli.php', 'web/index.php')); } catch (Exception $e) { // handle errors } ?> SEE ALSO
Phar.setStub(3), Phar.getStub(3). PHP Documentation Group PHAR.CREATEDEFAULTSTUB(3)

Check Out this Related Man Page

PHAR.DELMETADATA(3)							 1						       PHAR.DELMETADATA(3)

Phar::delMetadata - Deletes the global metadata of the phar

SYNOPSIS
public bool Phar::delMetadata (void ) DESCRIPTION
Note This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. Deletes the global metadata of the phar PARAMETERS
RETURN VALUES
returns TRUE on success, but it is better to check for thrown exception, and assume success if none is thrown. ERRORS
/EXCEPTIONS Throws PharException if errors occur while flushing changes to disk. EXAMPLES
Example #1 A Phar.delMetaData(3) example <?php try { $phar = new Phar('myphar.phar'); var_dump($phar->getMetadata()); $phar->setMetadata("hi there"); var_dump($phar->getMetadata()); $phar->delMetadata(); var_dump($phar->getMetadata()); } catch (Exception $e) { // handle errors } ?> The above example will output: NULL string(8) "hi there" NULL SEE ALSO
Phar.getMetadata(3), Phar.setMetadata(3), Phar.hasMetadata(3). PHP Documentation Group PHAR.DELMETADATA(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

GD library?

I've just been told that I need to install the GD library for PHP on my server, but I've got no idea how to do that or even:eek: where I can find it so that I can download and install it. Is it easy to do and how would I go about doing it?:confused: By the way I believe the server is running... (4 Replies)
Discussion started by: thehaapyappy
4 Replies

2. Web Development

[PHP] Post and get (at the same time (?))

Hi, i'm programming a very tiny website for a friend. But i have some doubts... I have a page called form.php, it receives a variable using the get method... (form.php?variable_importante=datos)... In form.php i have a form, and it sends data to form_manager.php using POST method... But the... (2 Replies)
Discussion started by: Sandia_man
2 Replies

3. Web Development

I can't open my index.php page after insert php code

Hello guys, Does anyone can help me? I've just made my simple index.php without any code, but after insert session code to check if any user is authenticated, my index.php doesn't work anymore. Any fresh eyes could help me to see what and where the code is wrong? <? if... (6 Replies)
Discussion started by: metalfreakbr
6 Replies

4. Shell Programming and Scripting

Pass variable to php from html form

I am sure this is easy but I can't figure it out... Here is the form. <?php $searchString = $_POST; if (!isset($_POST)) ?> <html> <head> <title>Personal INFO</title> </head> <body> <form method="post" action="search.php"> <input type="text" size="20" maxlength="20" name="search">... (1 Reply)
Discussion started by: mrlayance
1 Replies

5. UNIX for Advanced & Expert Users

What's a high load for my system?

I'm not sure if this belong in dummies or advanced so I made my best guess. Go easy on me if I get it wrong. I'm trying to determine what a high load for my system is. I run a php/mysql web server with a dedicated host. The host has a Intel Xeon 3110 (Dual Core) processor. Our load seems to... (5 Replies)
Discussion started by: vanguard
5 Replies

6. Web Development

php files are downloaded

Hello, I have setup Cherokee web server and php 5.2 in Opensolaris zone. Problem is that all .php files are downloaded from web server and not served when I use IP address instead of DNS name in web brovser. Example: test.mydomain.com <-- php works 192.168.0.10/index.php <--... (3 Replies)
Discussion started by: kreno
3 Replies

7. Linux

Run PHP script when new email received

I have been looking around for a solution to this, i have been developing for a wile though am very new to CGI, PHP and a lot of the web based tech. I have a web site hosted with a cPanel web host. I am looking to have a script(prefer PHP) to run everytime i get a new email to help@xxx.com.... (16 Replies)
Discussion started by: iKris
16 Replies

8. Web Development

Home work

I am studying part-time degree course ( Information system ), I just ask to do the following question , but it is not easy for me as I do not have IT background , does someone can help for it. "Consider the following web application for a property agent : The server download to the client... (1 Reply)
Discussion started by: ust
1 Replies

9. Web Development

LAMP - version updates and the impact!

Hello All, I have a LAMP server (CentOS 5.5) which has a lot of php scripts and the php pages runs fine. My question is if I have to allow the OS udpates regularly on the server, will there be any problems in running the existing php scripts? Please advise if my apache/mysql/php functionality... (3 Replies)
Discussion started by: ilan
3 Replies

10. Shell Programming and Scripting

simple php/expect script works from command line but not from web

I have a really basic expect script which I call from php. I works fine when I run the php from the shell, but from the web it appears as if the output buffer gets chopped and never gets all of the contents. php script: (runexpect.php) <?php... (7 Replies)
Discussion started by: jacksona2
7 Replies

11. Programming

How to Integrate DropBox in PHP Web Application?

Hello, I am PHP web application developer and I am working on a web app php, html based. But due to client requirement they want to save database backup on a Dropbox account. Is there a way to do that? Thanks in advance (1 Reply)
Discussion started by: AimyThomas
1 Replies

12. Shell Programming and Scripting

Curl download zip extract large xml file

Hi i have a php script that works 100% however i don't want this to run on php because of server limits etc. Ideally if i could convert this simple php script to a shell script i can set it up to run on a cron. My mac server has curl on it. So i am assuming i should be using this to download the... (3 Replies)
Discussion started by: timgolding
3 Replies

13. Web Development

Default PHP Sites

Hi, I am aware that you can use a DirectoryIndex directive to ensure that the default page is "index.php" or something similar, but my situation is slightly different. Essentially (I'm sure there must be some obvious solution), I want to be able to write code like:<a href="define">Define... (2 Replies)
Discussion started by: FreddoT
2 Replies

14. Shell Programming and Scripting

Search for / and insert \ for every instance

Hi, I want to do a sed (linux) or the alternative in PHP to insert a backslash in front of every occurrence of every forward slash ex. /archive/data/stanley --> \/archive\/data\/stanley I appreciate it! (4 Replies)
Discussion started by: deadyetagain
4 Replies

15. UNIX for Beginners Questions & Answers

Using PHP to view syslog in private web page

I am trying to extract data from syslog and view it on a web page. I'm using a php script. This line works from command line tail -n 11 /var/log/_gateway-syslog.log | grep -a iWiSP-Out | awk '{print $8, $9,$10,$11" ",$19," " $15, $16,$17," " $18,$21, $22}' when I put it into... (4 Replies)
Discussion started by: ae4ml
4 Replies