Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP not being executed on most virtual hosts

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
I thought about posting this in the Apache forum, but I think it's more suitable here? We'll see.

I installed phpMyAdmin and it is working fine from one vhost. But my other vhosts are not executing php.

In Apache, my virtual hosts are all set up the same way (same directives, proper servernames, etc)

Any ideas?

Thanks.
 
There may be two causes for this oddity between servers...

1) the server may be set to run PHP as a CGI call - this requires a path to be placed at the top of each PHP script.

2) are you sure PHP is not working? The global variables ini configuration for PHP may be throwing you off. See if a plain page with:

<?php
phpinfo();
?>

produces anything. If it does and your own PHP pages do not work, it may be a problem with the way variables are passed from page to page.
 
I tried that too. No go.

PHP is working... I have phpMyAdmin running.
 
Hi mate,

By any chance do you have anything next to the following line within your php.ini file?

doc_root =

If so and if it is the path to the virtual host that works, then this is your problem.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
I'm on Red Hat Linux 8...

My DocumentRoots are good, so are my DirectoryIndex directives.
 
Ahoy,

The problem was in the php.ini file...

Using &quot;<?&quot; instead of &quot;<?php&quot; was turned off (by default).

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top