Forum Moderators: coopster

Message Too Old, No Replies

site errors with php.

php errors on site that was fine

         

randelld

11:57 am on Mar 3, 2008 (gmt 0)

10+ Year Member



Hi all,
I hope I am posting this in the correct forum. I have been running a site for the last three years using a very bad host. They tend to change things without notice or technical assistance afterwards.

My site is static but I have a property listing section that is php and mysql. I also use an include statement to add my footer and header.
I also use an include statement to add a little news ticker on the left column.
Sometime last week these three ares of my site have been displaying errors and breaking the site.
I have been trying very hard to get information out of my host but you just wouldn't believe the replies I get.
Not being a coder, I am now absolutely lost as to what I can do.
Here are some examples of the errors displayed
**************************************
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.
**********************************
Warning: session_start() [function.session-start]: open(/tmp/sess_unddukbmcpamobobabh826m746, O_RDWR) failed: No space left on device (28)
************************************
Warning: Unknown: open(/tmp/sess_unddukbmcpamobobabh826m746, O_RDWR) failed: No space left on device (28) in Unknown on line 0
******************************************
I do not have access to php.ini as I am on a shared host.

Can any of you guys left me a helping hand to correct this please.

Thank you very much

[edited by: coopster at 1:53 pm (utc) on Mar. 3, 2008]
[edit reason] no personal urls please TOS [webmasterworld.com] [/edit]

coopster

2:03 pm on Mar 3, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, randelld.

You are receiving warning errors which, on a LIVE server, is bad practice. First, it confuses your user. Second, they offer more information for potential hacking attempts. All errors should be going to your logs instead of being displayed to the public. Turn error_reporting [php.net] down.

As far as the errors themselves the first one is an easy fix. You can modify the .ini setting as the recovery steps indicate, but you are better off to find the errors in your code and make the necessary modifications to be rid of them entirely.

The second error message is a bit more disturbing as it seems to be indicating that you have run out of room to use your sessions in the root /tmp directory, which in my experience is also bad practice. At the very least, I would use your own "tmp" directory in your own directory to set and store session data. /tmp is accessible by anybody on your server so they could be reading your session data.

randelld

2:17 pm on Mar 3, 2008 (gmt 0)

10+ Year Member



Blimey, That all sounds a bit worrying. I am in the process of leaving this host because of so many issues.
Can I rectify these issues without having access to the server?

Thank you very much for your help.

coopster

2:21 pm on Mar 3, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Sure, and you must have access to the server, you put the php files over there didn't you? ;)

Have a look at the link I provided on error_reporting and take care of that issue first. Turn off errors so you won't be splashing them out in the browser. Then run your software locally so you can find and fix the errors. Hopefully you have a local test box setup, right?

randelld

3:50 pm on Mar 3, 2008 (gmt 0)

10+ Year Member



What I meant qas that I didn't have access to the php configuration, etc.
Ok, using your link I have managed to create myself an error.php which has turned off error display and changed it to log the errors. Can you give me some tips on how I can get the scripts working again.
Cheers

coopster

4:12 pm on Mar 3, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I'm not entirely certain what you mean by that but I will assume for now you are referring to the sessions? I would change the default session_save_path [php.net] to somewhere in your own directory structure, outside of the public document_root.