PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 16th, 2002, 01:41 AM
infamous-online infamous-online is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 403 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 27 m 25 sec
Reputation Power: 17
Thumbs down Php 4.2.1 & Mysql

ok i upgraded to php 4.2.1 but heres the problem, if i try to install something like a message board or anything else requiring mysql i get this error
PHP Code:
 CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers
The headers it did return are
and i dont know how to fix it. HELP!!!!
__________________
Apache Expert

Reply With Quote
  #2  
Old May 16th, 2002, 01:45 AM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
try reinstalling php and mysql, also make sure ur config file is correct, and make sure its the right install for your system

other then that, from the info your offered. theirs nothing much else it could be, does the error only come up when trying to access mysql???

Reply With Quote
  #3  
Old May 16th, 2002, 05:50 AM
infamous-online infamous-online is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 403 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 27 m 25 sec
Reputation Power: 17
Thumbs down

heres the thing, my site is done in php right but let's say i want to add phpbb2 to my site, thats when i'll get the cgi error. i don't what it could be but i'm going crazy over here because i can't figure out what's causing this error and everything is setup right too. also i did try reinstalling and uninstalling both countless times no luck wtf gives....

Reply With Quote
  #4  
Old May 16th, 2002, 06:25 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 588 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
PHP 4.2 is a bitch! They've changed alot of things.. i.e. HTTP_SERVER_VARS, etc aren't global anymore and have been deprecated for $_SERVER, etc...

It'll be a couple of options in your INI file that's making it behave badly, coz i think phpbb2 is for PHP 4.1... not many apps support 4.2 yet, so you just need to mod ini file.

change register_globals to On as a start. Next, checkout the 4.2 guide at php.net. Just search for upgrade or php 4.2 or new version in the search box. search the whole site.

Reply With Quote
  #5  
Old May 16th, 2002, 11:43 PM
infamous-online infamous-online is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 403 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 27 m 25 sec
Reputation Power: 17
Unhappy

does anybody have the php 4.1.1 installer file not the source code, because i dont know how to set that up

Reply With Quote
  #6  
Old May 17th, 2002, 04:14 AM
infamous-online infamous-online is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 403 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 27 m 25 sec
Reputation Power: 17
heres the code for my store.php4 file please tell me what i need to change, also here is my getdata.php4 file tell me what i need to fix. also i turned on magic quotes but when i upload the file to the database it's a zero instead of 1,2 3 and so forth. sorry for the hassle guys....

PHP Code:
<HTML>
<
HEAD><TITLE>Store binary data into SQL Database</TITLE></HEAD>
<
BODY>
<?
php
// code that will be executed if the form has been submitted:

if ($submit) {

    
// connect to the database
    // (you may have to adjust the hostname,username or password)

    
MYSQL_CONNECT("localhost","blah");
    
mysql_select_db("mysql");

    
$data addslashes(fread(fopen($form_data"r"), filesize($form_data)));

    
$result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ".
        
"VALUES ('$form_description','$data','$form_data_name','$f  orm_data_size','$form_data_type')");

    
$idmysql_insert_id();
    print 
"<p>This file has the following Database ID: <b>$id</b>";



    
MYSQL_CLOSE();

} else {

    
// else show the form to submit new data:
?>

    <form method="post" action="<?php echo $PHP_SELF?>" enctype="multipart/form-data">
    File Description:<br>
    <input type="text" name="form_description"  size="40">
    <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
    <br>File to upload/store in database:<br>
    <input type="file" name="form_data"  size="40">
    <p><input type="submit" name="submit" value="submit">
    </form>

<?php

}

?>
</BODY>
</HTML> 


getdata.php4

PHP Code:
<?php
if($id) {

server:
    @
MYSQL_CONNECT("localhost","blah");

    @
mysql_select_db("mysql");

    
$query "select bin_data,filetype from binary_data where id=$id";
    
$result = @MYSQL_QUERY($query);

    
$data = @MYSQL_RESULT($result,0,"bin_data");
    
$type = @MYSQL_RESULT($result,0,"filetype");

    
Header"Content-type: $type");
    echo 
$data;

};
?>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Php 4.2.1 & Mysql


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap