Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Gerald on March 12, 2001, 02:35:45 AM

Title: Apache DSO and PHP4
Post by: Gerald on March 12, 2001, 02:35:45 AM
I am about to develop several web sites on a e-smith server. I intend to use PHP4, and mysql for counters, simple forms and tables. I know that php and mysql are a part of the standard install. However, it appears that apache is not compiled to support DSOs and I am not sure that PHP4 is installed. Does anyone know what versions are options are in 4.1.1? TIA
Title: Re: Apache DSO and PHP4
Post by: Dan Brown on March 12, 2001, 03:55:31 AM
Your understanding is incorrect; Apache on e-smith (all versions) supports DSOs, and e-smith 4.1x installs PHP as a DSO.  It uses PHP 4.0.3pl1.
Title: Re: Apache DSO and PHP4
Post by: Gerald on March 12, 2001, 04:47:34 AM
Thanks, you made my day, now to get it to recognize my extensions. I am putting in a simple print statement and getting no response. I have a trial version of PHP-Nuke up and running so I know php is working, just haven't been able to get it to respond to any  code I put into a new ibay.
Title: Re: Apache DSO and PHP4
Post by: Charlie Brady on March 12, 2001, 04:56:33 AM
Gerald wrote:
>
> I know php is working, just haven't been able
> to get it to respond to any  code I put into a new ibay.

Is you file called somthing.php?

Charlie
Title: Re: Apache DSO and PHP4
Post by: Gerald on March 12, 2001, 07:14:48 AM
Yes,  it is quite simply index.php
 then
     print "this is a test";
?>
The file is in /home/e-smith/files/primary/html

When I attempt to run it I get:
Warning: Failed opening '/home/e-smith/files/primary/html/index.php' for inclusion (include_path='.:/usr/share/php') in Unknown on line 0
 
I assume it is looking for a path statement but don't see a requirement for one in the manual I am using.
Title: Re: Apache DSO and PHP4
Post by: Dan Brown on March 12, 2001, 07:46:50 AM
This is almost certainly a permissions problem--what are the permissions on index.php, and who is the owner?  The file needs to be readable by www; it should probably be owned by admin.shared, and permissions should be (at least) 640.
Title: Re: Apache DSO and PHP4
Post by: Gerald on March 12, 2001, 07:56:59 AM
I am logged in as administrator and have done a chmod of 666 to the php files.
Title: Re: Apache DSO and PHP4
Post by: Gerald on March 12, 2001, 08:00:07 AM
did a chmod 777 on the directory and now the error message changes as follows:
Parse error: parse error in /home/e-smith/files/primary/html/index.php on line 5
Title: Re: Apache DSO and PHP4
Post by: Dan Brown on March 12, 2001, 08:12:34 AM
Well, that's easy--PHP thinks there's an error in your syntax.  I don't know why, because what you posted looks OK to me, but it does.  Try running this as the only line in index.php:

Title: Re: Apache DSO and PHP4
Post by: Gerald on March 12, 2001, 08:27:59 AM
same error

Parse error: parse error in /home/e-smith/files/primary/html/index.php on line 5
Title: Re: Apache DSO and PHP4
Post by: Dan Brown on March 12, 2001, 08:32:30 AM
This can't be right.  index.php is just one line, right?  How is there a parse error in line 5?  This is really a PHP problem, not an e-smith issue, but this doesn't make sense to me.  Maybe you should try deleting this file and making a new one; something might be corrupted in the file (and yes, I'm grasping at straws here).
Title: Re: Apache DSO and PHP4
Post by: Gerald on March 12, 2001, 08:36:46 AM
deleting and building an new file did the trick. Thanks.
Title: Re: Apache DSO and PHP4
Post by: Noah on March 12, 2001, 09:33:49 PM
Gerald wrote:
>
> Yes,  it is quite simply index.php
>  then
>     --^--

If that's exactly what appears in the file, then the problem is the space between the ? and PHP.  Delete "PHP" and it should work fine.

Noah
Title: Re: Apache DSO and PHP4
Post by: Gerald on March 13, 2001, 04:28:05 AM
thanks, that was part of the problem, now I continue it have parse error when I attempt to use a "else" statemtent. I can take php code that tests out fine in a windows environment then crashes on the e-smith. Any ideas would be welcome.