LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   PHP Question (https://www.linuxquestions.org/questions/linux-newbie-8/php-question-137566/)

duerra 01-22-2004 04:01 PM

PHP Question
 
I have installed the swaret package for Apache and PHP just for testing, but for some reason, in the actual scripts, the page cuts out where the php script starts, and nothing more is displayed.

However, on the test page, <?php phpinfo(); ?> displays all the PHP information. This is quite odd, and I'm wondering why. There are no errors in the scripts.

Anybody have any ideas what's going on?

Snodge 01-22-2004 04:32 PM

I think that you will have a php.ini file installed - in it there should be something like:

error_reporting = E_ALL & ~E_NOTICE

The php.ini file itself should have inside it the different options you can pass for logging.

Alternatively, you could have a look at:

http://uk.php.net/manual/en/function...-reporting.php

which tells you how to set it in the script itself :)

duerra 01-22-2004 05:19 PM

Once again, there are no errors in the PHP script.

Error reporting is turned on, error logging is turned on, and errors are set to E_ALL. I use these scripts all the time, and this is a configuration issue somewhere between the Apache 1 install and the new PHP install. I am hoping that somebody here can help me figure out what's going on. The second I turn on Apache 2 instead, everything works. I even use the exact same php.ini file for both Apache 1 and Apache 2.

<?php phpinfo(); ?> in the test page works, but *no other scripting, anywhere, on any page, is parsed*. The page simply stops loading where the scripting starts.

Any more ideas?

duerra 01-22-2004 05:26 PM

Oh, may I also note, I am getting these warnings, but I am not physically loading these modules anywhere else in the httpd.conf:

[Thu Jan 22 17:28:14 2004] [warn] module mod_php4.c is already added, skipping
[Thu Jan 22 17:28:14 2004] [warn] module mod_ssl.c is already added, skipping

I don't know what that's all about.

Snodge 01-22-2004 05:47 PM

Do the Apache error logs give you any clue?

If you view the source from your user agent, does it show the php code at all?

It seems like the php module hasn't been loaded for apache...

DevlshOne 01-22-2004 06:05 PM

Quote:

Originally posted by duerra
[Thu Jan 22 17:28:14 2004] [warn] module mod_php4.c is already added, skipping
[Thu Jan 22 17:28:14 2004] [warn] module mod_ssl.c is already added, skipping

These are no big deal. What versions of PHP and Apache are you using and on what distro? All these errors are telling you is that the php and ssl modules are being loaded twice.

On to your other problem: What is the HTML result if you do a "View Source"? Swaret claims to need quite a few supporting modules loaded up, do you have them all?

Code:

Software you need to use swaret:
- You need Slackware Linux 8.1 or Higher or Current.
- You need slackware/a/pkgtools.
- You need slackware/a/bash.
- You need slackware/n/wget and/or slackware/n/rsync.
- You need other tools like:
  >> slackware/a/gawk
  >> slackware/a/sed
  >> slackware/a/man
  >> slackware/a/grep
  >> slackware/a/procps
  >> slackware/a/coreutils or fileutils or textutils
  >> slackware/a/util-linux
  >> slackware/a/gzip
  >> slackware/a/bzip2
  >> slackware/ap/bc
  >> slackware/l/glibc


duerra 01-22-2004 06:37 PM

The PHP module *is* loading, else phpinfo() wouldn't work.
On the other pages, there is no source... the page simply stops parsing where the PHP scripting begins.

The HTML loads up until the point of the scripting, and then everything ceases (including other HTML output later on that is not encased in scripting).

I have all the requirements of swaret (it won't allow you to use it if you don't).


All times are GMT -5. The time now is 08:26 PM.