高分!win7上php,apache,mysql配置有关问题
高分!!win7下php,apache,mysql配置问题
先说明,这三个我都已经安装了,而且我用phpinfo()试过没问题,但是当我连接数据库后,在浏览器上运行,可恶的事情发生了Fatal error: Call to undefined function mysql_connect() 本人急用,
------解决方案--------------------
phpinfo里找得到mysql 或者mysqli吗?
------解决方案--------------------
急用就赶紧装个xampp好了.
------解决方案--------------------
把错误信息都粘出来。。
------解决方案--------------------
应该再多描述一些
------解决方案--------------------
方面的集成环境的话
xampp
appserv 都还可以
你就要用这个的话看看php.ini 关于mysql的不要注释
extension=php_mysql.dll
extension=php_mysqli.dll 主要是这两项
phpinfo() 输出的内容有没有mysql?
不行的话,再试试这样弄 我觉得这个是最有可能的
将 1、x:\php\ext\php_mysql.dll 2、x:\php\libmysql.dll
这两个文件拷贝到c:\windows文件夹下
------解决方案--------------------
直接安装XAMPP就可以了,这个是集成的,不用自己手动配置,很方便的,不会出现这样的问题,我现在用的就是这个,而且在win7上,如果需要联系我。
------解决方案--------------------
打开php.ini 文件,开启这2项:
extension=php_mysql.dll
extension=php_mysqli.dll
要是还不好使,直接安装XAMPP就可以了,这个是集成的,不用自己手动配置。
------解决方案--------------------
你说phpinfo()正常,上面至少要有php apache与mysql的块说明,不是有数据就是正常
mysql_connect()未定义就是mysql未关联上,你有按楼上说的解开扩展extension吗,有无重启apache
看下端口netstat -an 3306端口是否打开,未打开表明mysql未启动
集成包还是快捷便利,我也推荐集成包
xampp , phpNow 一健安装,三分钟内配好环境
前提是:你要把你已安的东西卸载了,因为端口会冲突造成影响,甚至运行失败
------解决方案--------------------
这个错误的意思是php没有找到mysql_connect该函数,但是你现在要使用这个函数,所以报错。
确认phpinfo()中有mysql模块扩展吗?如果没有,打开php.ini 文件,将这2项:
;extension=php_mysql.dll
;extension=php_mysqli.dll
修改为:
extension=php_mysql.dll
extension=php_mysqli.dll
另外
extension_dir = "C:\Program Files\ApacheDir\phpdir\ext\";
确认你自己的extension_dir路径正确,
然后重启apache看看,应该在phpinfo中有mysql的扩展
------解决方案--------------------
楼上的正解!!!!!!!1

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The future of PHP will be achieved by adapting to new technology trends and introducing innovative features: 1) Adapting to cloud computing, containerization and microservice architectures, supporting Docker and Kubernetes; 2) introducing JIT compilers and enumeration types to improve performance and data processing efficiency; 3) Continuously optimize performance and promote best practices.

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

You can open phpMyAdmin through the following steps: 1. Log in to the website control panel; 2. Find and click the phpMyAdmin icon; 3. Enter MySQL credentials; 4. Click "Login".

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

MySQL and SQL are essential skills for developers. 1.MySQL is an open source relational database management system, and SQL is the standard language used to manage and operate databases. 2.MySQL supports multiple storage engines through efficient data storage and retrieval functions, and SQL completes complex data operations through simple statements. 3. Examples of usage include basic queries and advanced queries, such as filtering and sorting by condition. 4. Common errors include syntax errors and performance issues, which can be optimized by checking SQL statements and using EXPLAIN commands. 5. Performance optimization techniques include using indexes, avoiding full table scanning, optimizing JOIN operations and improving code readability.

PHP is not dying, but constantly adapting and evolving. 1) PHP has undergone multiple version iterations since 1994 to adapt to new technology trends. 2) It is currently widely used in e-commerce, content management systems and other fields. 3) PHP8 introduces JIT compiler and other functions to improve performance and modernization. 4) Use OPcache and follow PSR-12 standards to optimize performance and code quality.

The methods for viewing SQL database errors are: 1. View error messages directly; 2. Use SHOW ERRORS and SHOW WARNINGS commands; 3. Access the error log; 4. Use error codes to find the cause of the error; 5. Check the database connection and query syntax; 6. Use debugging tools.

How to connect to MySQL using phpMyAdmin? The URL to access phpMyAdmin is usually http://localhost/phpmyadmin or http://[your server IP address]/phpmyadmin. Enter your MySQL username and password. Select the database you want to connect to. Click the "Connection" button to establish a connection.
