I am setting up a PHP login using Apache on my computer. I created a login form named login.php and I can access it.I also created a file named auth.php and when the login forum sends me to it (with some arguments at the end) my apache server says 404 not found and does not login.But curl 127.0.0.1/auth.php works and and gives a blank output while curl 127.0.0.1/auth.php&lwv=110 doesn't.
Running Apache 2.4.7 on elementary OS (based on Ubuntu)
Instead of 127.0.0.1/auth.php&lwv=110 change to 127.0.0.1/auth.php?lwv=110
Or localhost/auth.php?lwv=110
Related
I am using wamp and am creating a uLogin PHP Authentication Library(http://ulogin.sourceforge.net/). I have access to phpmyadmin, the local host seems to work, phpinfo() runs, everything on there seems to be working.
The problem is the c:/wamp/www/ulogin is giving me a forbidden 403 in the console. The error log for apache(2.4.9) is giving me AH01797: client denied by server configuration: My windows event log is giving me: an attempt was made to query the existence of a blank password for an account.
Is this a prblem with the wamp set up in apache or in the mysql setup; or both? I have run other php programs via www; this is the first time I ran into this problem.
I have researched this extensively and found a lot of the same answer, but it was for older versions of the program. Also, while developing on the localhost I can allow to all, I would prefer just to set it up as if the website was live.
Steps to check what's wrong:
1) Check your apache config: Check Directory-entries for your target directory and above. Look out for Order and Allow from (or Require for 2.4+)
2) Check whether there are any .htaccess files in your target directory or above. Again, look out for Allow / Deny and Require.
3) Check if the 403 is emitted by apache or your application: Add some debug message at the very top of your application logic (commonly some sort of index.php).
I copied a wordpress installation into my html-folder on my server var/www/html, but it does not show up in my browser afterwards, instead it shows a apache test-page which is located in var/www/error.
If I copy a file named index.html into html-folder, it indeed shows up when I visit my website. To test PHP i have created a index.php on /var/www/html/test/ now once i go to mydomainname/test/index.php then it shows only PHP soruce code. Apache and PHP are installed on my CentOS, also restarted apache after that. Can you help?
After extensive search, double checking install, reinstalling, troubleshooting, I don't know where to turn next.
Background:
I'm trying to get a wiki working using MediaWiki.
I have PHP Manager installed for IIS 7.
I have a MySQL server installed on the same machine.
PHP version is 5.6.5 and installed at C:\PHP.
The main issue:
Locally I can view the index.php file, but not externally.
I get a generic page can't be displayed error if linking to the /w/ directory.
Depending on the browser I'll get two results when linking to w/index.php:
page can't be displayed
IIS 404.0 Error.
Depending on the browser I'll get two results linking to w/index.php?title=Main_Page;
IIS 404.0 Error
unformatted page content
The error:
Module: IIS Web Core
Notification: MapRequestHandler
Handler: StaticFile
Error Code: 0x80070002
Requested URL: http://localhost:80/w/index.php?title=Main_Page
Physical Path: C:\inetpub\wwwroot\w\index.php
Logon Method: Anonymous
Logon User: Anonymous
Troubleshooting done:
No errors shown by PHP Manager.
Switched PHP versions (no effect).
Externally tested other PHP forms running inside HTML (works fine).
Checked permissions on all folders (fine).
Edited Feature Permissions under Handler Mappings to allow executable (no change).
Changed PHP_via_FastCGI's access restriction to execute (no change).
Checked to make sure PHP Handling Mapping was set to *.php (it is).
Checked Default Document settings and index.php. Externally tested index.html in w/ (works both by direct link to file and link to folder).
Externally tried tested /w/index.html with PHP "Hello World" inside it (blank page).
What am I doing wrong? Everything works perfectly fine run locally on the server.
As Christpher says, localhost is a wrong in an URL to be contacted from outside: if that's what you see, you forgot to set $wgServer correctly.
I've installed Laravel 4 on Cloud9 (www.c9.io) and I can access a view directly like so:
https://laravel-test-c9-anthonyhull.c9.io/tasks/app/views/hello.php (which displays a "you've arrived" message)
However, if I try to view:
https://laravel-test-c9-anthonyhull.c9.io/tasks/public
I just see a blank page.
I have ensured the following:
MCrypt is installed
app/storage permissions have been given write access
I've tried running php artisan serve
Not sure what else to try.
Ideally what I'm after is to get:
to automatically show the default page of my "tasks" app.
Looks like I just had to visit laravel-test-c9-anthonyhull.c9.io/tasks/public directly rather than with the built in Cloud9 IDE browser.
I think the issue is your web server assumingly apache and it's mod_rewrite module which must be installer and enabled. If you do this now, remember to reboot your server, then you also need to change the conf files of apache to allowoverrides and reboot.
I installed wordpress on my local machine (backtrack) for experimenting. After I got everything setup I moved it to an Ubuntu Server so that everybody can access those pages at work. I followed the same instructions, I moved the wordpress folder into /var/www but I created a new database with the same username, password and hostname.
The problem is whenever I access the webpage #ubuntu it tries to download the file, if access the page #backtrack it goes to the dashboard and everything is fine.
I did not have an .htaccess file on either machine sop I created one just to see if it will fix the problem but it did not.
Apache works fine because I can get to some folders I have setup by going to
"http://ubuntuserver/folder name"
and the logs shows no errors because it is delivering the webpage to the client just fine but the client is downloading it instead.
Any Ideas why this is happening??
Sounds like you haven't installed the PHP module for Apache or enabled it to use PHP using AddType in the Apache config file.
It seems that your WebServer ( Apache here, i suppose ) is not configured to use PHP module and/or is missing some PHP configuration options.
See here for some basic configuration tutorial.