I recently download PHP from here to install on Windows. I extracted all the contents of the file into a file called php located in C:\php. I added the path to the environment variables. I tried to run php -v on the command prompt but I get nothing, not even an error message. Am I missing something? Something wrong with the installation?
In order for PHP to be properly installed, I needed to have the Visual C++ Redistributable for Visual Studio 2012 installed. I did not have it installed but after all said and done I tried verifying if PHP is installed and it was.
Php is server side script that parses php code and return html output for your browser.
Get a web server and enable php. Try running php code on web server. point your browser to the location.
There are many free web servers available.
Related
IE, does PHP use its own, internal version of cURL or does it use whatever it finds in the local OS (Windows 10)? I'm in the unfortunate position of trying to make scripts written in 7.4 work on a permanent home that's saddled with 7.1. Before I force an update of PHP, I want to make sure chasing the right problem. I've searched php.ini and don't see a path to the local file system.
Thanks!
The curl functions in PHP do not call out to a command-line version of curl, but rather to a library which can be integrated into a C program.
This version may be included "statically" when PHP is compiled, be a separate file installed alongside PHP, or use a shared file installed centrally on the server and used by multiple programs. This will be determined by the distribution package of PHP.
To determine the library version used, use the phpinfo() function, or run php -i on the command line (which just runs that function for you) and search for "curl", which will show the version.
I'm not sure what your question is.
IE is not an issue here.
I always keep a script that gives me the current state of PHP.
PHP Manual, phpinfo()
<?php
phpinfo();
?>
phpinfo will return something like this if curl is (likely) installed.
I learned through the process of installing PHP 8.1 in my dev env and configuring it to use curl (and a comment), that PHP does call it's own curl executable, in the case of windows 10: php_curl.dll, and does not make an external call to curl in the operating system.
My fear was I'd go through the process of getting someone to upgrade PHP then have to have ask, again, to have curl upgraded.
Thanks to all who offered input!
yes, but curl is an extension, you need to enable it in php.ini file
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 ;)
Does apache or nginx must be installed before I can run my PHP files in browser?
Django itself has a run-server for testing python codes.Is there any similar way to test PHP files?
Your options is:
Install web server, as you said.
Use web server, as JohnP suggested.
Install php-cli, run your script from console, save output to html file and open it in a browser.
Actually, you can't normally "run" php files in browser. Browser can only send requests to server and display script's output.
There is a built in web server from php 5.4.
Before PHP 5.4 you must install a web server to execute php files in browser
Yes. You need something like nginx or Apache. Either install one of those (on say your local machine). OR, see JohnP's comment - a new feature released recently.
I installed a plugin for NB 7.0.1 which enabled CodeIgniter but when I went to create a project using it, I was told I need to specify a PHP interpreter for Netbeans. I tried to do this using the php.exe you get with Xampp but I get a Java null pointer error. I can't seem to fix this but I'm thinking, why do I need an interpreter on Windows when the Linux machine can do that? I have already set this up on the VM.
Any advice from here? Thanks a lot!
I am using NB 7.1.1 and had similar issue with CodeIgniter plugin when creating a new project. NetBeans would complain No PHP Interpreter was defined in Tools->Options->PHP General. It would not enable finish button so a New Project could not be setup.
I just created a dummy batch file called nb_cli.bat and pointed NB to that for the PHP interpreter. I don't plan on executing (or debugging) CodeIgniter CLI code on local machine so that file will likely never get executed.
If you want to debug or run php locally, make sure xammp works OK outside of NetBeans. But if not, this fix should get you by the NetBeans issues.
I have a separate linux server on my local network for development as I don't need apache/php locally when I use multiple machines for dev/testing/etc.
NetBeans should bugfix that by downing that PHP Interpreter message from an Alert preventing project setup to a warning that No PHP interpreter is defined (or found) so CLI testing may not function.
As an alternative, if you have a linux box with NB installed, you can create the New project there and copy the whole folder (including the nbproject folder) to your PC and you should be able to get by having No PHP Interpreter defined.
Hopefully that gets you going with NB and CodeIgniter. If you need additional details, just ask.
I am trying to schedule a PHP script to run on Windows by writing a batch file. Here is the line that runs the script:
C:\Program Files (x86)\PHP>php.exe -f D:\Web\Sites\scriptPage.php
This runs the page and the results of the page process fine but it is poping up this message
"The procedure entry point zend_ini_string_ex could not be located in the dynamic link library php5.dll"
I am not sure why this is happening. We are not using Zend at all on this. I have tried this on a few different pages and the same thing happens.
Any help on this would be great.
Thanks!
I had this problem when I installed xdebug under Apache and PHP.
In your php.ini find a line that looks like this:
zend_extension_ts="c:/PHP/ext/php_xdebug-2.1.2-5.2-vc6.dll"
and comment it out.
If you do need to use xdebug make sure you have downloaded the right version of xdebug
for your php installation. I had Apache 2.2.17 with PHP 5.2.17 and I was trying to install xdebug
for PHP 5.3 which gave me extactly this error message:
*The procedure entry point zend_ini_string_ex could not be located in the dynamic link library php5.dll*
I know it's been a while since this is solved but I run into problem with the same symptoms. I have Zend Server installed on a Windows server and was trying to configure scheduled task but it was not launching
the procedure entry point php_checkuid could not be located in the dynamic limk library php5.dll
Problem was that previously I had another PHP version (standalone, not with Zend Server) installed and in Windows Environment Variables PHPRC variable was pointing to that old version of PHP. I changed this variable so it pointed to Zend Srever's PHP and everything worked.
I had a standalone version of PHP installed and then installed Zend Server. Like Juris mentioned, the PHPRC variable was pointing to the stand alone php5.dll. I changed the path and all is good.
For future googlers: uncommenting the opcache enable and opcache_cli seemed to fix the problem for me.
That being said, I don't know what the error means