DokuWiki Installation on Windows server 2003 using IIS problems - php

I am trying to install DokuWiki on a windows 2003 server and using IIS 7.2 and PHP 5. I have gone on to IIS and created a virtual directory that points to where I extracted DokuWiki, I have set up all the permissions for that folder ensuring that it has rwx on all folders and sub folders. The virtual directory has rwx permissions enabled. The first problem I had was that php reported a missing file which was PassHash.class.php which I just created the blank file but before I added that file the logs reported
[20-May-2015 10:36:51] PHP Warning: require_once(C:\dokuwiki/inc/PassHash.class.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\dokuwiki\install.php on line 12
[20-May-2015 10:36:51] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'C:\dokuwiki/inc/PassHash.class.php' (include_path='.;C:\php5\pear') in C:\dokuwiki\install.php on line 12
But once I added the blank file it displays this:
I am aware that it is a permissions issue but I don't know how to add the permissions to those directories or even where they are located. Also did anyone else have to create that blank file ? seems a little odd to me. Any help appreciated.
Regards,
Luke

Browse to the dokuwiki/ directory and Check the properties of the data/ folder. Ensure that the Internet Guest Account(IUSR), the appropriate web server account or Server Group(IIS_IUSRS) has Folder level “Write” permissions to the data/ folder.
Browse to the dokuwiki/ directory and Check the properties of the conf/ folder. Ensure that the Internet Guest Account(IUSR), the appropriate web server account or Server Group(IIS_IUSRS) has Folder level “Write” permissions to the conf/ folder.
In IIS Manager left click the site name
Click “Edit Permissions” in the Actions pane OR right click and choose “Edit Permissions” from the shortcut menu.
Click the Security tab
Click the Edit button
Click the Add button
Click the Locations button and choose the local server name
Now type in IUSR and click OK, and OK again.
After this, install.php should work.

Related

Symlinks w/ Xampp Error

I currently use Xampp on Windows for a local web development. In my web root, I have symlinks to each of my projects like so:
http://i.stack.imgur.com/GW9Yt.png
When the symlink is followed via explorer, it opens up the correct folder and location however, when loaded via Apache in my browser (localhost/project) I receive this error:
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:/xampp/htdocs/project/index.php' (include_path='.;C:\xampp\php\PEAR') in Unknown on line 0
The file index.php is located inside the directory the symlink is directed at.
I believe this is a permission error however I cannot seem to discover what might be causing this as I have individually checked the permissions of each folder, file, etc and can't seem to find the issue.
Something I have noticed is that files located in folders located inside folders inside the symlink, e.g. link/style/file.txt will load however those in the root directory of the symlink do not.
Even I faced the same problem while installing magento on XAMPP & Windows-7. This clearly solved my problem.
Stop the apache and mysql
Exit XAMPP
Click on start button and search for XAMPP
Right click on "XAMPP Control Panel" and "Run as administrator"
Now you start apache and mysql
Your symlinks should start working now

Error Uploading images in drupal

I was trying to upload a custom logo to my drupal site which runs on IIS 8 with PHP.
I got the following upload error :
" Warning: move_uploaded_file(temporary://logo.png): failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in drupal_move_uploaded_file() (line 1642 of C:\inetpub\wwwroot\drupalfull\includes\file.inc).
Warning: move_uploaded_file(): Unable to move 'C:\Windows\Temp\php25C3.tmp' to 'temporary://logo.png' in drupal_move_uploaded_file() (line 1642 of C:\inetpub\wwwroot\drupalfull\includes\file.inc).
File upload error. Could not move uploaded file."
Please help me. I have set both read and write permissions on IIS but still it does not work.
Create sites/default/files/tmp folder and give full permissions (777) and change 'Temporary directory' at admin/config/media/file-system.
I think it fixes yout problem.
Regards.
If you are running ISS8 (web server) then the file path is different then the default for Unix.
Make sure you have the temporary folder setup correctly on your settings in Drupal and the folder has write permissions.
You can follow this article at step 5 and 6.
Create the folder:
Drupal uses the Sites\Default\Files directory to store temporary files and therefore must be able to write and modify files in this folder.
Create the folder:
C:\inetpub\wwwroot\Drupal>md sites\default\files
http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/install-drupal-on-iis
Your problem is most likely the permission problem inside drupal. Since you are using windows system, you need to make sure the folder sites/default/files have writable permission for the IIS server. Config the permission to be writable for all user and see if it is working and then limit the permission step by step until you feel comfortable.
I'm going to put another answer in here because I guarantee I'm going to forget how I fixed it!
Basically, on Windows, the default upload folder for PHP is C:\Windows\Temp. As part of the Drupal upload, it moves files from the PHP upload folder to the Drupal Temporary//: folder. There is an issue however in PHP whereby the PHP executable needs read permission to the full path to the uploaded files, so C:\Windows\Temp. If this is not given, it will error out and the file will not be moved.
Details are at http://php.net/manual/en/function.realpath.php which is a function call made deep in Drupal's upload file code.
My fix was to create a folder elsewhere, say C:\PHPTemp, and modify PHP's settings (session.save_path and upload_tmp_dir) to point to this folder instead. After giving IIS_IUSRS full control (overkill? probably!), I was then able to upload images!

wamp + wordpress: failed to open stream: Permission denied in

I have WAMP and WordPress installed. I am trying to install a new theme. After copying it to the themes folder, when entering the themes admin panel to activate the theme I get the error:
Warning: fopen(C:\wamp\www/wp-content/themes/enfold/style.css): failed to open stream: Permission denied in C:\wamp\www\wp-includes\functions.php on line 3666
It looks like that:
And below that the page continues to render.
Have no clue why this is happening.
In my case the theme folder (and the files in it) was read only and it was also encrypted.
Right click on the folder-->Properties , make sure Read-only is not selected, then click Advanced button, make sure "Encrypt contents to secure data" in not selected, hit OK and then OK again, "Apply changes to this folder, subfolders and files". That should do it:)
Check your file/folder permissions for wp-content and the theme you uploaded.
See Changing File Permissions « WordPress Codex
Typically, all files should be owned by your user (ftp) account on
your web server, and should be writable by that account. On shared
hosts, files should never be owned by the webserver process itself
(sometimes this is www, or apache, or nobody user).
Any file that needs write access from WordPress should be owned or
group-owned by the user account used by the WordPress (which may be
different than the server account). For example, you may have a user
account that lets you FTP files back and forth to your server, but
your server itself may run using a separate user, in a separate
usergroup, such as dhapache or nobody. If WordPress is running as the
FTP account, that account needs to have write access, i.e., be the
owner of the files, or belong to a group that has write access. In the
latter case, that would mean permissions are set more permissively
than default (for example, 775 rather than 755 for folders, and 664
instead of 644).
To get WordPress and WAMP to automatically set permissions for a new theme, use the Admin area of WordPress to upload and install the theme. See Appearance>>Themes>>Use the Add New button.

Apache Won't Display PHP File In Website Directory

I'm building a webpage which has a page allowing users to log in, called login.php. This page is located in the same root directory as my index.html page. When I open up index.html and go to click on the login link, I get this error message:
Fatal error: Unknown: Failed opening required '/websites/testsite.com/www/login.php' (include_path='.:/usr/share/pear') in Unknown on line 0
I have no idea why this isn't working because my index page (and every other page that I have made thus far) links to that same login.php page, which exists in the same directory. Any advise?
If it helps, I'm running Arch Linux with Apache HTTPD 2.2 and PHP 5.3.8. Thank you!
EDIT:
I forgot to mention some extra information. Since I'm working on this website with another person, we each have "local" copies of this website in our user directories. (I say local, but it's really our user directories on the same server which is hosting the public version of this website). Apache is set up to allow user directories (http://thisismytestwebsite.com/~myusername), which is how we view our "local" copies. When I go to click on the login link, the page loads up fine. Everything that we have is backed up using Git, and everything that we have is synchronized properly (we just checked).
Check if the file you're trying to open exists, and that the path is an absolute path.
It's fairly easy to generate a relative path from one file to another:
dirname(__FILE__) . "/../include.php";
Will include the file 'include.php' from one folder up from where the current file is.
__FILE__ is a magic PHP constant, use it!
Probably the apache process is blocked from reading the index.php file due to file system permissions.
Try to adjust permissions (chmod) and ownership (chown) of the file according to your working index.html

Setting permissions in Fedora Apache/PHP

I am building a Fedora server (on VirtualBox right now). It is running Fedora 15.
I want my PHP script to be able to edit the contents of a file in the same folder it is in.
The PHP script and the file are in /home/user/public_html/
But, when I call "file_put_contents("./theFile.txt")" I get an error saying that it cannot open the stream, permission denied.
So, I have:
- Made the file permissions 0777.
- Made the folder permissions 0777.
- Added the "apache" user to the group "wheel".
- Changed the user folder permissions to 0771.
- Changed the owner of the public_html folder and the text file to "apache:apache".
I am at my wits end and I have idea what to do next. Suggestions?
SELinux is preventing you from writing out the file. See the httpd_selinux(8) man page for ways to work with/around it.

Categories