Trying To Get MySQL, Apache, And Php5 To Play Nice Together
I'm trying to get MySQL, Apache, and Php5 to play nice together in Windows
but having problems.
I don't want to install those automatic 'all-in-one' packages because I want
to know how to do it myself. I think I installed Apache correctly because
when I type http://localhost in my browser I see my directory, but echo
phpinfo() gets me a blank page. Can someone please point me to a resource
that explains how to get php5 working?
I put the doc root path in my php.ini to point to C:Program FilesApache
GroupApache2htdocs and no go..
Also, am I suppose to put my public_html folder inside of htdocs in tact, or
do I empty the contents of my public_html into htdocs?
View Complete Forum Thread with Replies
Related Forum Messages:
Addition To 5 / MySQL "play Nice" Article
This will only work for MySQL 4.+ and PHP 5 in a Windows environment; there was no mention if you're in Linux/UNIX as to how it would be done. Furthermore, there is no current support or PHP 5 with MySQL 5 for Linux and AFAIK won't be any in existence until the release of Fedora Core 5 in March 2006.
View Replies !
PHP5:DomDocument:nice Looking XMLS
I am creating som XML files with PHP5 built-in DomDocument Class. Everything works fine, but saveXML() returns the whole XML in one line. Is there any possibility to get good-looking, human readable, indented XML files with line breaks?
View Replies !
Apache Mysql Php5
I've managed to install, config, and make operable an Apache server, mysql, php5, ZendOptimizer, and phpMyAdmin on my WinXp comp. The problem is that when I install a script such as a cms or topsite they fail to run. I want to be able to run and test scripts on localhost before uploading to www.server I've installed such scripts on *nix based web servers without problem. I researched and found that chmod should not be an issue on windows so all the files/folders should have read/write access. I,m completly stumped. These scripts that I've attempted to run on my test server go through thier entire install process creating tables and such untill complete. I point to the folder/index.php and nothing.
View Replies !
PHP5 With MySQL 4.1 On Apache 2 On Win98
I am in the process of learning php. I am particularly interested in its uses with MySQL. I have Apache 2 and PHP5 both installed and working fine. I pasted a MySQLi example for opening and connecting to a MySQL DB into "hello.php" <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s ", mysqli_connect_error()); exit(); } printf("Host information: %s ", $mysqli->host_info); /* close connection */ $mysqli->close(); ?> For some reason when I get: Fatal error: Class 'mysqli' not found in D:Apache groupApache2htdocshello.php on line 7 I installed PHP in "d:php" and added it to my path in my autoexec.bat. in php.ini: .... extension_dir = "d:phpext" .... extension=php_mysqli.dll I read all the posts at the bottom of the pages on PHP.net website where someone says "I had a problem and I got...yada...yada and did everything each of those posts said you had to do and it still won't work. The only thing left is how PHP needs compiled with a "--with" statement or something like that but I'm using the windows binary so that shouldn't be a problem... Is there some other problem it could be besides a problem with finding a dll or ini?
View Replies !
Apache/ Win XP Home/ PHP5/ MySQL
I can get PHP5 running on Apache 2 installed on Windows XP Home Edition. Now I want to add MySQL4 to the package. I installed it but I'm not sure what to do now. My PHP5 scripts are running fine. The MySQL server seems to be running though actually I'm not sure. When I write $link = mysql_connect("localhost", "mysql"); I get the PHP5 error message "Call to undefined function mysql_connect()" Can anyone help?
View Replies !
PHP5.05, Mysql4.1, Apache On Windows XP - Cant Get Php To Talk To Mysql
I have read all (ok most) of the posts relating to "Call to undefined function mysql_connect()", read the manual on PHP.net and done eveything thats ive been asked to do but cant get PHP to talk to MySQL, PHP is working fine but I dont get any mysql info when running <? phpinfo() ?> and get the "Call to undefined function mysql_connect()" when trying to connect to mysql through php in browser, please help. 1. I have added C:php; to the end of the environment variable path 2. I have edited my php.ini file to : extension_dir = "c:phpext" extension=php_mysql.dll - removed the ";" ... ive checked i only have 1 php.ini file! 3. The dll "libmysql.dll" is in the folder C:php 4. The dll "php_mysql.dll" is in the folder c:phpext
View Replies !
PHP5 From Apache
This might have been covered in this forum before, but the search strings I tried didn't turn up a solution. I've been developing an application at home using PHP5 on Linux. I brought the project into work to test it on the school's internal iMac Webserver running OS 10.4 and PHP5. The CLI application is crashing with an . Code: "Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' " error message everytime it hits a class file with a private or public keyword in front of a class property or method. (I switched the load order of the class files to confirm that it was crashing over private and public. The phpinfo.php web page showed me I was running PHP Version 5.2.1; however, on a hunch, I typed php -ver at the command line and discovered I also had PHP 4.4.7 (cli) installed. I tracked down PHP5's location and was able to execute my program typing /usr/local/php5/bin/php main.php.
View Replies !
Apache 1.3, PHP5
I've looked at so many variations on what I might try to solve the failure of pspinfo() to execute when called by a simple test.php file that I'm now lost. My Apache server runs OK. I'm running under XP. I have folowed the steps given in the book 'PHP and Mysql 'but I'm clearly missing something in php.ini or httpd.conf Where does the phpinfo() function reside? Why can't I find it in my PC?
View Replies !
PHP5 On Apache 2
I have tried to install mod_PHP5 on freebsd where I had installed apache 2. It throws as error indicating mod_php5 needs apache 1.3. I am a newbie, shoudl I just run Apache 1.3 rather than trying to run the latest Apache.
View Replies !
Php5 Apache Error
I just installed on a new machine windows server 2003 and installed apache 2.2 on it and then unzip the php 5.1 files in c:php5 then added the load module php5_module line in httpd conf file copied the php5ts.dll to system32 and also in apache bin but when i start apache it keeps giving me error php5apache2.dll module not found if i remove this line from apache it works fine and apache starts but if i add this line it does not start can anybody suggest how to fix the problem why cant apache find the file php5apache2.dll the path is correct.
View Replies !
Install PHP5, Apache 2.2 And IIS
The book that I have talks you through the setup of both Apache and PHP. I allready have IIS installed. when I go to localhost:8080 I get an unable to find page come up. I have checked the error log and I get the following; [Wed Jan 31 13:28:58 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico I have checked for the file on my system and it is indeed not there. But surely not having a favicon is not a reason to shut it down?? If so I have downoloaded the latest full packages today, so seems a little strange that it is missing.
View Replies !
Installing PHP5 On APACHE 2.2.x
I'm trying to do a new install of PHP5 on Apache 2.2.x and i'm running into a serious snag. It wont load anything! after it's installed, I've checked my configure files and then load it. When i open a page i get nothing. just blank pages no matter what. Then if i turn on the startup error reporting i get errors galore telling me that *.dll's could not be loaded. I've checked my paths, and checked my sources, permissions and everything. The files are there.
View Replies !
Apache Hangs With PHP5
We have installed PHP 5.0.1 on a Windows 2003 Server with IIS6 in ISAPI mode. The processing of .php files works fine with our basis version of the php.ini file. But, as soon as we edit the php.ini file to outcomment the line "extension=php_sybase_ct.dll" (or "extension=php_pdf.dll") and restart the IIS6, the web site is not able to work with .php files properly, instead the web server seems to hang with any .php file.
View Replies !
Net-snmp + Php5 Apache Module
I've recently built a new server on which I've tried to configure and install PHP5 (I've now tried 5.0.4, 5.0.5, and 5.1.0RC1) along with Apache 1.3.33 and net-snmp 5.2.1.2. (Building PHP5 as an Apache module) Everything compiles just fine, but when I try to call any of the SNMP functions (i.e. snmpget) from a PHP script on a web page, I get the following error: Warning: snmpget() [function.snmpget]: Could not open snmp connection: Unknown host in /var/www/test.php on line 5 However, I can execute the same script (which just consists of a simple snmpget) from the CLI and it works just fine. It also works fine if I execute from Apache as a CGI. If I build the same configuration with PHP 4.4.0, everything works fine from within the Apache module. I've tried executing all of this from the CLI as the Apache user as well and it does not seem to make any difference. Has anyone else encountered this issue? Any ideas about what I could try to fix it?
View Replies !
Install PHP5 And Apache 2.2.2 (Linux)
I'm running into the same problem that no doubt many are. I'm installing PHP 5.1.4 and Apache 2.2.2 on the same server, but Apache won't recognize the PHP module, saying it's garbled. I understand from reading various bug reports that PHP will release this option come 5.2.0, but I want to know if anybody has PHP 5.1.4 and Apache 2.2.2 working under Linux yet.
View Replies !
Apache 2.0 W/PHP4; W/PHP5 Cohabitate
Apache 2.0 is currently installed to support an application using PHP4. I do not have PHP4 development environment installed. I want to install PHP5 for a learning session. The httd.conf file in Apache has the following entry: LoadModule php4_module "C:/Program Files/ktdms/php/sapi/php4apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/Program Files/ktdms/php" <Directory "C:/Program Files/ktdms/knowledgeTree"> The install process for PHP5 application instructs the following insertion in httd.conf: # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php" Will this work without conflict? Can I install PHP5 development environment using Apache 2.0 while another application is using Apache 2.0 with PHP4?
View Replies !
Install Php4 And Php5 At The Same Time To Apache
Here is some note about installation together php4 and php5 on apache2. First you need is to edit with the help of hex editor php4apache2.dll (in my case, or php5apache2.dll) in php4 directory. You find "x-httpd-php" and replace with "x-httpd-plc" e.g. (I found 2 matches) Save your dll file and edit your apache config (httpd.conf) e.g. like: Code:
View Replies !
Installing And Running Apache 2.0.46 / Php5.0.0b1 / Suse Linux 8.2
I did the following as instructed in the docs. (see below) everything seemed to install ok and I started apache with no complaints, but, 1)I do not see a process for apache using ps -ef 2) In yast I see that the new apache2 version is installed but not php5, its still on php4 any ideas ? 1. gzip -d httpd-2_0_NN.tar.gz 2. tar xvf httpd-2_0_NN.tar 3. gunzip php-NN.tar.gz 4. tar -xvf php-NN.tar 5. cd httpd-2_0_NN 6. ./configure --enable-so 7. make 8. make install Now you have Apache 2.0.NN available under /usr/local/apache2, configured with loadable module support and the standard MPM prefork. To test the installation use your normal procedure for starting the Apache server, e.g.: /usr/local/apache2/bin/apachectl start and stop the server to go on with the configuration for PHP: /usr/local/apache2/bin/apachectl stop. 9. cd ../php4-NN 10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs 11. make 12. make install 13. cp php.ini-dist /usr/local/lib/php.ini Edit your php.ini file to set PHP options. If you prefer this file in another location, use --with-config-file-path=/path in step 10. 14. Edit your httpd.conf file and check that these lines are present: LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php .php The path on the right hand side of the LoadModule statement must point to the path of the PHP module on your system. The above statement is correct for the steps shown above. 15. Use your normal procedure for starting the Apache server, e.g.: /usr/local/apache2/bin/apachectl start
View Replies !
Install Php5 On A SuSE 9.3 Linux System Running Apache 2.0.49
I am trying to install php5 on a SuSE 9.3 Linux system running apache 2.0.49. For some reason,when attempting to restart the server,I get the following error: "Syntax error on line 26 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2-prefork/libphp5.so into server: /usr/lib64/apache2-prefork/libphp5.so: undefined symbol: php_session_create_id" Does anyone know what is causing this error,or what I can do to correct it?
View Replies !
Nice Simple Forum
I am looking for a nice simple forum with a couple of basic features like a profile but not so many that it is too complex to easily edit. I am trying to integrate a forum into my website and be able to login to the site and the forum at the same time. I have already tried FForum but it was too stupid.
View Replies !
Send Array In A Nice Looking URL
I'm writing a web app that will take a number of product codes from the url, e.g. page.php?products=A34&BB8&NG0&TR8 That's how I'd like to display the URL. Not too complex! However it would seem the only feasible way to send these things as an array is to construct the array on-the-fly, e.g. page.php?products[]=A34&products[]=BB8&products[]=NG0&products[]=TR8 It has to be a typeable 'query url', and has to be nicer to look at than the above (client restrictions - you understand!)?
View Replies !
Nice Html Formatting.
One of my php scripts creates a html table. When I look at the source code in my browser all the table html code is on one line. How do I preserve nice html formatting? (tabs, and new lines) I am using single quotes.
View Replies !
Display Data With Nice Border?
I'm using PHP since a few week. I like to know how php programmers are making so nice border to displaying MySQL table? I like to make a border with rounded corner. Could somebody tell me how can I do that?
View Replies !
Making Nice Shiny Links
i have this code to make links into actual links as it were. im using it on a kind of guestbook type thing. basically i have a textbox in flash which sends a variable to this php script and then i need to print or echo the results back to flash. trouble is i cant work out how to configure this. should my textbox in flash have the variable 'text' or what? PHP Code:
View Replies !
Getting Date Diff In Nice Format
I have 2 dates, how do i get the difference between the two but formatted in a nice string, something like: 2 weeks 4 months I cant seem to work it out, i can get the difference in dates in days.
View Replies !
What Is The Correct/nice Way To Exit Php CGI Script Running On Aweb Server?
I'm making a web site that does login authentication. It all works fine, but I have a question about 'correctness'... Certain php scripts on the site should only run in the user has logged on. So, the 'private' scripts in question all includes the following php script: <? // has user authenticated? if (! $logged_in) { $newPath='login.php' echo "<html><head><meta http-equiv="REFRESH" content="3; url=$newPath"></head>"; echo "<body>You can't access this page without logging in!<p>Redirecting to the <a href="$newPath">login page</a> in 3 seconds.</body></html>"; } // exit php so that no more content gets output! exit(0); ?> As you can see, if the user is not logged on, we output an http refresh to redirect the users browser to the login screen. It works fine, but my main question is about the trick of calling exit(0) at the end, which is required to stop the php script that includes the above code from outputting any of its content (which is 'secret' from unauthenticated users.) Is calling exit(0) ok to this end? Is it considered a dirty hacky way of doing it? It does the job, but I'm just wondering if there is a nicer way of doing it I should be using.
View Replies !
Php5 With MySql
i was using mySQL with php i have updated my php to php 5 but now i am getting an error like this: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:Typo3htdocsMyfile.php on line 3 Connection failed. ............ But when i stop new mySql and start my old mySql every thing os ok.
View Replies !
PHP5 And Mysql On XP
Just downloaded an evaluation version of ZendStudio and like everything about it. except that it does not support mysql when debugging under a PHP5 environment.
View Replies !
MySQL And PHP5.1.2
I've just moved to 5.1.2 from 5.0.5 and I'm getting these warnings for each and every query: PHP Notice: Object of class DB_result could not be converted to int in /opt/csw/php5/lib/php/DB/mysql.php on line 980 PHP Notice: Object of class DB_result could not be converted to int in /opt/csw/php5/lib/php/DB/mysql.php on line 983.
View Replies !
How To Play Wav File
I need a php script to play a wav file or beep and I can't find any way to do that. It's for a chat room and what I want is for someone to be able to make a sound to get the other person's attention if they are not looking at their screen. Does anyone know how I might do this?
View Replies !
How To Play Mp3 On PHP Server
My Intranet server Using Apache(PHP-Mysql) in Windows 98. All client on my Intranet can request MP3 to Intranet Server than all request from client must be play on the Server. I use PHP to play MP3 with list.
View Replies !
PHP5, MySQL & Libmysql.dll
I'm moving some php/mysql development work from one PC to another. I wanted to use the latest versions of php, MySQL and Apache on the new machine, so I've downloaded the appropriate stuff and installed it. However, I'm getting the old familiar error when starting the server: PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll - The specified module could not be found Now I understand that this is because it can't find the libmysql.dll file. The php version 5.1.1. for windows doesn't contain a libmysql.dll file so I assumed that I could use the one in the MySQL distribution (version 5.0.18) but this doesn't work (even when placed in the System32 directory). I'm using Apache 2.0.55 on Windows XP. I've done all the usual stuff: 1). Editing the http.conf file. 2). Setting Windows Path variable to C:/php and C:/php/ext 3). Defining the extension_dir in php.ini 4). Uncommenting the LoadModule line for MySQL, etc... So basically I'm completely stuck. However I was wondering: 1). Why is there not a version of libmysql.dll in php version 5.1.1?. There's a suggestion that you can get one from the 'zip' download. However, this is not correct (at least for 5.1.1. version). Where can I get a 5.1.1. compatible libmysql.dll file?. 2). Is it reasonable for me to use the libmysql.dll file in the MySQL distribution?. 3). And are Apache 2.0.55, MySQL 5.0.18 & PHP 5.1.1 compatible?. If not then this might explain why the MySQL libmysql.dll file doens't work.
View Replies !
Framework For MySQL And PHP5
I'd like to ask you for comments on my LIZ DB framework. LIZ DB is a small framework written in PHP5 based on MySQLi extension. LIZ DB supports: - fetching data in various ways (Select, SelectOne, SelectColumn) - prepare and execute statements (Java like style setParameter(1, $param) etc.) - manage sophisticated transactions - commits, rollbacks, savepoints - prepare and call stored procedures and functions with in, inout, out parameters support - query logging If you'll find some time, please try it out and say what you think of it.
View Replies !
Php5-mysql-ajax
I have a database that stores all the ip addresses of the machines on my network. I would like the user to be able to start typing in the ip address and have ajax autofill the field with choices from a mysql db as the user continues to type in the ip address.
View Replies !
Php5 Connect To Mysql 5
I've installed php5 manually on my PC having win XP sp2 and I am using IIS 5.1 I've also installed mysql 5.0. I've been able to create database and table in mysqlBut when I connect using my php script. i got the following error: fatal error: call to undefined function mysql_connect(). I've done the following things: 1) I check out the /ext folder and I found both php_mysql.dll and php_mysqli.dll 2) I check out the php.ini where i uncomment the part extension=php_mysql.dll and as well extension=php_mysqli.dll 3) I save the file But I got the same error again.
View Replies !
Play ITunes Song From PHP
Is there a way to play a specific track (by track ID) in iTunes via PHP? I can Start/pause/stop it, but cannot play by the track ID. I have gotten this far by finding some similar scripts on line and the iTunesCOMWindowsSDK from apple.
View Replies !
Downloaded Wav File Does Not Play
I have a page w/ a Download button to download a .wav file. I used only the following code: header("Content-type: audio/x-wav"); header("Content-disposition: attachment; filename=".$filename); header("Content-Transfer-Encoding: binary"); readfile($file); The wav file is successfully downloaded but does not play; default player says "unsupported format". The downloaded file size is also correct. What could be wrong?
View Replies !
All-play-all Fixture Script
I'm trying to create a fixture script whereby each team plays every other team once on each level. I'll explain in a bit more detail: 9 Levels 10 Teams As there are 9 levels, there are 9 days, with a level played each day. Therefore there are 5 fixtures played on each level, each day. Each team must not play the same team twice, and they must definitely not play themselves. Code:
View Replies !
Extensions And MySQL.dll On WinXP PHP5
I'm hoping someone will give me the latest info here about PHP policy to enable extensions. [Preferably not - "Move them around under C:Windows until it works ..." ] I've installed PHP5 in C:PHP Meaningful excerpts: from php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = "./" ..... ;extension=php_msql.dll extension=php_mysql.dll TIA for your advice on this.
View Replies !
Mysql And Php5 Deleting Rows
I can't seem to delete rows from a mysql database. I have a database that I want to delete rows from based on user name. i have researched this extensively and can't seem to find anything that works.
View Replies !
How To Configure PHP5 To Use MySQL In Windows XP
I use PHP5 in Windows XP Professional with Apache and MySQL installed. I would like to use MySQL. Now, I cannot use mysql_* functions because mysql_connect(...) returns Fatal error: Call to undefined function mysql_connect() PHP is problably not correctly configured to use MySQL.
View Replies !
How SQLite Compares To MySQL In PHP5.
I would like to know if anybody has experiences with how SQLite compares to MySQL in PHP5. Let's say I have a table with 100,000 records. This is medium-sized, I guess, nothing large, but that's about what I need the most currently. Would going for SQLite be a bad idea for this size?
View Replies !
Upgrade To Php5 On Windows Xp On IIS 5.1 With MySQL
I am finally ready to upgrade to php 5 from php 4 but I am so so scared. I have not upgraded my php since i first installed back in 2003 and i really cannot remember how i did it. I am using window xp and i am currently using IIS 5.1 as my server. What has been putting me off for so long are all the variables that I'm worried that i don't remember. I've heard of a thing called XAMP which is supposed to have everything bundled to make for a easy install, but i'm not sure if this is the right step to take. But then on the other hand I'm way to nervous to try and do the upgrade myself. I've looked through loads of tutorials but now i'm confused as i'm not sure whether they all apply to what i currently have running. If i am currently running php v4.3.7 on windows xp on IIS 5.1 with MySQL ( not too sure of the version ) what is the best and least complicated way for me to upgrade?
View Replies !
To Get The Length Or Play-time/duration
can anyone please tell me how to convert a audio file size to length. Say I have a file(abc.mpeg) which is 4.6 MB in size & its length is 4.58 minutes. So is there any function in php by which i can get the length from the size of that file? maybe the sound is so silly but please help me!! actually I need to get the length or play-time of each song. I kept the file into a foleder & there name is in the database. Can anyone know any way to get the length of music file?
View Replies !
|