How do I stop WANdisco Subversion conflicting with Apache24? - apache

EDIT:
I did find out a few key things:
In Windows 7, (Maybe other OS's?) There is a hosts file. That hosts file controls custom local URL addresses. You can define a custom name for a local host URL. For example: mywebserver.localhost. If you want your browser to serve local files from your computer with a custom URL name, you can set that in the hosts file. The hosts file is located in Drive:\Windows\System32\drivers\etc. If you don't have permissions to write to that file, you'll get an error message stating the the file isn't found, or something like that when you try to save the file.
Apache has a conf folder with a file in it named: httpd.conf. That controls the configuration directives for Apache.
If you want to link PHP to Apache, PHP has a PHP.ini file that needs to be configured.
END EDIT
I installed WANdisco Subversion, for Windows7 32bit (Link for reference)
Subversion - Version Control
and it installed with APACHE 2.2 in a sub-folder.
The only reason I install Subversion, was that a Google help page:
Install the Google Client Library for PHP
stated that it was required to download the source code needed for the Google API PHP Client Library.
Then I installed PHP and Apache 2.4 in their own folders, and configured the C:\Apache24\conf\httpd.conf file to point to a local webserver. (Along with some other configurations)
YouTube install Apache on Windows 7
The path in my operating system is:
C:\Program Files\WANdisco\Subversion\Apache2\bin;C:\Program
Files\WANdisco\Subversion;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:Python27;C:Python27\Scripts;C:\php
The localhost in my web browser will load an HTML file from the Apache set up in the Subversion Directory, but not from the C:\Apache24 directory.
How am I going to keep both Apache installations, and get the localhost to load HTML files from someplace other than the C:\Program Files\WANdisco\Subversion directory? I'm tempted to just delete the Apache folder from WANdisco\Subversion. Or just unistall the whole Subversion software. I'll probably never use it again.

Sounds to me like you don't need a server install of Subversion, but only the client.
I'd suggest uninstalling the version you have an installing the Client only download, which won't come with Apache httpd.

Related

How can I get access to my Symfony app on my server?

I cloned my Symfony app to my server and when I want to open the website I get the error:
Forbidden
You don't have permission to access this resource.
Apache Server at mywebsite.com Port 80
What does that mean?
I would check the owner of the files in terminal.
I would check vhost file, on my local Ubuntu the location is /etc/apache2/sites-available/
You could check if you didn't miss any important step from the webserver configuration documentation
Configuring a Web Server
like installing the apache Symfony pack or manually set an .htaccess
I had to link my domain to the public folder instead of the root folder
I'm gonna need more information about the system. Which symfony version do you have? Have you seen the loggers? Have you deployed the system on a docker container? Which version of PHP are you using? Maybe you are missing some dependencies.

Where can I find httpd.conf file for Apache on my windows?

I am trying to fix one venerability on my production web server(Apache), Venerability is "The HTTP headers sent by the remote web server disclose information that can aid an attacker, such as the server version and technologies used by the web server"
For this I have gone for some solutions , some where I found that to solve the above Venerability we need to edit the httpd.conf file on server but I did not find httpd.conf file in my entire system (using windows 10 os) can any one please let me know hot find that file or how to resolve that Venerability on production ?
You can find httpd.conf in
installed folder ex Apache24
Apache24/conf/httpd.conf
On Windows, I have seen people run Apache from all kinds of weird and wonderful places.
You need to track down where your Apache instance is running from, normally its running as a service on windows. If you open the properties on the service and look at the Path to executable, it should be something similar to the below.
"C:\Program Files\Apache24\bin\httpd.exe" -k runservice
Or it could be
"D:\Some Application\Version\WEB\tool\SOFTS\HTTPD\bin\httpd.exe" -k runservice
Unless there is an -f flag, setting the location of the conf. There will be a "conf" folder at the same level as the "bin" folder regardless of the path. This location is set at compile time so unless you have bespoke version off Apache this should be the location.
If you are struggling to find the service or a launcher that is running Apache. You can use WMI with a WQL query to look for processes which are called httpd.exe and get its executable path.
wmic process WHERE name="httpd.exe" GET ExecutablePath
In Xampp Control panel, in apache row, click on "config" button and then you see the term Apache(httpd.conf).

How can I run an index.html file on my localhost server?

I purchased a fancy little "visual menu maker" over at envato (Code Canyon) from here: https://codecanyon.net/item/z-menu-maker-drop-down-and-mega-menu/9240528
I was using their sample app where you can test out the tool and I was able to create a nice little menu for my site. But you have to purchase a license to export the code.
I purchased the license and the first "Getting Started" requirement is to "Start your Web Server and open the index.html file. This is where I'm lost. BTW... for reference, you can scroll to the bottom of that documentation page to see all the files that were included in the download.
When I try to open that "index.html" file in my browser, it doesn't load.
I followed some instructions to get my native Mac Apache server running, and everything seems to be working, with my localhost, but I don't know how to open this file through my Apache Web Server.
Any help would be so appreciated!!
I am assuming you have your Apache installed on your Mac under /etc/apache2 folder
If you want to serve your html files and related components, you need to tell apache from where to find your files
So , you need to configure apache so that it can server your files.
first you need to open an terminal from lunch menu then go to the apache2 installation directory
cd /etc/apache2
Then you need to open httpd.conf file and make necessary changes,
sudo nano /etc/apache2/httpd.conf
You will see "DocumentRoot" line/. Change it with your directory where you put your files.
Change also Directory path with yours. (It should be in same config file such as
with
<Document "some_path">
Then you should restart apache server with command
sudo apachectl restart
Now you can try to access your file . you can also check http://localhost to validate
You need to put the files somewhere within the DocumentRoot of your Apache web server, and then you should be able to visit them with http://localhost/ (assuming the index.html file is in the root of the DocumentRoot).
I'm not familiar with the default setting of DocumentRoot on the Mac port of Apache, but you should be able to find that quite easily in the configuration. On Linux that would commonly be found somewhere under /etc/apache2 or /etc/httpd.
There may be further configuration needed if the files expect some sort of server-side module to be activated (e.g. PHP), but it sounds like they are just plain HTML.
Some good answers were given but I think this particular app needed a few extra steps in order to work properly.
The developer got back to me and told me I'd need to install a MAMP solution in order to run the app.
So I installed that and then took the unzipped folder and all its contents in this folder /MAMP/htdocs/
Then when I visit http://localhost:8888/ZMenuMaker/ the app runs without a hitch!

Zend server CE - Will not load .php file rather downloads it

I installed Zend Server CE on Windows 8. When I try to load a .php file in my browser it does not load but downloads the php file instead.
My root for the server is C:\Program Files (x86)\Zend\Apache2\htdocs\
I looked everywhere on the web but there is no documentation.
I would recommend against having your document root in program files because of all the security. Reinstall it outside of program files and it might/will probably work.
How do you invoke the file? You cannot use the full windows path there ie: c:\Zend\apache2\etc.. But probably localhost/yourfile.php or 127.0.0.1/yourfile.php. Can you open zend's interface at localhost:100081?
If you get a internal server error well then it serves php files. Now enable errors in php.ini and find out what is wrong probably some path. You are getting a php error and they are set to not display so you get the server error. That does mean php files are parsed by apache and not downloaded. This question here on so has pretty much what you need to configure.
Just remembered you had the zend-framework tag so you could check in application.ini for error handling settings.

Apache doesn't load PHP MySQL extension but IIS does

I have a really irritating problem with PHP on Windows Server 2008 R2. IIS and Apache are running on the same machine (Apache is embedded with another product and it being there is not my choice).
IIS is configured to be able to use multiple versions of PHP, and none of the PHP versions on there were installed with the Windows installer (so php.exe does not exist in the path).
Apache uses one particular version of PHP (5.2.5 Thread-safe - again I can't change this as a 3rd-party application has PHP extensions compiled against this version).
If I check phpinfo() in my Apache site it doesn't have an entry for MySQL, even though php_mysql.dll is enabled in php.ini and it exists in the \ext directory. If I (temporarily) add this version of PHP (same directory, same php.ini) to IIS and set up a test site with phpinfo() it correctly lists MySQL. I know this is not just some strange issue with phpinfo because I have a MySQL-based PHP site running in Apache and it fails with Call to undefined function mysql_connect()
It was suggested that I copy libmysql.dll from the PHP directory to C:\Windows\System32 but this made no difference. As there are multiple versions of PHP on the server I suppose it's possible that the wrong version of libmysql.dll is being loaded, but the PATH doesn't include any directories containing libmysql.dll.
IIS and Apache are looking at exactly the same PHP installation, php.ini, and ext directory, but only IIS can load the MySQL extension. Apache is on the default System account as it looks like System has access to all the DLLs.
The Apache logs say nothing about any DLLs failing to load. I'm logging PHP errors in the event log but nothing is reported about those extensions.
After Googling around the issue I found other suddenly-occurring issues in PHP on Windows server but the usual resolutions - rebuilding php.ini, restarting IIS, restarting the server - haven't helped.
Any suggestions on where to look next are much appreciated!
I know this might not ultimately answer your question but, did you try configuring Apache to execute PHP through FastCGI (mod_fcgid) and use the same binary as IIS does ?
I know you are using mod_php, but calling it via FastCGI will abstract PHP from the webserver process. If extensions are loading fine under PHP called via FastCGI, there is no reason it won't work on a different web server.
Also, I personally beleive that it is a better idea this way since PHP is only called when a *.php file is requested. This way, Apache will not load PHP in memory for every request, which will give you better performance for serving static files, for example.
Update
To do this, you need to download mod_fcgid from http://httpd.apache.org/mod_fcgid/, load the module in your Apache configuration this way,
LoadModule fcgid_module modules/mod_fcgid.so
And then, just specify what binary you want to call when PHP pages are requested:
AddHandler fcgid-script .php
FcgidWrapper "c:/php/php-cgi.exe" .php
Then, files with a .php extension will now be executed by the PHP FastCGI wrapper. Just be sure to specify the same php-cgi.exe binary as IIS is using.
All extensions that were previously available in IIS should now be available in Apache since the PHP installation behind is the same in both environment.
Keep me updated.
1.- check php.ini path in phpinfo.
2.- add php folder to the windows path
http://www.computerhope.com/issues/ch000549.htm
3.- add directive PHPINIDir to apache conf
http://php.net/manual/en/install.windows.apache2.php
4.- uncomment mysql extension in respective php.ini
5.- reload apache
6.- check mysql extension in phpinfo
and please don't copy any files to system32
You will generally need different library dlls for the different versions of PHP you are running. It's best to keep these in their own directories.
There's a few different things that could cause a module not to load, including the PHP version whether you're running a thread-safe or not-thread-safe version and also if the binaries were compiled as VC6 or VC9 †. Usually the easiest way to debug if you're getting any module loading errors is running php.exe from the command line as it will spit out any startup errors (also ensure these are enabled in your php.ini and you're loading the correct php.ini file when you do so).
† IIRC VC6/VC9 is to do with which version of Visual Studio PHP was compiled with.
Ultimately this issue came down to a missing PATH reference. Although IIS doesn't seem to require PHP or PHP modules to exist in the path it seems that Apache (or perhaps my version of PHP?) does. I am lucky in that I only need to run one version of PHP outside IIS, as I have no idea what would happen if I had multiple Apache instances referencing different versions of PHP and multiple PHP directories in the path - presumably one would always fail.
So far it looks like adding Apache's version of PHP to the path hasn't affected the IIS versions of PHP, but I will swear loudly if it suddenly does.