Weird code on website. see image!

Status
Not open for further replies.

bober

New Member
I've been getting code placed on my sites, only the past couple of days - has anyone experienced this as well? I've been onto register365.com but i'm just waiting to hear back.

View attachment 345
 

mneylon

Administrator
Staff member
(moved to more appropriate forum)

Is this happening on one site or several sites?
What do the sites have in common? ie. is it the same CMS?

I couldn't make out the image you put there - the text is too small to read
 

bober

New Member
I'ts on personal website built using a wordpress template (I literally only made last week) - It also appears on another site My Canvas | Photo to Canvas Prints Dublin – Photos to Canvas – Canvas Printing – Photos On Canvas-Canvas Prints – Canvas Art – Printing Photos on Canvas – Canvas Art – Your Photo On Canvas – Dublin, Ire < not my site but were both using wordpress & registered with hosting365.com

Here's the code it's only appears every now & then! Warning: session_start() [function.session-start]: open(/tmp/sessions/sess_2955d683dfefa52e18828b4d62e637e5, O_RDWR) failed: No such file or directory (2) in /content/Hosting/g/l/glenquinn.me/web/wp-content/plugins/contact-wp/contact-wp.php on line 256

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /content/Hosting/g/l/glenquinn.me/web/wp-content/plugins/contact-wp/contact-wp.php:256) in /content/Hosting/g/l/glenquinn.me/web/wp-content/plugins/contact-wp/contact-wp.php on line 256

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /content/Hosting/g/l/glenquinn.me/web/wp-content/plugins/contact-wp/contact-wp.php:256) in /content/Hosting/g/l/glenquinn.me/web/wp-content/plugins/contact-wp/contact-wp.php on line 256

This is what register365 said >

Issues with sessions are often due to the /tmp folder being used to store your session files. You shouldn't use the default /tmp to store sessions as it is highly insecure due to being world-readable.

Instead, here's an alternative method:
- FTP to your web space root directory, where you should see /web and /logs
- Create a new folder called _SESSIONS
- CHMOD the folder to 770
- In your scripts, before calling session_start(), add the following lines:

$doc_root = preg_replace('%/web$%', '', $_SERVER['DOCUMENT_ROOT']);
ini_set('session.save_path', "$doc_root/_SESSIONS/");

This will then set the sessions to be saved in _SESSIONS in your hosting space, safely outside the /web directly and only accessible through your scripts. For this technique to work without causing permission problems, all of your sites session enabled files must be uploaded using the same FTP account.
 

mneylon

Administrator
Staff member
Odd.
I'd suspect that most hosting providers wouldn't be leaving /tmp accessible, as it would be a security risk, so I'd wonder if that is the actual issue
Have you hardcoded in the location to the "tmp" directory in the WP config or something?
 

bober

New Member
Odd.
Have you hardcoded in the location to the "tmp" directory in the WP config or something?

I not sure to be honest, I didn't really do anything but install the template & created my site arouind that. (totally basic stuff). I'll have to look into it a bit further. My collegue who owns mycanvas.ie is waitning to hear from register365.com So it should interesting to see what they to him.
 
Status
Not open for further replies.
Top