Support » Plugins and Hacks » Custom PHP form not working when WP Super Cache is active

  • Am having a wordpress 3.0 network setup with a contact us page which uses a template with a custom PHP form I had developed.

    The form has a session_start(); at the start along with a captcha.

    The form worked properly until I activated WP Super Cache. Any help would be greatly appreciated.

    The error message I get is:
    Warning: session_start() [function.session-start]: SAFE MODE Restriction in effect. The script whose uid is 627 is not allowed to access /tmp owned by uid 0 in /home/site_name/public_html/wp-content/themes/theme_name/contact.php on line 8

    Fatal error: session_start() [function.session-start]: Failed to initialize storage module: files (path: ) in /home/site_name/public_html/wp-content/themes/theme_name/contact.php on line 8

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    Add a check to see if the session is already active before calling session_start().

    I tried it, but nothing same error. When I remove my session code it just showed a blank page.

    It worked fine but stopped after I activate WP Super Cache.

    Do you have safe mode on?

    Hello Donncha,

    Actually this is weird. On the same server I use the script for many other wordpress sites and it works.

    It worked even on the website that is now showing errors. Since it started after I installed Super Cache plugin, I removed it completely and its working now.

    My PHP safe mode is off.

    To debug I placed the phpinfo() to check the session.save_path value and it was showing “no value”.

    The sadest/happiest part is, the issue has fixed by itself. No more errors. Not sure how that happened. I just removed WP Super Cache, and then the site started working and then I installed the plugin back.

    Guess this issue is now solved.

    Thanks Ron & Donncha

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom PHP form not working when WP Super Cache is active’ is closed to new replies.