Skip navigation.
Home
Now Shipping Version 7.0

XAMPP can't recognize php


Posts: 4

I have Mepislite installed. Seems to be working fine. I also installed XAMPP. That installed and started just fine. The status shows php and mysql activated. I did the security fixes. I ran some of their demos. Thay woked okay.

I put a little html and php script in my own user public_html directory. Then I went to another computer on my home network. Using IE, I surfed the little script. It came back with a page built from just the html code. The php tags were ignored.

Any ideas about what's wrong? It's like apache is not passing the script to php. But I can't believe XAMPP would set it up that way. They didn't say anything about the need to configure apache.

Thank you.

PS: I didn't install libapache2-mod-php5. Could that be the problem?

Did you get this working yet?

Did you get this all working yet?

I've got XAMPP installed now on a PC for testing a web based application for a forum I'm a moderator/administrator for now.

It's working nicely on my home network. But, I installed mine under XP Pro (XAMPP installs services for Apache, PHP, MySQL, etc.).

I should switch to the Linux version, instead. I like the software (atlhough the MySQL parameters used made it pretty slow by default). I had problems trying to install and configure LAMP under Linux (mostly the configure part, due to my inexperience I'm sure), and XAMPP let me get up and running fast. I just grabbed the Windows version so that I didn't need to repartition for yet another Linux distro (although I prefer Linux to Windows). lol

The XAMPP Control Panel lets you start and stop services, etc. (and I think it probably works the same way in both Linux and Windows versions, since a quick google search shows a Linux based control panel that's very similar to their Windows panel).

Are you sure PHP is started in the XAMPP control panel (separate applicaton included under the "Apache Friends" menu by default, and it's not browser based)?

Jim C.

Xampp and surfing on home network...

Thank you for getting back to me, Jim.

Apache and php are running just fine on my Mepis box. If I sit at that machine, I can bring up pages with plenty of php. But what I thought I could do is surf from other windows computers on my home ms network. Maybe I have to set up my home network as an intranet. Not sure how to do that.

Maybe it's fine for me to just develop sitting at that machine.

I couldn't see any Apache Friends menu on my machine. Or any control pannel. I just start and stop it from the command line.

Peter Klein

Sorry, I don't know enough

Sorry, I don't know enough about it to help you.

It's probably a simple network config issue of some kind if PHP is working OK on your local install.

Perhaps some of the other MEPIS users here may know what to look for to fix it.

Jim C.

Xampp

firemaker wrote:

Apache and php are running just fine on my Mepis box. If I sit at that machine, I can bring up pages with plenty of php. But what I thought I could do is surf from other windows computers on my home ms network. Maybe I have to set up my home network as an intranet. Not sure how to do that.

Maybe it's fine for me to just develop sitting at that machine.

I couldn't see any Apache Friends menu on my machine. Or any control pannel. I just start and stop it from the command line.

Peter Klein

Not sure if this will help, but I can confirm that you should be able to see your test site on your network.

I have Xampp set up so that I can access my test site on my development machine with:

http://localhost/Test1/

I can now go to another machine (which happens to be Windoze, but that's not relevant) on the network and access the same home page with:

http://192.168.1.91/Test1/

Obviously 192.168.1.91 happens to be the IP address of the development machine on my network. (It's Debian Etch, but that should make no difference).

I'm not sure what your problem might be, but I hope it helps to know that what you are trying for does indeed work.

I guess I would be checking your test machine for firewalls; can you ping your test machine from your other machine, etc.

I'm not sure what you mean with your comment re "intranet" vs network.

John

Jon Du Quesne's picture

You Need An Entry In Your /etc/hosts File

If you have a simple home network, and you do not use DHCP to assign IP addresses to each of your boxes (i.e. each box always has the same IP address), then you can make an entry in each system's /etc/hosts file.

If you check your current Mepis box, and "cat /etc/hosts" you will see an entry like this:

127.0.0.1  localhost

So if you wanted 192.168.1.91 to ALWAYS be mylampbox, the entry would be:

192.168.1.91  mylampbox  lamp  othernames

Then, in your browser you would enter http://mylampbox/test1/ and it should find it. The other names on the same line are "aliases" that allow you to reference to box by multiple names.

Also, if you do not use static IPs, this technique will not work. In that case, you need to consider setting up a local DNS system.

One other thing, on the Windows box, your hosts file will be in C:\WINDOWS\system32\drivers\etc\hosts. And WINDOWS might be WINNT. Edit the file with NOTEPAD.

Jon

The ability to comfortably use a computer is directly proportional to desire to listen, learn, and experiment, and is inversely proportional to the fear, anger, and stubbornness that you show.

network question

Jon Du Quesne wrote:
If you have a simple home network, and you do not use DHCP to assign IP addresses to each of your boxes (i.e. each box always has the same IP address), then you can make an entry in each system's /etc/hosts file.

If you check your current Mepis box, and "cat /etc/hosts" you will see an entry like this:

127.0.0.1  localhost

So if you wanted 192.168.1.91 to ALWAYS be mylampbox, the entry would be:

192.168.1.91  mylampbox  lamp  othernames

Then, in your browser you would enter http://mylampbox/test1/ and it should find it. The other names on the same line are "aliases" that allow you to reference to box by multiple names.

Also, if you do not use static IPs, this technique will not work. In that case, you need to consider setting up a local DNS system.

One other thing, on the Windows box, your hosts file will be in C:\WINDOWS\system32\drivers\etc\hosts. And WINDOWS might be WINNT. Edit the file with NOTEPAD.

Jon

You might have been replying to the wrong posting. I actually do use host names in the manner you describe, but if faced with the original problem, I think (respectfully) that your advice adds another layer of complexity.

I think a better approach would be to go to the mepislite (development) machine, and do ifconfig to get its IP.

Then go to the other machine and ping that IP.

If you can't get that to work, adding hostnames just buries the problem even deeper, do you agree?

Anyway, my post was simply to assure the original questioner that what he wants DOES work, because he sounded like he was having doubts about it.

We'll just have to wait for more details if he needs more help, I think.

John

It's fixed...

Thank you, John. That was the problem. I got into my Mepis machine and mucked around with the firewall. It works now.

Peter Klein

At least I hope it works...

Well, at least it works now. I use DHCP, so it may not work next time I boot up. In that case I'll have to do as Jon suggested.

Peter Klein

Jon Du Quesne's picture

Firewall and Pinging

Yes, if you modified the firewall to accept a ping from other systems, that would help.

Congratulations on getting to say "hello" Smiling

Jon

The ability to comfortably use a computer is directly proportional to desire to listen, learn, and experiment, and is inversely proportional to the fear, anger, and stubbornness that you show.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.