Results 1 to 10 of 20
I am trying to set up an apache server w/ PHP & MySQL. All programs were installed by Fedora 1 during installation.
Currently httpd starts on boot along with MySOL. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-24-2005 #1Just Joined!
- Join Date
- Feb 2004
- Location
- I'd rather be in Hawaii
- Posts
- 52
PHP shows blank pages
I am trying to set up an apache server w/ PHP & MySQL. All programs were installed by Fedora 1 during installation.
Currently httpd starts on boot along with MySOL. I have created a phpinfo() page in /var/www/, and have done the chmod 777 so that I can access it. However, the php test file continues to show a blank page in a web browser.
From everything I have researched it's a server configuration error. I tried to load the module in the httpd.conf file. I tried to add the 'loadmodule php-*' to the file, but apparently it is being loaded from an outside file as I get a "module has already been loaded" error. I have copied the php.ini file to /usr/local/lib as suggested, but to no avail.
Does anyone have any other suggestions? Any help would be appreciated.
- 05-24-2005 #2Just Joined!
- Join Date
- Feb 2005
- Location
- Lomm - Netherlands
- Posts
- 80
If you have created a file, let's say testphp.php with the line <? phpinfo() ?>
and placed it in your /var/www/html/ directory, and your chmod 777 didn't work,
try to set the GroupID to apache with RWX and try again.
Be careful te use the write and execute for everyone on php files.
BTW: php.ini is placed in your /etc/
- 05-24-2005 #3Just Joined!
- Join Date
- Feb 2004
- Location
- I'd rather be in Hawaii
- Posts
- 52
Thanks, but that didn't work.
When I run
#service httpd status
I get
And when I runCode:httpd (pid 5974 5973 5972 5971 5970 5969 5968 5965 5910) is running...
#service httpd fullstatus
I get
Does this mean the server is runnign or is it not found?Code:Not Found The requested URL /server-status was not found on this server. ---------------------------------------------------------------------- Apache/2.0.47 (Fedora) Server at localhost Port 80
If I type $php phptest.php I get the proper HTML output that I can cut and paste into a text editor, save, and then view with a browser. When I try to view the php page in a browser and view the source I can see the php source, which from what I can tell means the page is not being sent to the server for processing. I know php is working, how do I get the server to recognize the file?
- 05-25-2005 #4Just Joined!
- Join Date
- Feb 2005
- Location
- Lomm - Netherlands
- Posts
- 80
Did you also put in the httpd.conf the following lines so apache knows what to do with this type of file?
and restart apache afterwardsAddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
- 05-25-2005 #5Just Joined!
- Join Date
- Feb 2004
- Location
- I'd rather be in Hawaii
- Posts
- 52
For some reason Fedora put a php.conf file in the /etc/httpd/conf.d/
These statements are located in this file, and if they are put into the httpd.conf file, I get
Code:[warn] module php4_module is already loaded, skipping
- 05-25-2005 #6Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
If you're getting this then Apache is supporting PHP. What do you get in the Apache logs when you try to run your page?
Originally Posted by SwimminSasquatch
- 05-25-2005 #7Just Joined!
- Join Date
- Feb 2004
- Location
- I'd rather be in Hawaii
- Posts
- 52
The logs in /etc/httpd/logs contain the following, but the time stamps seem to indicate boot time or server restart times, not actual page access times.
/etc/httpd/logs/access_log
/etc/httpd/logs/error_logCode:127.0.0.1 - - [24/May/2005:18:59:29 -0400] "GET /server-status HTTP/1.1" 404 324 "http://localhost:80/server-status" "ELinks (0.4.2; Linux; )"
/etc/httpd/logs/ssl_error_logCode:[Wed May 25 07:14:00 2005] [warn] child process 8740 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8741 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8742 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8743 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8744 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8745 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8746 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8747 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8741 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8742 still did not exit, sending a SIGTERM [Wed May 25 07:14:00 2005] [warn] child process 8745 still did not exit, sending a SIGTERM [Wed May 25 07:14:01 2005] [notice] caught SIGTERM, shutting down [Wed May 25 07:14:06 2005] [warn] module php4_module is already loaded, skipping [Wed May 25 07:14:06 2005] [notice] Digest: generating secret for digest authentication ... [Wed May 25 07:14:06 2005] [notice] Digest: done [Wed May 25 07:14:07 2005] [notice] Apache/2.0.47 (Fedora) configured -- resuming normal operations
every other log is empty.Code:[Wed May 25 07:14:06 2005] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!? [Wed May 25 07:14:07 2005] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
I don't remember changing the file name, but just in case I may have inadvertantly done so, how do I rename the server, and ensure all the places have the same server name? I tried with the "Start->System->Http" Graphical settings, and put in "localhost" as my server name, but that did not work.
- 05-26-2005 #8Just Joined!
- Join Date
- Feb 2005
- Location
- Lomm - Netherlands
- Posts
- 80
you can change the servername in:
redhat -> system settings -> network
tab hosts
be sure to check the configs of your services for the changed hostname/servername.
have you tried to access apache through the loopback (127.0.0.1)?
- 05-26-2005 #9Just Joined!
- Join Date
- Feb 2004
- Location
- I'd rather be in Hawaii
- Posts
- 52
How do I do that?have you tried to access apache through the loopback (127.0.0.1)?
- 05-26-2005 #10Just Joined!
- Join Date
- Feb 2005
- Location
- Lomm - Netherlands
- Posts
- 80
put http://127.0.0.1 in your browsers adress bar
or if it fails, the IP adres of your computer
ps Do normal html pages in apache apear correct?
else mail me your httpd.conf. I'll check it for you
bikerepairman at gmail dot com



