Does anyone know how I can find the httpd.conf file because I may have accidentally changed some things inside and i can't Ctrl+z because I opened it in notepad file instead of notepad++. i would reinstall the whole wampserver but I have tons of data and files to take the risk. I just need the original file of httpd.conf of Apache 2.4.9. I couldn't find it online.
Use a program such as 7-zip to extract all the files from the wamp installer. Go find the httpd.conf file and copy it over. Also you could just install it temporarily on another windows computer to retrieve the file.
It's good practice to always make a backup of conf files before modifying them, they are specific to your release of apache and the environment it's meant to be used in.
Related
I updated my laptop from Mojave to Catalina last night, and this morning I realised that I had lost all my Apache vhosts, my vhost file was replaced with the default file.
I had all my vhosts in /usr/local/etc/httpd/extra/httpd-vhosts.conf
I would like to know which is the right way to do this (store my vhosts), so I (hopefully) won't lost my vhosts in a future update.
Thanks!!
P.D. I'm using "native" Apache, not Homebrew.
Catalina moved the root directory files as part of the upgrade. See https://apple.stackexchange.com/questions/371852/where-does-the-upgrade-to-macos-catalina-move-root-directory-files
From the answer: This took me a long time to figure out, but any file that was formerly at, e.g., /my-cool-directory was moved to /Users/Shared/Relocated Items/Security/my-cool-directory.
You might try checking in your /Users/Shared/Relocated Items/Security folder for your original Apache files.
It depends on what you do include in your httpd.conf file.
You can try use a custom created vhosts file eg. Include /private/etc/apache2/extra/mycustom-httpd-vhosts.conf next time.
After the last catalina update my custom files where not moved out of their places.
I had the same issue with updating to catalina. All my changes were gone.
By default the httpd.conf includes config files in the other directory:
Include /private/etc/apache2/other/*.conf
I place my vhosts and userdir configs in this directory now. It looks like it works just fine. Another custom file I had in there was not touched by the update.
Using a .user.ini file with extension=geoip.so (or mysqli.so) I'm trying unsuccessfully to load the relevant module: in the phpinfo() page of Php 7.1 (or even Php5.4) the module is never shown.
1) The .user.ini file is working correctly because I'm able to modify the variable memory_limit.
2) The phpinfo() function correctly shows the extension_dir folder containing .so extensions that I want to load (in the php.ini file this variable is not present, however).
3) The php error log contains no message.
Every suggestion is welcome.
The .user.ini files can only set certain PHP ini settings. It just so happens that the extension setting is not one of them. In fact, according to the manual, the extension setting is only valid in the core php.ini file. So put the extension=geoip.so in your main php.ini file.
As a side note: I use Ubuntu/Debian for most of what I do with PHP. The standard PHP distro that is available through the Debian package archives has extra code compiled into it that allows for a distributed configuration. The way this works is the SAPI module scans a conf.d directory and includes any ini files. Typically when you package an external PHP extension for Debian (which I might add is a pain - I've done it for my own extensions) you include a little ini file that includes the extension (e.g. extension=myext.so). The package installs it in the distributed config directory and it is included into the php.ini file when PHP spins up. Perhaps you meant to install a Debian-based config like this?
Another side note: Since you are probably using a CGI SAPI and might want different sites to load different modules (exclusively), you could perhaps look into getting the Web server to point the CGI PHP at a different php.ini file. I'm just presuming you want to achieve something like this. However loading modules for certain directories using .user.ini files is just not possible.
Try disable or configure selinux. Check selinux audit log.
I don't know is this site a good place to ask this question... A long time ago, my operating system was linux. On linux I made a file with name \/:*?"<>|. Then I installed windows instead of linux, but now I cannot access or delete this file. I tried to delete it using Unlocker, ProceXP, Command Prompt and many other programs, but I couldn't. Also, I tried all commands in Command Prompt which can be used for deleting undeletable files, but this file is still here. If I try to rename it, process explorer.exe crashes. Then I installed linux again and this file become accessable.
Now I have windows and another file with name \/:*?"<>|. Is it possible to access this file without installing linux? Is there a way to access place on filesystem where this file name is stored and manualy change it to any acceptable file name? If yes, can you explain which program is best for it?
Try using DeleteDoctor. I've used it under similar situations as yours with great success. You can download a copy here:
http://www.download25.com/delete-doctor-download.html
So, on my local machine I tweaked my
/usr/(local/)share/mime/packages/freedesktop.org.xml,
to make a few additional file extensions be detected as PHP.
<glob pattern="*.inc"/>
<glob pattern="*.module"/>
<glob pattern="*.install"/>
(this is for Drupal files)
nautilus uses this information to open the file in gedit.
gedit uses this information to enable the correct PHP syntax colors.
Now, I want the same for files opened via ssh.
I know this used to work in the past, but I don't remember what exactly I changed.
Whatever I did back then, it was probably wiped with the 11.10 Oneiric Ocelot upgrade.
What I want,
open an ssh folder in nautilus
double-click a file named "something.module"
have it open in gedit, with the correct PHP syntax colors enabled.
There are different things you might want to check.
1) Edit /usr/(local/)share/mime/packages/freedesktop.org.xml
Search for "php", and the section with <glob>. Add your own extensions there, as explained in the question above.
2) Run sudo update-mime-database /usr/share/mime
You might have to do this after you changed the settings as in (1).
3) Edit /usr/share/gtksourceview-3.0/language-specs/php.lang (path may vary)
Look for <property name="globs">, and add your custom extensions.
(see http://live.gnome.org/Gedit/FAQ#How_to_set_the_default_highlight_mode_for_new_files.3F)
4) Restart gedit.
Probably enough to just close and re-open the tab where you wanted to edit, but if that doesn't help, close and re-open all gedit windows.
I want to create a .htaccess file in a specific directory. I'm using Notepad++ and their plug-in for FTP (NppFTP). I'm able to create any other files and see them in the folder but when I try to create a .htaccess I don't see that file in the directory. I get no errors, it is like nothing happened.
I tried to create this file using an FTP program and it showed the file and right away it disappeared. My guess it is because this is a special file used by the system and prefixed by a (.)
What is a way to edit that file?
This is probably because your ".htaccess" file is a hidden file and your system is set up to no display hidden files.
Have a look in your Notepad++ settings if there's an option to make hidden files visible/unhide.
In addition to that check the windows folder options for that option!
switch on showing hidden files in your ftp client