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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php scripts unable to write to a file

Status
Not open for further replies.

SkyHigh

Technical User
May 30, 2002
309
CA
Hi

I have webpages using php whcih read from and write to files, it can read from files and display the info, but it cannot write to the files, I have issued chmod 777 *, change the ownership of the files to apache user, still does not work, here is a snipp from my httpd.conf file

------Snipp-------

# To use CGI scripts:
#
AddHandler cgi-script .cgi .pl
AddHandler php-script .php
AddHandler php-script .php3
AddHandler php-script .php4

#
# To use server-parsed HTML files
#
#AddType text/html .shtml
#AddHandler server-parsed .shtml

AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps

------Snipp-------

Your help is appreciated
Brenda
 
Are you getting an error message somewhere? ______________________________________________________________________
TANSTAAFL!
 
No errors at all in any of the logs.
I am running php 4.2.3, are there any issues related to this version of php or something
Thanks
Brenda
 
One thing... How is the php-script handler defined in your httpd.conf? //Daniel
 
------Snipp-------

# To use CGI scripts:
#
AddHandler cgi-script .cgi .pl
AddHandler php-script .php
AddHandler php-script .php3
AddHandler php-script .php4

------Snipp-------
Rgds
Brenda
 
No, I asked how the php-script handler is defined. Not how you use it, as I've already seen that. //Daniel
 
Sorry about that, but I am not sure what you are asking, can you please explain what and where you want me to check that - Thanks for your time
Rgds
Brenda
 
Last time I checked, the PHP module includes no php-handler.
Do you have a line similar to this in your httpd.conf?
Code:
Action php-handler ....
//Daniel
 
No Action php-handler in httpd.conf file
Brenda
 
Are you able to start Apache? Try typing httpd -k start at a console. Do you get any errors or does it start as it should? //Daniel
 
Hi

I am seeing the following error in the access_log file as whenever I try to add something which in turn the php tries to write to the data, this error appears:

-----------Error------------

10.1.2.124 - - [19/Sep/2002:10:37:31 -0400] "GET /pinboard/pin.css HTTP/1.1" 304 -
10.1.2.124 - - [19/Sep/2002:10:37:31 -0400] "GET /pinboard/images/logo.gif HTTP/1.1" 304 -

-----------Error------------

All the files are owned by the apache user in the DocumentRoot and I did chmod 777 on all the files for checking sake.


Can you please think of something
Tks
Brenda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top