Php session cannot be used after uploading

Source: Internet
Author: User
After php is uploaded, the session cannot be used to apply for a domain name on justhost. I use XAMPP locally to run php debugging. But after uploading it yesterday, I found many problems! I am a newbie. 1. Register for logon. if the password is incorrect, a prompt will be prompted, indicating that the password is incorrect, but the logon will not jump after the logon is successful, or on the logon page, without any prompt. why? 2. the home page will show that my SQL syntax is incorrect, but everything is fine locally, and the session cannot be used only after the home page prompt is uploaded by php.
I applied for a domain name on justhost. I used XAMPP locally to run php debugging.
But after uploading it yesterday, I found many problems! I am a newbie.
1. Register for logon. if the password is incorrect, a prompt will be prompted, indicating that the password is incorrect, but the logon will not jump after the logon is successful, or on the logon page, without any prompt. why?
2. the home page will show that my SQL syntax is incorrect, but everything is fine locally. only the home page prompts that the syntax is incorrect and other pages can call the database normally.
3. the following prompt appears on some pages: Warning: session_start () [function. session-start]: open (/home/whimwin1/public_html/testing/session_tmp/logs, O_RDWR) failed: No such file or directory (2) in .....

I checked it online and mentioned modifying php. ini. if this is the case, please tell me how to change it?
This website is very important to me. thank you!

------ Solution --------------------
1. there are several possibilities. the header () function fails to send and so on. You need to describe your jump method. if debugging is convenient, add a line of output code before the jump code to see if the code block has been executed.
2. the homepage says your SQL statement is wrong? So what is the error? Paste the specific error information to see
3. the file storing the session is not found. Check whether the session. save_path in your php. ini file has a corresponding folder, and if it is writable
------ Solution --------------------
After modifying php. ini, you still need to restart the server to make it take effect. if you do not have the permission to do so, forget it.
Make sure that the folder for storing the session is writable to everyone. I think you should have the permission to modify the folder.
In addition, if the problem persists, php also has a function that allows you to dynamically adjust the session storage location session_save_path ('Enter a writable and secure directory here ') and add it to the beginning of each session_start ().

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.