Thinkphp3.2.3 verification code display problem!

Source: Internet
Author: User
Thinkphp3.2.3 verification code display problem! Thinkphp3.2.3 the verification code is displayed as OK locally, but only the background image is displayed after it is placed in the HiChina vm. what is the problem if the verification code is not displayed? Solution


Reply to discussion (solution)

Is the font path correct?

Is the font path correct?


ThinkPHP \ Library \ Think \ Verify \ ttfs font path in this location

It should not be about the font file path. it does not seem like a standard font in the background.
Are your two characters not in the same font?
If it is not the same font, change it to the same one first.

It should not be about the font file path. it does not seem like a standard font in the background.
Are your two characters not in the same font?
If it is not the same font, change it to the same one first.


The background image is random by default, but I have selected a font and it is not displayed.

Is the bag not uploaded?

Is the bag not uploaded?


All the character packs are in it.

It should not be an issue of image generation. Because all background images are generated.
Check whether the server log has any warning or error.

Try to use this to generate the font and change it to your font.

 

There is a high possibility of incorrect font paths. print out the fonts in imagefttext.

Your local machine should be a WIN system, right,
HiChina's PHP systems are all linux systems. check the permissions,

1. whether the php file encoding is UTF-8 without bom.
2. if thinkphp enables debug in the entry file, the verification code may be released. if thinkphp does not know the cause of the version, thinkphp3.0 may have such a problem.
3. it may be because your file path is incorrect or the file permission is incorrect.

Your local machine should be a WIN system, right,
HiChina's PHP systems are all linux systems. check the permissions,


I gave 777 permissions

It should not be an issue of image generation. Because all background images are generated.
Check whether the server log has any warning or error.

Try to use this to generate the font and change it to your font.

 


Okay. let me try it.

1. whether the php file encoding is UTF-8 without bom.
2. if thinkphp enables debug in the entry file, the verification code may be released. if thinkphp does not know the cause of the version, thinkphp3.0 may have such a problem.
3. it may be because your file path is incorrect or the file permission is incorrect.


The encoding is UTF-8, and debug is disabled, and the path is normal. The text in the background image can also appear, that is, the verification code cannot be used.

Have I tried that code? Are there any error messages?

I also encountered the same problem as you ------- the local access verification code is correctly displayed. it cannot be displayed after being placed on a HiChina server.
Solution:
Change object access permissions
At the beginning, this file only has read and execution permissions.
After I hook up the write permission, it will be displayed correctly.



To those who share the same experience with me and are still confused !!

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.