Note that there are some explanatory texts on larger screens.

plurals
  1. POMysql/Apache connection error from Php script
    primarykey
    data
    text
    <p>I am trying to use php. I wrote a small script as instructed in the tutorial. I am using Wampserver 2.0. Connection is fine. But whenever I try to execute the script, I get "Apache HTTP server encountered a problem and needs to close" error message. My localhost is working fine. Normal php scripts without mysql statements in it is working fine. My db connection is ok. So what's the problem?</p> <p>Versions:</p> <pre><code>Php: 5.3.0 Apache: 2.2.11 MySql: 5.1.36 </code></pre> <p>The script:</p> <pre><code>&lt;?php mysql_connect ('localhost', 'root', '') ; mysql_select_db ('blog'); /* * Setup a db table named blog which is gonna contain blog posts * max number of entries: 2,359,296. Because we declared id to be an int of 20. * primary key: id * id - auto increment so that next entry will get the next primary number available */ $sql = "CREATE TABLE blog ( id int(20) NOT NULL auto_increment, timestamp int(20) NOT NULL, title varchar(255) NOT NULL, entry longtext NOT NULL, PRIMARY KEY (id) )"; // Create the blog table $result = mysql_query($sql) or print ("Can't create the table 'blog' in the database!&lt;br /&gt;".$sql."&lt;br /&gt;". mysql_error()); if ($result != false) { echo "Table 'blog' was successfully created."; } mysql_close(); ?&gt; </code></pre> <p>Apache error log (Don't see anything critical):</p> <pre><code>[Sun Jan 31 09:49:29 2010] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Sun Jan 31 09:49:29 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations [Sun Jan 31 09:49:29 2010] [notice] Server built: Dec 10 2008 00:10:06 [Sun Jan 31 09:49:29 2010] [notice] Parent: Created child process 11172 [Sun Jan 31 09:49:29 2010] [notice] Child 11172: Child process is running [Sun Jan 31 09:49:29 2010] [notice] Child 11172: Acquired the start mutex. [Sun Jan 31 09:49:29 2010] [notice] Child 11172: Starting 64 worker threads. [Sun Jan 31 09:49:29 2010] [notice] Child 11172: Starting thread to listen on port 80. [Sun Jan 31 09:49:32 2010] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Sun Jan 31 09:49:33 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations [Sun Jan 31 09:49:33 2010] [notice] Server built: Dec 10 2008 00:10:06 [Sun Jan 31 09:49:33 2010] [notice] Parent: Created child process 10244 [Sun Jan 31 09:49:33 2010] [notice] Child 10244: Child process is running [Sun Jan 31 09:49:33 2010] [notice] Child 10244: Acquired the start mutex. [Sun Jan 31 09:49:33 2010] [notice] Child 10244: Starting 64 worker threads. [Sun Jan 31 09:49:33 2010] [notice] Child 10244: Starting thread to listen on port 80. </code></pre> <p><strong>EDIT:</strong></p> <p>Fixed. Just downgraded the Php version to 5.2.8.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload