PHP problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP problem

Postby EviluS » 08. February 2009 18:17

Hello
Yesterday I installed XAMPP because I had problems with installing Apache MySQL and PHP one by one. So I decided to try XAMPP. Very good program :). But my problem appeared when I tried to test the PHP. I made a simple .php file with one echo" some text "; line on notepad. And when i opened http://127.0.0.1/phptest.php it opens a blank page and the php content doesn't shows only the html elemnts. Also when I opened ..../xampp/htdocs/index.php with my browser the page says: "Something is wrong with the XAMPP installation : -( ".
If someone can halp please help.
Thanks alot
Georgi Petrov
EviluS
 
Posts: 2
Joined: 08. February 2009 14:25

Re: PHP problem

Postby Izzy » 08. February 2009 23:29

EviluS wrote:Hello
Yesterday I installed XAMPP because I had problems with installing Apache MySQL and PHP one by one...

...Also when I opened ..../xampp/htdocs/index.php with my browser the page says: "Something is wrong with the XAMPP installation : -( ".
Search for all php.ini files on your PC and delete or rename any you find except the php.ini file in the xampp\apache\bin folder, then restart apache and try again to see your page.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: PHP problem

Postby EviluS » 09. February 2009 15:32

Thanks alot Izzy
EviluS
 
Posts: 2
Joined: 08. February 2009 14:25

Re: PHP problem

Postby kingsteph » 12. February 2009 22:18

Hi, I think I have a similar problem.

Is it possible to open a php file with a browse using C:/xampp/htdocs/index.php instead of https://localhost/index.php ? When I open the former I get 'Something is wrong with the XAMPP installation :-(' and when I open the later I get the xampp welcome page at http://localhost/xampp/

I want to be able use the program coffee cup to make my webpage. Any suggestions?

Thanks a lot,
Steph-o
kingsteph
 
Posts: 3
Joined: 12. February 2009 22:06

Re: PHP problem

Postby Izzy » 12. February 2009 22:44

kingsteph wrote:Is it possible to open a php file with a browse using C:/xampp/htdocs/index.php instead of https://localhost/index.php ?
Not possible, as php coded files must be parsed by the server using an http:// or https:// address in your browser.

kingsteph wrote:and when I open the later I get the xampp welcome page at http://localhost/xampp/
That is what is supposed to happen - you are redirected to the index.php file in the xampp folder.


XAMPP is only a web server suite and should not have any influence on the CoffeeCup editor.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: PHP problem

Postby kingsteph » 12. February 2009 22:54

Thanks for responding so quickly!
In coffeecup I have to open files with a path... C:/xampp/htdocs/index.php
or I can import from the web which will open https://localhost/index.php but in this case php doesn't work because the code is imported and therefore not parsed. Maybe I can't use coffeecup... but it says that it supports php...
kingsteph
 
Posts: 3
Joined: 12. February 2009 22:06

Re: PHP problem

Postby Izzy » 12. February 2009 23:20

PHP is supported in the form of a text editing facility directly within CC but can't parse the php which requires a web server and so it requires you to upload your files to a configured web server.

So you edit your php files in CC then save them to your htdocs folder where your web site would be then simply load http://localhost/website/CCeditedfile.php for testing via XAMPP - messy but a workaround.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: PHP problem

Postby kingsteph » 12. February 2009 23:38

Many thanks for the clarification Izzy.
kingsteph
 
Posts: 3
Joined: 12. February 2009 22:06

Re: PHP problem

Postby rushiat » 13. February 2009 14:25

I have a similar problem. I've been running xampp from a memory stick for 6 months. I had not used it for about 8 weeks and suddenly needed it. I start it with xampp-control.exe, then click start Apache in the GUI. It runs for a second or 2 then stops. I run setup xampp.bat to check there wasn't a problem with the drive letter (I've set it to K:) but that was OK. Finally disabled old installation and downloaded new one with the same result. Then I found this in a previous post "Search for all php.ini files on your PC and delete or rename any you find except the php.ini file in the xampp\apache\bin folder" and did that but it didn't work.
Wonder if anyone has any ideas.
Rushiat
rushiat
 
Posts: 3
Joined: 13. February 2009 13:34

Re: PHP problem

Postby Izzy » 13. February 2009 21:43

rushiat wrote:...I run setup xampp.bat to check
This from the * QUICK INSTALLATION instructions in the readme_en.txt file in the xampp folder
readme_en.txt file wrote:Please do not use the "setup_xampp.bat" for an USB stick installation!


rushiat wrote:I start it with xampp-control.exe, then click start Apache in the GUI. It runs for a second or 2 then stops.
Run apache_start.bat file to see the error message why Apache can't start.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: PHP problem

Postby rushiat » 13. February 2009 22:13

Thanks Izzy for your reply. I did as you said and got this message

Diese Eingabeforderung nicht waehrend des Runnings beenden …
Zum stoppen bitte die xampp_stop benutzen!
Please do not close this window while running ….
Use the xampp_stop for shutdown!

Please wait [Bitte warten] <OS 10048>Only one useage of each socket address <pro
tocol/network address/port> is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs


### APACHE + MYSQL IS STARTING NOW ###

I tried opening Localhost on my browser but get a blank page;presumable it hasn't started in spite of what it says on the last line.
rushiat
 
Posts: 3
Joined: 13. February 2009 13:34

Re: PHP problem

Postby Izzy » 13. February 2009 22:30

You have something else running on the XAMPP ports.

Run xampp-portcheck.exe and see what is using the ports that XAMPP requires exclusively.

Paste back what you find please.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: PHP problem

Postby rushiat » 13. February 2009 22:35

I figured it out. I had Skype running which uses port 80. Turn Skype off and voila
Thanks Izzy again and keep up the good fight
Kevin.
rushiat
 
Posts: 3
Joined: 13. February 2009 13:34

Re: PHP problem

Postby Izzy » 13. February 2009 22:40

Kevin, your most welcome.


No need to disable Skype just change the ports that it uses.

Skype uses ports 80 and 443 by default.

You can alter that behavior by going to:
Tools\Options\Connection

Untick
Use port 80 and 443 as alternative for incoming connections

You will have to decide a different port to use for incoming connections before Skype lets you save your changes.

Use ports between 49152 through 65535.
http://www.iana.org/assignments/port-numbers


Now you should be able to enjoy the best of both worlds. ;)
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests