Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
In XAMPP environment
I develop and test my PHP code in XAMPP environment (local) and it success.
In PHP Desktop environment
I already copied the php_printer.dll into the ext folder and include this line extension=php_printer.dll in the php.ini file.
I also moved my folder from htdocs (XAMPP environment) to the www folder (PHP Desktop environment) but when I run the phpdesktop-chrome.exe it shows ...undefined function printer_list()... so I knew that it cannot recognize the library.
My question
How do I configure PHP Desktop to recognize the php_printer.dll as similar to my XAMPP behavior?
Update 1
php_printer.dll failed to load. By the way how do I identify my php_printer.dll version whether it match PHP Desktop or not? Thank you.
Update 2
Okay I have the version as below:
PHP Desktop: phpdesktop-chrome-57.0-rc-php-7.1.3
php_printer.dll: php_printer-php5.6.30
PHP extensions are often intended for specific PHP versions (eg. 5.12.xx and Thread-safe or non-thread-safe). If your extension doesn't match specific php version it won't work. In such case you should see a startup error if you enable it in php.ini.
For detecting problems during PHP startup see:
https://github.com/cztomczak/phpdesktop/wiki/Knowledge-Base#problem-running-php-script
https://github.com/cztomczak/phpdesktop/wiki/Knowledge-Base#error-500-internal-server-error-cgi-program-sent-malformed-or-too-big-16384-bytes-http-headers
Update
Your extension is for php 5.6.30, so you should download that specific php version, see: https://github.com/cztomczak/phpdesktop/wiki/Knowledge-Base#php-interpreter--extensions
Try non-thread-safe version first and then thread-safe version.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'd like to be able to run PHP application on my own windows desktop.
What are my options?
accodring to this reference, I have to install visual studio 2015 to able to do it. Is it the really necessary?
Why do they mention compiling php? it's a scripting language so am I still supposed to pre-compile it before running it?
Is Visual Studio the only editor or there are other suggested IDEs?
Do I have to run it on IIS, can't I install apache server on my desktop and run the php application on it?
The instructions you find on the wiki are for building PHP from source, but you don't have to do that to use PHP on Windows.
You can use one of the WAMP/XAMPP packages mentioned in the comments. That's definitely a quick and convenient way to get it working on your system. But if you really just want to put PHP on your Windows machine without using one of those, it really isn't too hard.
Based on your questions, including:
Why do they mention compiling php?
I think I can safely assume that you don't want to compile PHP. Fortunately, you don't have to.
Just go to the PHP for Windows download page and find the version that will work on your system. The "Which version do I choose?" in the left panel will help you figure out which one you need. These are pretty much ready to use, just extract it where you want it (I usually just do C:\PHP).
You will need to have the appropriate C++ redistributable installed before it will work. There are also links to those on the PHP for Windows page that I linked above. If you chose PHP 7 (why not?) it will be the VC14 version.
After you have installed the C++ redistributable and extracted the PHP zip file you downloaded, add the new PHP directory to your Windows path, and you'll be able to use PHP on the command line. You can test that it's working properly with php -v (displays the installed version) in a cmd window.
To configure your PHP installation, start with one of the provided ini files, either php.ini-development or php.ini-production. Make a copy of the one you want to use and rename it to php.ini.
Of course, this is only PHP. If you want to use it to with Apache or some other web server, you'll need to install that separately and configure it to use your PHP installation. It's not difficult after you have some experience with it, but I remember it being pretty frustrating to get it working the first time. The advantage to using XAMPP or similar is that includes Apache and MySQL with one installer. If you're just starting out, that's definitely the easiest way to get going.
As far as IDEs, there are various ones that support PHP. There are some free ones that are fine, if that matters to you, but all you really need is a good text editor.
This question already has answers here:
program cant start because php5.dll is missing
(9 answers)
Closed 6 years ago.
I have a Win 2008 r2 server that has been running PHP 5.3 and convinced client to upgrade to 5.6.19 which is the latest available at the time of this post. This instance runs Apache 2.2.
Because I want to keep this instance lean but able to move back to 5.3 if I failed I downloaded the non-thread-safe version. I've updated the soon-to-be commissioned php.ini (formerly the example production file) to be aligned with the params in the 5.3 php.ini. Then I pointed the server's PATH from the 5.3 folder to the new one containing the 5.6.19 files. I have not attempted to run Apache yet opting instead to test that the new PHP works at least with CMD. That's when I got the above message.
It would seem the consensus of these posts:
http://www.touchoftechnology.com/the-program-cant-start-because-php5ts-dll-is-missing-from-your-computer-error/#ixzz42KMHyQFz
program cant start because php5.dll is missing
that I should rename the php5.dll file to 'ts' or 'nts' in its file name and/or add this designation in the php.ini. But I don't see where to put it in the .ini file. Renaming php5.dll (from the installation files) to php5nts.dll returns the message that php5.dll is missing. I've tried many different combinations of these filenames, and even adding a php5ts.dll from a thread-safe distribution. I can't get one without the other.
One of the posts suggests adding the 'nts' to some of the Zend extensions but I'm not running zend on this production box. Where in the php.ini do I need to set the file I got (php5.dll) to solve this? I hope once I get the CLI working that the Apache should not have this problem.
Other comments say to run Microsoft's Platform installer but that seems to introduce more things that are not needed on this production box and I do not want any extra baggage. I just want to point Windows and Apache to this newer PHP install.
I had read that for early Windows OS I should use the non-thread safe version of PHP. That version is missing the php5apache2_x.dll which caused doubt about this package. An acquaintance said to use the thread safe version which had the php5apache2_4.dll. It seemed to work in the Windows CMD browser after I set my environment variable to that folder. But digging further, it appears that I should also upgrade my Apache to 2.4 as later PHP and later Apache are using different Visual Studio compilers.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I found a tutorial on-line that describes how to build an image uploader.
The author has his script available here:
http://simplifiedcoding.16mb.com/PhotoUpload/upload.php
I don't have a web site.
I would like to try the tutorial. How do I try/test the Php files on my own computer?
The tutorial you link to seems to require MySQL and PHP 5. You can easily run both of those on you local machine and I recommend that you do so by downloading and runnning the XAMPP installer for PHP 5 (not PHP 7):
https://www.apachefriends.org/download.html
When you run the setup make sure that the following are included:
Apache - the web server
PHP - the (main) scripting language of the tutorial
MySQL - the database
phpMyAdmin - an administration tool for the database (nice to have and if you can get it to work you have everything you need up and running)
If you need more visual help than that, I recommend that you search for instruction videos using the words xampp, phpmyadmin and [your operating system]. Here is an example for Windos 10:
How to Install XAMPP to your PC(OS: Windows 10)
You start by understanding the setup.
From the question I assume you use Windows and you installed WAMP or XAMPP (don't ask how I know).
go the folder where WAMP/XAMPP was installed. Usually under program files folder
Look for a www or htdocs or html folder.
In that folder create a file called 1.php
in it put <?php phpinfo();
Turn on the WAMP/XAMPP server (when u installed it u also installed a short cut to it's controll panel)
surf to localhost/1.php or 172.0.0.1/1.php and make sure u see the info about your php installation.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a command line php app that I need to distribute to a client. I just want to give them an executable, not instructions for installing php ;)
What is a good php compiler for windows that includes support for php 5, curl, TLS, and a few other libs I use?
I need to control memory and time limit usage, so I must be able to use a custom php.ini. (this should be packaged in the exe as well, not a separate file)
Additionally, I don't want the code to be easily extracted. This isn't a huge requirement, but I'd rather not have the source viewable in a hex editor.
I've got a few hits on Google, but if anyone has actually used one, your feedback would be invaluable.
edit
If I knew I was going to distribute this to the client when i started, I'd have used C#. But I didn't. Now they want to buy it. It needs to be DEAD SIMPLE. one executable containing the php interpreter and my script plus an entry point to start my script when the exe is run.
It would also be great if I didn't have to redistribute dll's either.
edit2
I am look for somthing along the lines of phc, or roadsend. phc doesn't support windows, and roadsend doesn't support php5 in windows.
Okay I figured it out. there is a open source program called phc-win. It supports php 5.3.1, compiles scripts to byte code (obfuscation!) and is simple to use (It even has a gui).
It needs a php-embed.ini and whatever DLL's you use, but it just works.
Thanks for all the answers everyone!
phc-win 0.3.1 (c) 2009 Andrew
Fitzgerald -
contact#swiftlytilting.com PHP
Version: 5.3.1
To compile a single file:
Choose 'Compile single file' from the File menu.
Then select the file to compile.
To build an EXE containing all files in a directory and all sub
directories:
Choose 'Compile directory' from the File menu.
Select the project folder.
Select the main program file.
phc-win will then recursively scan the specificed directory.
All files with 'php' anywhere in the extension will be compiled into
.phb files.
These .phb files, along with all files in the directory tree will be
added to the project EXE.
Once the EXE has been created, you will be asked about the EXE type:
CONSOLE (displays DOS box)
WINDOWS (no DOS box).
Place the EXE in the same directory with the required DLL file(s) and
php-embed.ini file if needed.
You want this: Bamcompile
http://www.bambalam.se/bamcompile/
You can use the WApache, too:
http://wapache.sourceforge.net/
And, if none of these options satisfy you:
http://www.zzee.com/phpexe/
If you want to run php scripts as Windows executable, the best is Wapache http://sourceforge.net/projects/wapache/ and if you want to protect your code try ZZEE
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a command line php app that I need to distribute to a client. I just want to give them an executable, not instructions for installing php ;)
What is a good php compiler for windows that includes support for php 5, curl, TLS, and a few other libs I use?
I need to control memory and time limit usage, so I must be able to use a custom php.ini. (this should be packaged in the exe as well, not a separate file)
Additionally, I don't want the code to be easily extracted. This isn't a huge requirement, but I'd rather not have the source viewable in a hex editor.
I've got a few hits on Google, but if anyone has actually used one, your feedback would be invaluable.
edit
If I knew I was going to distribute this to the client when i started, I'd have used C#. But I didn't. Now they want to buy it. It needs to be DEAD SIMPLE. one executable containing the php interpreter and my script plus an entry point to start my script when the exe is run.
It would also be great if I didn't have to redistribute dll's either.
edit2
I am look for somthing along the lines of phc, or roadsend. phc doesn't support windows, and roadsend doesn't support php5 in windows.
Okay I figured it out. there is a open source program called phc-win. It supports php 5.3.1, compiles scripts to byte code (obfuscation!) and is simple to use (It even has a gui).
It needs a php-embed.ini and whatever DLL's you use, but it just works.
Thanks for all the answers everyone!
phc-win 0.3.1 (c) 2009 Andrew
Fitzgerald -
contact#swiftlytilting.com PHP
Version: 5.3.1
To compile a single file:
Choose 'Compile single file' from the File menu.
Then select the file to compile.
To build an EXE containing all files in a directory and all sub
directories:
Choose 'Compile directory' from the File menu.
Select the project folder.
Select the main program file.
phc-win will then recursively scan the specificed directory.
All files with 'php' anywhere in the extension will be compiled into
.phb files.
These .phb files, along with all files in the directory tree will be
added to the project EXE.
Once the EXE has been created, you will be asked about the EXE type:
CONSOLE (displays DOS box)
WINDOWS (no DOS box).
Place the EXE in the same directory with the required DLL file(s) and
php-embed.ini file if needed.
You want this: Bamcompile
http://www.bambalam.se/bamcompile/
You can use the WApache, too:
http://wapache.sourceforge.net/
And, if none of these options satisfy you:
http://www.zzee.com/phpexe/
If you want to run php scripts as Windows executable, the best is Wapache http://sourceforge.net/projects/wapache/ and if you want to protect your code try ZZEE