Is There a PHP SVN Server [duplicate] - php

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
PHP Source Control Server
Hello,
I know there is a SVN Extension for php before some one comments on that.
I'm asking for a php SVN Server as i would like to read how SVN's save the changes as i want to do the same ting but use mysql Database instead for my content allso i would like to see how it's formed when the latest Repo is downloaded so i could do with project.
I dont mind other scripting langs just no compiled application posting please
EDIT
Ok what im looking for is the method svn uses to detect and save changes.
And the method used to construct the end result file when downloading a repo
THIS is not for me to build on SVN its for me to build a System that replicates the 2 parts mentioned above
Awnser ----------------------------
http://pear.php.net/manual/en/package.text.text-diff.intro.renderers.php

If your interested in looking into the data format they use, do you know SVN has a Berkeley DB backend?
http://svnbook.red-bean.com/en/1.5/svn.reposadmin.create.html
svnadmin create --fs-type bdb /var/svn/repos

Related

How to create .exe executable file for php project [duplicate]

This question already has answers here:
Convert a PHP script into a stand-alone windows executable
(7 answers)
Closed 9 years ago.
I developed one project using YII framework. Now I want the project in single executable file.
Is it possible to create using yii or php libraries.
How to create .exe executable file for yii project.
And is it possible to convert project file to some format that if I install it any others
place that they can't read may be some encrypted format.
Short answer: Not possible.
Long answer: It depends.
You could install a web- and database server on his machine (or create an installer that does it) and run the application locally on his machine.
or
You keep the application on a server and just provide a launcher that opens his browser and points it to the URL of the application.
It might be a good idea to switch to SQLite instead of MySQL but depending on how your application is written it might require a lot of code and SQL Query changes.
PHP Desktop which allows you to create desktop apps in the same way as you build websites with php/html/js.
The convenient solution is not to convert the website to .exe. I think it will be better if you have portable server/php/mysql and make the website work from a usb or CD with autorun.
there are many good options for the same and you can find them at PHP Compilers
I have used PHPLanger for the same

how to open file in firebreath? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
A simple hello world NPAPI plugin for Google Chrome?
How to open a file which includes in Chrome extension by C/C++?
originally i wanted to develop a chrome extension to open a file on the user's pc.
I wanted to use php fopen some SO users said that I have to use NPAPI instead and said that this is a duplicate question and deleted my question.
I just want to know why can't I use fopen? And if i really don't have other options, then how to open a file using firebreath?
When i go to this section of the docs i don't see the snippets.
i know that moderators gonna come to my question saying that this is a dupe and link to this question I'm one step ahead lol
I don't understand a thing from the accepted answer and i don't understand what file he edited.
the second answer give this link but i can't see the snippets! can you?
I'm on linux mint 12, 32 bit
let me change the question. Can i do this in java? Flashgot got some jar files in the source code :)
install flashgot using chrome, a file called flashgot-1.3.9-tb+sm+fx.xpi will be downloaded, change that to flashgot-1.3.9-tb+sm+fx.zip unzip it and go to the chrome folder
Can i do it in python? every linux distro has python by default
I just want to know why can't I use fopen?
Because JavaScript isn't C.
More generally, there's no way for arbitrary web pages to run arbitrary native code on your computer because otherwise clicking a link could take you to a page that would steal every file on your computer and then erase your hard drive.
If you use firebreath then you're in C++, so you can use fopen if you wish. Keep in mind that you would have the same privileges as the browser, which running as a user probably can't write places like Program Files, etc.
You can't use fopen in javascript. I don't know why a "building firebreath on linux" page would ever have snippets on how to open a file; since firebreath is just C++ I don't know why we'd need to add docs for opening a file at all.. it's just C++. Open a file like you would in any other C++ application.
The other question has all the information you need to figure out where your file is; they didn't include specifics on how to do the operation itself because you don't need those specifics; you can get them anywhere. Try googling "open a file in c++" and you'll get lots of hits.

Why can't I compile PHP code? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Can you “compile” PHP code?
After I write an application in PHP, why can't I compile it into machine language? I know that it's possible to make a byte-code version of the file, which (as I understand it) is basically a file that has already been parsed into tokens.
But that's not what I want. Clearly it can't work in a general sense, since compiled code will be platform-specific, but let's say I have chosen a given platform. Why can't I create a binary file that would be the same code that PHP would run when given my .php file?
You can, facebook released a project which is currently being updated for php 5.3 (supports everything lower iirc) called HipHop, you can find it here: https://github.com/facebook/hiphop-php
There are a few compilers out there like facebook's, mentioned by #Howard, or http://www.roadsend.com/home/index.php?pageID=compiler. I've never tried them though.

Open documents(pdf,doc,docx,txt) in browser page using php (without using google docs viewer) [duplicate]

This question already has answers here:
Is there a PDF parser for PHP? [closed]
(7 answers)
Closed 8 years ago.
My question is that i want to open documents(pdf,doc,docx,txt) in browser page using php (without using google docs viewer) can any one help me?
Some of these are doable. Some, not so much. Let's tackle the low-hanging fruit first.
Text files
You can just wrap the content in <pre> tags after running it through htmlspecialchars.
PDF
There is no native way for PHP to turn a PDF document into HTML and images. Your best bet is probably ImageMagick, a common image manipulation program. You can basically call convert file.pdf file.png and it will convert the PDF file into a PNG image that you can then serve to the user. ImageMagick is installed on many Linux servers. If it's not available on your host's machine, please ask them to install it, most quality hosts shouldn't have a problem with this.
DOC & DOCX
We're getting a bit more tricky. Again, there's no way to do this in pure PHP. The Docvert extension looks like a possible choice, though it requires OpenOffice be installed as well. I was actually going to recommend plain vanilla OpenOffice/LibreOffice as well, because it can do the job directly from the command line. It's very unlikely that a shared host will want to install this. You'll probably need your own dedicated or virtual private server.
In the end, while these options can be made to work, the output quality is not guaranteeable. Overall, this is kind of a bad idea that you should not seriously consider implementing.
I am sure libraries and such exist that can do this. Google could probably help you there more than I can.
For txt files I would suggest breaking lines after a certain number of characters and putting them inside pre tags.
I know people will not be happy about this response, but if you are on a Linux environment and have pdf2html installed you could use shell_exec and call pdf2html.
Note: If you use shell_exec be wary of what you pass to it since it will be executed on the server outside of PHP.
I thought I'd just add that pdfs generally view well in a simple embed tag.
Or use an object so you can have fall backs if it cannot be displayed on the client.

How can I modify exif data of an image with PHP [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How do I add exif data to an image?
I want to modify some information in exif data with PHP. I've googled around but no hope. There's function in PHP, exif_read_data. But it only reads not writes. Anybody knows how or walkaround?
Looks fairly old but may be something for you: http://pel.sourceforge.net/
This gets also mentioned in the linked article from Calvin L.
http://pel.sourceforge.net/
A php extension that can write exif data, with installation instructions using PEAR. It requires that you can control which extensions are being installed on the machine that runs your PHP, which is not the case in many virtual hosting environments.

Categories