Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

CSS, Problems

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

CSS, Problems

Postby blanKer » Sat Jul 05, 2003 6:42 am

Hi everyone,

When I have the error bellow, what does it mean and how do I solve it?

Warning: fopen(/home/tovenden/public_html/loja/stylesheet.css) [function.fopen]: failed to create stream: Permission denied in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 24

Warning: fwrite(): supplied argument is not a valid stream resource in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 31

Warning: fclose(): supplied argument is not a valid stream resource in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 33
Background #D8E7D8

Warning: fopen(/home/tovenden/public_html/loja/stylesheet.css) [function.fopen]: failed to create stream: Permission denied in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 24

Warning: fwrite(): supplied argument is not a valid stream resource in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 31

Warning: fclose(): supplied argument is not a valid stream resource in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 33
Cabeçalho #FFFFFF

Warning: fopen(/home/tovenden/public_html/loja/stylesheet.css) [function.fopen]: failed to create stream: Permission denied in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 24

Warning: fwrite(): supplied argument is not a valid stream resource in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 31

Warning: fclose(): supplied argument is not a valid stream resource in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 33
Barra Superior de Navegação #7CA47C

Warning: fopen(/home/tovenden/public_html/loja/stylesheet.css) [function.fopen]: failed to create stream: Permission denied in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 24

Warning: fwrite(): supplied argument is not a valid stream resource in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 31

Warning: fclose(): supplied argument is not a valid stream resource in /home/tovenden/public_html/loja/admin/includes/functions/general.php on line 33
Barra Inferior de Navegação #7CA47C

the list goes on....

TIA for the help,

BlanKer
Last edited by blanKer on Sat Jul 05, 2003 7:44 am, edited 1 time in total.
blanKer
New php-forum User
New php-forum User
 
Posts: 4
Joined: Sat Jul 05, 2003 6:36 am

Postby liquedus » Sat Jul 05, 2003 6:59 am

how is this a CSS problem :?:
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Postby blanKer » Sat Jul 05, 2003 7:20 am

Hi liquedus,

Since I'm a newbie to this PHP thing I thought this was the best topic and it is a php coding problem but it is affecting my module to update the colours (css.stylesheet) on my site.

thanks
blanKer
New php-forum User
New php-forum User
 
Posts: 4
Joined: Sat Jul 05, 2003 6:36 am

Postby swirlee » Sat Jul 05, 2003 1:58 pm

First off, in the future, it will be advantageous for you to post both the code that generated the error and the error generated.

This appears to be a permissions problem, hence the "[function.fopen]: failed to create stream: Permission denied". The fopen() function has a required $mode argument which says what you want to do with the file. See the docs for an explanation of all of the modes. I'd guess, since I can't see your code, that you're using trying to use mode 'w' or 'r+', but PHP doesn't have permission to modify the file in question. Since it doesn't have permission, it can't create the read/write stream, which causes all of the subsequent errors.

How to fix this depends upon your platform. In all cases, you'll have to modify the file attributes so that PHP can write to the file. In Windows, you'll have to find the file and turn off the "Read-only" attribute. On a Unix-like system, you're going to have to either use the chmod command to change the permissions of the file, or if you're accessing the server via FTP, you may also be able to do this via your FTP client (look for a dialog called Attributes, Properties, or Permissions or refer to your client's Help file). I'll leave the details of this up to you.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby blanKer » Sat Jul 05, 2003 4:49 pm

Hi swirlee,

First of all thanks for the help, I figured that it had something to do with permission but my problem derive from not knowing exactly wich files to chamod to. I do have the script running on my Host it is all fine except for this administrator module. The sistem is based on oscommerce an altered version that showed up overhere in Brazil. I~ll keep working on it until I can solve the problem.

regards,
BlanKer
blanKer
New php-forum User
New php-forum User
 
Posts: 4
Joined: Sat Jul 05, 2003 6:36 am

Postby swirlee » Sat Jul 05, 2003 10:18 pm

The files you want to chmod are the ones you're trying to access with fopen(). So if you're trying to do fopen('file.css','r+'), you want to make sure PHP has write permission for file.css. I hope that's helpful.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby blanKer » Sun Jul 06, 2003 8:41 am

Hi swirlee,

swirlee wrote:The files you want to chmod are the ones you're trying to access with fopen(). ----> I hope that's helpful.


I changed according to your instruction and everything worked just fine thank you very much.

BlanKer
blanKer
New php-forum User
New php-forum User
 
Posts: 4
Joined: Sat Jul 05, 2003 6:36 am


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.