Jump to content


Photo

RH8.0/Apache not parsing SOME php... (Samba?)


  • Please log in to reply
4 replies to this topic

#1 jmilk

jmilk
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 24 February 2003 - 08:00 PM

Ok, this is from a complete Unix Newbie (me):

- Downloaded and installed RH8.0 using their apache/mysql/php packages
- Got mysql to work with php using mysql-php rpm
- downloaded and installed phpMyAdmin, configured and got it working
- got samba working

Then I set up virtual hosts like so:

NameVirtualHost 192.168.254.150
<VirtualHost 192.168.254.150>
DocumentRoot \"/home/default/public_html/mysql\"
ServerName mysql.local
</VirtualHost>
# Virtual host dev
<VirtualHost 192.168.254.150>
DocumentRoot \"/home/dev/public_html\"
ServerName dev.local
</VirtualHost>
<VirtualHost _default_:*>
DocumentRoot \"/home/default/public_html\"
</VirtualHost>

and

<Directory \"/home/dev/public_html\">
Options Indexes Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

and just to be safe:

<Directory \"/home/dev\">
Options Indexes Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

------------------

After adding the 192.168.254.150 to another machine\'s hosts file, I get this behavior:

http://192.168.254.150
Expect: Apache success or file not found
Get: phpMyAdmin

http://mysql.local
Expect: phpMyAdmin
Get: phpMyAdmin

http://dev.local
Expect: my test-site
Get: SOURCE of index.php, NOT PARSED.

I moved the files to the server using samba, and when i copy phpMyAdmin\'s index.php into /home/dev/public_html, it seems to be parsed.

What do I need to do to Samba (?) or Apache (?) to get those .php files to parse properly?

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 24 February 2003 - 09:47 PM

i\'m always shaky about using prepackaged things :shock: does your apache have the AddType application... and LoadModule... lines for php?
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 jmilk

jmilk
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 24 February 2003 - 11:38 PM

Yes, the addtype and all that is fine, because phpMyAdmin works fine.

What I was saying is this:
-- If I use my site (which has been working and receiving 30+ K hits per day for a month, and upload it to my personal server via samba, it doesn\'t work.
-- If I replace the samba-uploaded index.php with mysql\'s index.php, it gets parsed.
-- If I then replace mysql\'s index.php with my own index.php using samba, all I get back is the SOURCE of the php, but not the parsed result.

I already have done the chown/chmod stuff, and I\'m pretty confident that it\'s an issue with samba. Anyone know a quick way (or place to learn) to set up ftp on RH8?

#4 jmilk

jmilk
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 25 February 2003 - 03:02 AM

Well, here was the culprit:

all of my files only had the <? tag at the beginning, not the <?php tag. Apparently, that works on my webhost, but not locally. What do I need to do to change that?

#5 jmilk

jmilk
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 25 February 2003 - 06:30 AM

Never mind, fixed it. Short tags turned on in php.ini




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users