i have a website in php 5. I have downloaded all the files from the server and put all in my wamp (in a local system for changing some text). When i run localhost i got an error
**Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin#localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.**
I don't know PHP5.
Does any one know how to browse my site in local system.
Please help me
Thanks ina advance
Ok, by default, Wamp doesn't have url_rewrite enabled.
And your problem seems to be that of url_rewrite only.
Click on your Wamp Icon in the task bar, goto Apache -> modules -> scroll down to url_rewrite and click to enabled it.
This should solve your problem.
Check if "AllowOverride" instruction in main "httpd.conf" file allows you to use .htaccess files.
If not, make it "AllowOverride all" and restart your WampServer.
Related
I followed installation instruction for PHP, MySQL and PHPMyAdmin. But when I tried to access http://localhost/phpmyadmin/, I got this error:
"Not Found The requested URL /phpmyadmin/ was not found on this
server.".
Then I tried to access just the localhost, still I got same error.
How can i fix this problem?
I'm using windows 7 (if this problem has something to do with that)
1 sudo nano /etc/apache2/apache2.conf
2 search insert: "Include /etc/phpmyadmin/apache.conf" at the bottom of file.
and restart apache2
sudo /etc/init.d/apache2 restart
you just need to delete cookies from your browser
press (ctrl + shift + delete) then
time range to clear : Everything
check -> Cookies then clear now
done.
There really isn't enough information to be able to give you a reasonable answer.
First check that your Apache is running. Goto your start menu and type services.msc into the text field.
Fairly high towards the top of the screen you will see ApacheX.X
See what the status of the service is. Try double-clicking on the Apache service and pressing Start if the service isn't running. If it has troubles starting you will get a message telling you the service couldn't be started.
I was just having this problem and i've come across an easier solution:
left click on the wamp tray icon
apache>
apache modules>
check the 'rewrite module'
bingo!
I just finished installing xampp 1.8.2 on WinXP XP2 machine and got same error show up on my Firefox 24.0 browser:
xampp Not Found The requested URL /phpmyadmin/ was not found on this
server.
I solved this problem by changing the proxy of my firefox browser, go to menu tools-Option find tab Network, click button settings. Fill the text box below No Proxy for with localhost.
In my case then it looklike:
192.168.1.0/24, localhost
Then press Ok, then Ok again.
Try now typing localhost/xampp then it should show Welcome to XAMPP for Windows!
Note: to change proxy for other browser may differ, check your browser help about how to change proxy.
Hope this help.
Most likely it is the port conflict for apache server, by default is must be using port 80. You can goto apache configuration file, http.conf and change the port to a different one like: Listen 0.0.0.0:10021
This solved my issue.
If using wamp, you can right click on wamp -> apache -> Use port other than 80, give a port number. Restart all wamp services.
If you are not able to access localhost :
One possible reason might be is your apache server is not started. Go to start menu of your computer and search services, open it, find Apache, start the program.(Considering all the configuration of PHP and Apache has done correctly)
If you are not able to access localhost/phpmyadmin :
First of all, add phpmyadmin folder to your working directory. Download it from https://www.phpmyadmin.net and unzip it. Add the folder to your working directory and change the name to phpmyadmin. Now you can access localhost/phpmyadmin. You will see a login page of PhpMyAdmin application. If you are seeing file directories instead of the login page, then go to your apache server's httpd.conf(apache/conf/httpd.conf) file. Edit it and change the index.html of DirectoryIndex to index.php
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>
It also could be because you have changed the directory name, where the phpMyAdmin server sits. make sure the directory/folder name is correct and matches with the locations you used for Localhost to set up.
Also, make sure you have set up MySQL server.
I installed Apache and php on my local computer. Now i get the "It works!" message when i go to localhost in my browser and i can even see a sample .php info file. Yet i get a forbidden error when i attempt to browse to any other directory and any other php file throws an error. Below is my configuration file, any finger in the right direction is helpful.
http://implicitarts.com/httpd.txt
*was having issues with formatting.
In case anyone is interested, the issue seemed to be file permissions with files 'copied/dragged' into apaches server directory. I resolved my issue by disabling the UAC checks in windows 7.
I have a Windows 7 laptop. I downloaded PHP 5.2.8. I downloaded Apache 2.2.
I ran the MSI for PHP install, which i know is not recommended but I tried multiple times the normal route without success.
I have apache running and it shows "Running all apache services". When i did the install i set it up for "localhost".
I checked the CGI checkbox in my control panel.
I placed a simple file, test.php , in C:\inetpub\wwwroot ... but when the file is double-clicked, it tries to download the file instead of opening it as a webpage.
I've been googling this for a couple of hours and cant find a suitable fix. I have cleared my cache, and still no luck.
I also set apache to listen on port 8080 just to be certain nothing else was using port 80 before hand.
Any Ideas??
Thanks!
update -- i was missing the php5apache2.dll ... i placed this in the PHP directory but still the same results. i have also tried browsing to the file location through IE which didnt change anything either unfortunately.
update again, - - DOH! - - didnt realize it was localhost/test.php or what the answer below was. when i do that, i get a server error page.. which is better than before i guess :)
Server Error in Application "DEFAULT WEB SITE"
HTTP Error 500.0 - Internal Server Error
An unknown FastCGI error occured
Module FastCgiModule
Notification ExecuteRequestHandler
Handler PHP
Error Code 0x8007010b
Requested URL http://localhost:80/test.php
Physical Path C:\inetpub\wwwroot\test.php
Logon Method Anonymous
Logon User Anonymous
Most likely causes:
•IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
•IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
•IIS was not able to process configuration for the Web site or application.
•The authenticated user does not have permission to use this DLL.
•The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
when i try to start/run apache, it errors out. so when i run apache test configuration i get the following message:
httpd.exe: Syntax error on line 1 of C:/Apache/conf/httpd.conf: Cannot load C:/php/php5apache2_2.dll into server: The specified module could not be found.
However when i browse to that director, i do see that dll file there!! ugh...
ideas?
If you placed a file called test.php in C:\inetpub\wwwroot, then you would open your browser to http://localhost/test.php to try to execute the file.
The php5apache2.dll file needs to go in your module directory for apache, and you would need to add the appropriate apache config lines such as those below:
LoadModule php5_module "c:/path/to/php5apache2.dll"
AddHandler application/x-httpd-php .php
SetHandler application/x-httpd-php
After making those changes, you will need to restart apache.
Assuming you have PHP installed in Apache properly as mentioned in the other answers, it is possible the .php page is not sending the correct header. I have a .php file that emits a header with Content-Type: text/json, this is commonly used to provide a service for an Ajax client. The .php page should be sending Context-Type: text/html.
To determine if this is indeed the problem you can use wget with the -S option, or use developer tools in your browser. Take a look at this answer: Tool to view response headers
Double clicked? As in within explorer? If so, this won't open the page. You need to browse to the page. If you're within the directory listing for apache double clicking is not necessary.
As for setting up, if you're new your best bet is to use iis, easyphp, xampp, or some other variation
EasyPHP: http://www.easyphp.org/
Xampp: http://www.apachefriends.org/en/xampp.html
They'll get you running without the hassle
I get a 500 server error when I upload my CodeIgniter files online.
500 Server Error
A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again.
Locally, it works perfectly. I don't know what's wrong when I upload it.
I updated the config files and everything. What am I doing wrong?
CodeIgniter has a lot of files, so I don't know if there is something specific you want to see?
This is whats inside the .htaccess file
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
Check your hosting company to make sure they run PHP5 and not PHP4. I had this problem with 1and1.com where you had to change your .htaccess file to force the use of PHP5. That solved my problems.
I realized a bizarre issue. If your version of php is 5.4.3 on an ubuntu server (10.04) and you are using the mysqli extension, you would have problems. enable error reporting in your script to pinpoint the errors. This particular version does not support mysqli
We're building a new server and using IIS 7. PHP pages a served just fine and dandy, but the second we use any code to access a MySQL database, the page hangs for a good minute and serves the following error:
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Our database.php config file is configured correctly, so I can't figure out what might be doing this. MySQL seems to be properly installed as well.
Any ideas? Googling hasn't lead me anywhere useful.
Looks like your MySQL-Extension of PHP is not loaded correctly. Is it included in the php.ini? If so, please just take a look in the php_error.log. There should be an entry there. Please post it here
Rdp to your IIS web server
Right click on the folder where your site contents in and click on properties
go to security tab > advance > click on Edit > click on add > and enter domain users and click ok.
Now click on Edit and give full control or modify or read
Now select "Replace all existing inheritable permissions on all descendants with inheritable permission from this object
Click on apply, let it finish the process and click on Ok and ok.
This will fix the problem.
Change the memory_limit variable in you php.ini file. I had a similar problem where I was doing a very large select query.
On a development server the query would run fine, but on the live server it would throw a 500 error.
The difference turned out to be that my live server's memory_limit was set at "64M" whereas the dev server was "512M". I bumped the live server up to 512M and that resolved the problem.