This topic is locked

Error on add new record

7/4/2010 2:42:36 AM
PHPRunner General questions
J
jianwong author

I'm customising the Classified ads template that came with phprunner v5.2 for a project. What happened was when new ads added, it returned with php error:

"fwrite(): supplied argument is not a valid stream resource"
Anyone had encountered issue similar to this and got a fix for it? Or any advice to address the issue?
What I did was I added new fields to existing tables for Ads and Users.

romaldus 7/4/2010



I'm customising the Classified ads template that came with phprunner v5.2 for a project. What happened was when new ads added, it returned with php error:

"fwrite(): supplied argument is not a valid stream resource"
Anyone had encountered issue similar to this and got a fix for it? Or any advice to address the issue?
What I did was I added new fields to existing tables for Ads and Users.



You need to CHMOD your directory to have the appropriate permissions

J
jianwong author 7/4/2010



You need to CHMOD your directory to have the appropriate permissions



Thanks for your advice.

I tried CHMOD directory to 775 as well as 777 from 755 at remote server. Unfortunately, the application failed to load as internal server error. Did I do the right thing?

romaldus 7/4/2010



Thanks for your advice.

I tried CHMOD directory to 775 as well as 777 from 755 at remote server. Unfortunately, the application failed to load as internal server error. Did I do the right thing?



Please check your .htaccess file in the public_html directory. Just try to rename the .htaccess file to htaccess.txt and reload your browser.

J
jianwong author 7/5/2010



Please check your .htaccess file in the public_html directory. Just try to rename the .htaccess file to htaccess.txt and reload your browser.



I renamed the file as advised, however, it won't help and upon refresh of server a new .htaccess file created by itself.

A
ann 7/5/2010

Jian,
this error usually means that there are no read/write permissions to the directory where uploaded files are saved.

Please make sure you've set up correct permissions to the directory with files.

J
jianwong author 7/5/2010



Jian,
this error usually means that there are no read/write permissions to the directory where uploaded files are saved.

Please make sure you've set up correct permissions to the directory with files.



Hi Ann
Thanks for the pointer. The issue is resolved now.
The problem was the image file not being stored to the folder as set on Save. To resolve it, in image Properties in Editor, on 'Edit as' I un-checked the Absolute path option. Keyed in 'files' as name of Upload folder.
Once again, thanks for the trouble.