I'm using a windows machine for local development and I'd like to install php_svn so I can write some code in php that provides an svn interface for a web app so that the client can download all their files easily. The php4win site is down, and I can't find the php_svn.dll anywhere and running pecl.bat install svn doesnae work either. "The DSP svn.dsp could not be found" I'd be very grateful if anyone has any information on how I can install this php extension on windows, and the /pierre site doesn't seem to contain the php_svn extension within it.
Just by doing a few quick searches on your request, I couldn't find it, either. It looks like you'll either have to compile the library for Windows, yourself, or try the method that Björn mentions on this answer.
Alin, thanks for your effort. I ended up with using the svn command line client directly from php. Like this $Res = svn --non-interactive ls -R -v "file:///C:/Proj/Svn/..." and then parsing the result string.
Related
I know this is a newbie question, but i want to study php. i have phpeclipse and its running well, the problem is when i run a simple html file with the default server the page says cant display this page and thats it. i dont know if i need to install a new server or is there something wrong with the server configurations. ive tried installing tomcat on my computer but i cant see it under windows->preferences->server->runtime enviroments->add. iv also tried under the same page to fetch geronimo v2.2 and 3.0 and the dependencies were wernt satisfied. iv also tried the repository for zend debugger. what do i need to do in order to compile and see php and html pages with php eclipse?
You don't need to compile PHP.
Depending on your operating system and PHP version there are a few options.
As of PHP 5.4+ you can run your application using PHP's built in server, on the command line, if you cd into your website root directory (i.e. where the index file is) and then run the following
php -S localhost:8989
Then if you navigate to http://localhost:8989 in your browser you should see your application.
If you are unable to run the inbuilt web server, you need to look at Apache2. Most PHP websites run inside the Apache 2 web server. You will generally need a *AMP (WAMP/LAMP) environment.
L/W (Linux / Windows)
A pache (Web server)
M ySQL (Database)
P HP
Hope this is enough of a pointer ;)
I am figuring out how to use PHP OpenId
I have cloned the repo to the ~/www directory. There are some examples in the php-open-id/examples directory which I wanted to run.
Specifically, I wanted to render the page php-open-id/examples/consumer/index.php in order to better understand the API. I started a server in the php-open-id/examples directory using
python -m SimpleHTTPServer 8000
and I navigated to localhost://consumer/index.php
But it didn't work. It shows a dialog box to save the file. What is the correct way to render this PHP file?
I have found a solution :
Run the server using
php -S localhost:9000
Mac OS
Just Visit your project folder
open terminal on that folder
and Run php -S localhost:9000
then you can see
PHP 7.3.24-(to be removed in future macOS) Development Server started at Tue Mar 30 11:58:49 2021
Listening on http://localhost:9000
After that you are able to access your application on http://localhost:9000
if your port is not available try to change port
You need to have a php server for serving .php files. The simple python server is not a php server and therefore it is just simply listing the files in the directory for download.
If you are on OSX 10 or above, it comes with apache which has php module present and can be setup to serve php file.
Tutorials can be found here
http://php.net/manual/en/install.macosx.bundled.php and here https://discussions.apple.com/docs/DOC-3083
If you would like to setup a dedicated server instead of using apache, MAMP is a good solution. Google It and see tutorials on how to set it up.
Update November 2022:
Unfortunately, PHP has been removed from MacOS. This is a brief tutorial which explains how to get PHP working in Ventura.
I personally dislike the idea to compensate the lack of PHP with the activities outlined in the tutorial. My solution was to install Docker and to run a proper NGINX+PHP container. I consider it to be cleaner, more flexible and better to maintain rather than faffing about with half-baked on-board stuff. But that's a matter of taste, I guess.
Also, as suggested in one of the answers, using the Python approach is not hassle free in Ventura, since it requires xcode to be installed.
In MacOS 10.x I have also been working with the on-board Python and PHP. Having lost those tools as standard installations is annoying.
I'm looking for something like http://phpfiddle.org/, but completely local. I don't want to commit to installing something as complex as Apache, then PHP on top of that, just to try out code when I'm offline. Is there anything that can run PHP 5.5 on the local machine without installing an entire server underneath it?
There's no need for a server if using PHP 5.5+ - it has a built-in server (http://www.php.net/manual/en/features.commandline.webserver.php)
Just use:
$ cd ~/public_html
$ php -S localhost:8000
As a minimalistic solution, on the command line you can also start php in interactive shell with php -a that will execute the commands you enter line by line. I often use it for testing small snippets of code.
You can download a portable webserver http://www.usbwebserver.net/en/ and use this script under it https://github.com/websiteduck/Run-PHP-Code
You can install either XAMPP or WAMP server locally if you find it complicated to configure PHP for Apache.
You should try phpsh as well. It is a php interactive shell from the facebook developer folks with history, tab completion and quick access to documentation.
The project is maintained on github.
Use psysh which is a wonderful tool for the purpose you described.
If your project is on Laravel, then it's "built in", as tinker, so you can invoke it as php artisan tinker.
I really dont think so. but it isnt so complex as you think.
if you are on windows - just download: http://www.wampserver.com/ - it will install the whole server for you (mysql&phpmyadmin,php5).
on linux - got to google: install lamp to [your-linux] -- and follow the simple instructions
For Windows Users:
Check out the ezPHP GitHub project. Per the project description...
EzPHP is an alternative to Xamp/Wamp. EzPHP is the easiest way to setup a PHP development environment for learning PHP programming on Windows.
The scope of this project is to provide a single .exe file that will get you a PHP developing server.
Link - https://github.com/marcomilon/ezphp
Setting it up was simple. Download the exphp.exe file and drop it in a folder. When you run the exe, it will launch the server and generate a public_html folder and index.php file. Follow the instructions in the command window and navigate to http://localhost:8080. Now you can start developing in the public_html folder and refresh your browser to see your changes.
This is what I do for simple pages:
Download php in zip and extract (PHP 8.0.2 ~25MB)
Then run
> php.exe path\to\your\index.php>path\to\the\output\index.html
Open the result index.html with your favorite browser
You have to find a workaround for your _GETs though.
If you use a development environment, like Aptana Studio, you might as well click on the Run As, and run it in your preferred browser. You need WAMP/XAMPP to be installed and running in order to do so.
Basically My aim is to use the following script on my website
php-upload-progress-bar
I want to first of all set it up on my local server which is on ubuntu 10.04 and i am using xampp1.7.7 and then upload it on my website which is hosted by dreamhost web hosting which uses php5.2
The main requirement of above script is to have APC .
My problem is that i am unable to set up APC on both server (my local and on dreamhost)
I have followed many tutorials to install it but coudn't install it
Can someone give me some idea about using APC and installing it to run above script??
I have already followed following tutorials and guides
Dreamhost wiki
Stack answer
PS;I am not using apache2 service.my php path is /opt/lampp/htocs
Please help me i am stuck in this and also i am using that upload script because i can not use flash,html5 or php5.3 acording to client requirement so i need a solution for upload progress bar using APC so that it will run in all browser and with php5.2
Thanks in advance
Please feel free to contact DreamHost support for more immediate assistance. As for the APC extension, it is not enabled on our php 5.2 or php 5.3 options, as you mentioned. The easiest way to do this will likely be to compile the apc module for php 5.3 and then setup the custom phprc file for it under your user. This wiki details the process:
http://wiki.dreamhost.com/PHP.ini#Compiling_PHP_5.3_extensions
-- I tested doing a install right now, the steps were:
Download the APC package from PECL: http://pecl.php.net/package/APC
extract it, enter the directory, run phpize, then run:
./configure --with-php-config=/usr/local/php53/bin/php-config
then make
mkdir -p ~/.php/5.3
cp modules/apc.so ~/.php/5.3
then edit the file ~/.php/5.3 and put into it:
extension=/home/USER/.php/5.3/apc.so
(replacing USER with your real ssh username)
save it, and you should be good to go.
Feel free to write us at support if you have any additional questions.
I've searched the internet for days to find out how to install ffmpeg (and lame) on XAMPP for Mac (PHP). But I didn't find the key to my quetsion.
I need to covert mp3's on my webserver (php) using lame, but I like to test it on my XAMPP for Mac first.
I think I need the "php_ffmpeg.dll" which can be downloaded at Sourceforge.
I found a step-by-step description here but this question only refers to XAMPP for Windows. But I need it for Mac.
Can anyone help to supply a step-by-step description?
The DLL file is not what you need, they're only for Windows.
Follow these instructions to install ffmpeg on your Mac, then use one of PHP's program execution functions to call the ffmpeg executable from your PHP code.