Im running USBWebserver v8.6 on a USB drive on a windows 10 machine, I need to update PHP to run Mautic and it requires PHP version 5.6.19 while my USB server has PHP Version 5.4.17. I tried to download windows version and extract it to the PHP folder on the drive and did a restart on the web server but that did not work.
I don't know how to update the PHP please help.
Did you change the httpd.conf file in the Settings folder?
Almost at the end of that file there are these lines:
# For PHP 5 do something like this:
LoadModule php5_module "{path}/php/php5apache2_4.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# configure the path to php.ini
PHPIniDir "{path}/php"
Change these values according the PHP installation you want. Let me know if this works for you. I got this information from the documentation on how to install PHP.
Related
I need to be able to run a different version of PHP for all code under a specific directory. This is Apache 2.4 running on a Windows system.
In my conf I currently have
LoadModule php7_module "c:/php/php7apache2_4.dll"
as well as
AddType application/x-httpd-php .php
What I am looking for is
https://domain/ = PHP 7.3
https://domain/oldstuff = PHP 5.6
I found a page that said its as easy as adding a line to your .htaccess but I am not sure where I would define which version is which.
AddHandler application/x-httpd-php56 .php
Most of the examples I have found are for cgi or for linux and don't seem like they would help
I've been trying to get PHP working locally on my machine in Fedora 26.
I have httpd installed, and that seems to be working. When I first had it set up, typing localhost in my browser showed me the HTML contents /var/www/html/index.html, but not the PHP contents. <?php phpinfo(); ?> was not working, either.
I think PHP is also working, since php -r "phpinfo();" works in the command line.
I tried following the advice in this thread by adding AddType application/x-httpd-php .php to my httpd.conf file, and this made my browser try to download the PHP files instead of displaying them. Weirdly, when I took this line back out and restarted httpd, my browser is still trying to download the files.
First of all add php AddType to to httpd.conf file:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
And then load php module in apache configuration based on your php version that installed on your machine and you wanted to use:
LoadModule php7_module modules/libphp7.0.so
I have installed Apache, added
LoadModule php5_module c:/php/php5apache2_4.dll
AddHandler application/x-httpd-php .php
PHPIniDir "c:\php"
to httpd file, set up php.ini file (im using thread safe 5.5.10 x64 version), but when im trying to run apache im getting message "the requested operation has failed".
Try this:
Use forward slashes
Enclose the path to the dll in quotes
Double check the paths and directory names
LoadModule php5_module "C:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:/php"
As user ChrisForrence suggested i was attempting to run incompatible versions of apache and php. Finally, i was able to find detailed tutorial on youtube here https://www.youtube.com/watch?v=17qhikHv5hY which taught me ho to install apache and php (there's another movie by same user about latter).
I am using Apache 2.2.3 server on RHEL5. In my system, php is installed (PHP 5.1.6). I placed a simple php script
<?php
phpinfo();
?>
in my /var/www. However, when I start my server (it starts fine) and go to the php page, it does not show anything. My local machine has ubuntu installed, where I can see the file properly.
Following the information provided here (http://dan.drydog.com/apache2php.html), I did following things:
Added following lines to /etc/httpd/conf/httpd.conf
LoadModule php5_module modules/libphp5.so
AddHandler php5-script .php
AddType text/html .php
AddType application/x-httpd-php-source phps
restarted httpd,
service httpd restart
But I still don't see any results. What am I doing wrong?
I run a Windows 7 x64 machine with apache 2.2 and PHP 5.2.17
Whenever I try to add the PHP dll to the httpd.conf file, apache will not start.
this is how it is being put into httpd.conf
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
I have successfully managed to setup and run a Apache server with PHP before, so I'm not new to this, but I'm fairly certain that this is right.
If everything that's being output on launch is the DNS error, Apache is launching just fine. FQDN resolution is a warning, not an error.