php-general Digest 23 Dec 2006 15:04:28 -0000 Issue 4530

Topics (messages 246160 through 246170):

Re: upload max error
        246160 by: ibanex22
        246161 by: ibanex22

How to Separate PHP Errors to a file different than Apache Errors
        246162 by: Shanon Swafford
        246165 by: chris smith
        246168 by: Shanon Swafford

Re: Excluding apostrophe's
        246163 by: Paul Novitski
        246166 by: Casey Chu

Apache 2.2 + PHP5.2 + php_oci8.dll
        246164 by: james tanhs
        246169 by: Roman Neuhauser

New User Sign up Notification
        246167 by: JMCS Niagara \(Jeff\)

Clarification: Jump to a record/PHP paging...
        246170 by: T.J. Mahaffey

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Thanks guys, I boosted a bunch of values in my configuration files and got it
to work... unfortunetly it only worked once.  I'm sure it worked, but I have
tried to recreate it and I cannot get it to work again.  This is very
confusing to me.  If there is any value that fluxuates... or anything... I
have no idea what to do.



David Giragosian wrote:
> 
> On 12/22/06, ibanex22 <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hey all,
>>
>> I am new to PHP and have been having issues on max filesize uploads.  I
>> can
>> currently upload small files but I wish to make my max upload size huge.
>> Here is what I have configured in php.ini:
>>
>> max_execution_time = 3000
>> max_input_time = 6000
>> memory_limit = 8000M
>> post_max_size = 8000M
>> file_uploads = On
>> uplad_max_filesize = 5000M
>> default_socket_timeout = 600
>>
>> I have also edited the upload script as well.
>> I am running Apache on OpenBSD, the PHP packages are hardened.
>> Any help or direction would be great!
>>
>> Thanks,
>> Erik
>> --
>> View this message in context:
>> http://www.nabble.com/upload-max-error-tf2872630.html#a8028989
>> Sent from the PHP - General mailing list archive at Nabble.com.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> Keep trying larger and larger file uploads, checking Apache and PHP error
> logs when you hit a size or timeout limit.
> 
> David
> 
> 

-- 
View this message in context: 
http://www.nabble.com/upload-max-error-tf2872630.html#a8030902
Sent from the PHP - General mailing list archive at Nabble.com.

--- End Message ---
--- Begin Message ---
I've got it... it looks like I had boosted something too high. Thanks for the
replies.



ibanex22 wrote:
> 
> Thanks guys, I boosted a bunch of values in my configuration files and got
> it to work... unfortunetly it only worked once.  I'm sure it worked, but I
> have tried to recreate it and I cannot get it to work again.  This is very
> confusing to me.  If there is any value that fluxuates... or anything... I
> have no idea what to do.
> 
> 
> 
> David Giragosian wrote:
>> 
>> On 12/22/06, ibanex22 <[EMAIL PROTECTED]> wrote:
>> 
>>>
>>> Hey all,
>>>
>>> I am new to PHP and have been having issues on max filesize uploads.  I
>>> can
>>> currently upload small files but I wish to make my max upload size huge.
>>> Here is what I have configured in php.ini:
>>>
>>> max_execution_time = 3000
>>> max_input_time = 6000
>>> memory_limit = 8000M
>>> post_max_size = 8000M
>>> file_uploads = On
>>> uplad_max_filesize = 5000M
>>> default_socket_timeout = 600
>>>
>>> I have also edited the upload script as well.
>>> I am running Apache on OpenBSD, the PHP packages are hardened.
>>> Any help or direction would be great!
>>>
>>> Thanks,
>>> Erik
>>> --
>>> View this message in context:
>>> http://www.nabble.com/upload-max-error-tf2872630.html#a8028989
>>> Sent from the PHP - General mailing list archive at Nabble.com.
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>> Keep trying larger and larger file uploads, checking Apache and PHP error
>> logs when you hit a size or timeout limit.
>> 
>> David
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/upload-max-error-tf2872630.html#a8031085
Sent from the PHP - General mailing list archive at Nabble.com.

--- End Message ---
--- Begin Message ---
Hi Guys,

I just cut my website over to Apache2 and PHP5 on FC5.

So now I'm clean up all the PHP Notices.

Does anybody know the config directives I can put in my /etc/php.ini or
etc/httpd/conf.d/php.conf or /etc/httpd/conf/httpd.conf so that I could
separate the php errors file from the apache errors file?



Thanks a bunch,
Shanon

--- End Message ---
--- Begin Message ---
On 12/23/06, Shanon Swafford <[EMAIL PROTECTED]> wrote:
Hi Guys,

I just cut my website over to Apache2 and PHP5 on FC5.

So now I'm clean up all the PHP Notices.

Does anybody know the config directives I can put in my /etc/php.ini or
etc/httpd/conf.d/php.conf or /etc/httpd/conf/httpd.conf so that I could
separate the php errors file from the apache errors file?

http://www.php.net/manual/en/ref.errorfunc.php

Specifically 'error_log'.

This will be commented out in a default php.ini file, search for it
there, enable it and restart your webserver.

Also the webserver user has to 'own' this file (as with it's other
logs), so check permissions.
--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
>
>-----Original Message-----
>From: chris smith [mailto:[EMAIL PROTECTED] 
>Sent: Friday, December 22, 2006 11:29 PM
>To: Shanon Swafford
>Cc: [email protected]
>Subject: Re: [PHP] How to Separate PHP Errors to a file different than
Apache Errors
>
>
>On 12/23/06, Shanon Swafford <[EMAIL PROTECTED]> wrote:
>> Hi Guys,
>>
>> I just cut my website over to Apache2 and PHP5 on FC5.
>>
>> So now I'm clean up all the PHP Notices.
>>
>> Does anybody know the config directives I can put in my /etc/php.ini or
>> etc/httpd/conf.d/php.conf or /etc/httpd/conf/httpd.conf so that I could
>> separate the php errors file from the apache errors file?
>
>http://www.php.net/manual/en/ref.errorfunc.php
>
>Specifically 'error_log'.
>
>This will be commented out in a default php.ini file, search for it
>there, enable it and restart your webserver.
>
>Also the webserver user has to 'own' this file (as with it's other
>logs), so check permissions.
>-- 

Thanks Chris,

I've read that but either it is not possible or I'm still missing something.

This is my setup:

/etc/php.ini
error_log = /var/log/httpd/php_errors

/etc/httpd/conf/httpd.conf
ErrorLog logs/error_log

With this:

Command line php errors show up in php_errors which is good.

But Apache php errors generated by scripts served up by Apache as web pages
all show up in error_log.

I'd like these Apache errors to go into php_errors so I can keep my "Apache:
file not found type errors" and "PHP Syntax" errors separate.

Is this possible?

Thanks again,
Shanon

--- End Message ---
--- Begin Message ---

RAFMTD (Ian) wrote:
...
$name = mysql_real_escape_string ($_POST['name']);
...
mysql_connect("humbug",$username,$password);
...
the script fails with the following report Warning:
mysql_real_escape_string(): Can't connect to local MySQL server through
socket '/var/run/mysqld/mysqld.sock' (2)


At 12/22/2006 05:36 AM, Stut wrote:
You need to connect to the database before using mysql_real_escape_string.


Ian, this is a perfect example of when it comes in handy to consult the documentation:
________________________

http://ca.php.net/manual/en/function.mysql-real-escape-string.php

string mysql_real_escape_string ( string unescaped_string [, resource link_identifier] )

Escapes special characters in the unescaped_string, taking into account the current character set of the connection....
...
link_identifier

The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect() is assumed. If no such link is found, it will try to create one as if mysql_connect() was called with no arguments. If by chance no connection is found or established, an E_WARNING level warning is generated.
________________________

Remember, my son, PHP-general helps those who help themselves.

Piously,

Poop Paul
--- End Message ---
--- Begin Message ---
It should be like this:

<?php
$username="***";
$password="***";
$database="***";


mysql_connect("humbug",$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$name = mysql_real_escape_string($_POST['name']);
$email = mysql_real_escape_string($_POST['email']);
$comments = mysql_real_escape_string($_POST['comments']);
/*
if (!$name || !$email || !$comments) die();

(or something like that)
*/

$query = "INSERT INTO remarks VALUES  ('','$name','$email','$comments')";
mysql_query($query);

mysql_close();
?>

On 12/22/06, Paul Novitski <[EMAIL PROTECTED]> wrote:

>RAFMTD (Ian) wrote:
...
>>$name = mysql_real_escape_string ($_POST['name']);
...
>>mysql_connect("humbug",$username,$password);
...
>>the script fails with the following report Warning:
>>mysql_real_escape_string(): Can't connect to local MySQL server through
>>socket '/var/run/mysqld/mysqld.sock' (2)


At 12/22/2006 05:36 AM, Stut wrote:
>You need to connect to the database before using mysql_real_escape_string.


Ian, this is a perfect example of when it comes in handy to consult
the documentation:
________________________

http://ca.php.net/manual/en/function.mysql-real-escape-string.php

string mysql_real_escape_string ( string unescaped_string [, resource
link_identifier] )

Escapes special characters in the unescaped_string, taking into
account the current character set of the connection....
...
link_identifier

     The MySQL connection. If the link identifier is not specified,
the last link opened by mysql_connect() is assumed. If no such link
is found, it will try to create one as if mysql_connect() was called
with no arguments. If by chance no connection is found or
established, an E_WARNING level warning is generated.
________________________

Remember, my son, PHP-general helps those who help themselves.

Piously,

Poop Paul

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
Hi,

I saw numerous posting on this type of posting and no one seems to have a
consistent solution to it.

Lately, I am quite disapointed with the pain of going thru this
configuration and testing.
I need to access the oracle 8i server db using XP + Oracle client 8i +
Apache 2.2 + PHP5.2 and I have tried
the following without success.  What is the error ? not sumething special
but common
"PHP Warning:  PHP Startup: Unable to load dynamic library
'c:\\php52\\ext\\php_oci8.dll' - The specified procedure could not be
found.\r\n in Unknown on line 0"
1.  download the php_oci8.dll from
http://pecl4win.php.net/ext.php/php_oracle.dll (you name the version, tried
everythign doesn't work)
2.  assign ORACLE_HOME, NSL_LANGUAGE...nope...doesn't work.
3.  use old php4.1.xx + Apache 1.3xx on XP with Oracle client 8i...nope
doesn't work ( I use this in my NT4, it works like charm)
4.  Zendcore for oracle...no no...it doesn't support Oracle 8i connectivity.
5.  anyone know where to look for oracle 8i/9i clients for linux ? not
available at oracle website :(

Anyone can help ?

Tq

--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2006-12-23 12:21:35 +0800:
> I saw numerous posting on this type of posting and no one seems to have a
> consistent solution to it.
> 
> Lately, I am quite disapointed with the pain of going thru this
> configuration and testing.
> I need to access the oracle 8i server db using XP + Oracle client 8i +
> Apache 2.2 + PHP5.2 and I have tried the following without success.

Why can't you use the newest client?

> What is the error ? not sumething special but common
> "PHP Warning:  PHP Startup: Unable to load dynamic library
> 'c:\\php52\\ext\\php_oci8.dll' - The specified procedure could not be
> found.\r\n in Unknown on line 0"

Which procedure is it? Use depends.exe to find out what other libraries
you're missing.

> 1.  download the php_oci8.dll from
> http://pecl4win.php.net/ext.php/php_oracle.dll (you name the version, tried
> everythign doesn't work)
> 2.  assign ORACLE_HOME, NSL_LANGUAGE...nope...doesn't work.
> 3.  use old php4.1.xx + Apache 1.3xx on XP with Oracle client 8i...nope
> doesn't work ( I use this in my NT4, it works like charm)
> 4.  Zendcore for oracle...no no...it doesn't support Oracle 8i connectivity.
> 5.  anyone know where to look for oracle 8i/9i clients for linux ? not
> available at oracle website :(



-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

--- End Message ---
--- Begin Message ---
hi there. I'm looking to create a new user signup. So when someone signs up, it 
emails admin the Username, Real Name, and IP address.

I have this code called newusersignupnotification.php

<?php
$to = '[EMAIL PROTECTED]'; // The email address you want the notification sent 
to
$subject = 'Member has registered on YoS'; // What do you want the subject line 
of your notification to be?
$memberSpecs = 
"<hr size=2 width=300 align=left>".
"<b>Username:</b> ".$_SESSION['username'].
"<br>".
"<b>Real Name:</b> ".$_SESSION['firstname']. " ".$_SESSION['lastname'].
"<br>".
"<b>Date</b> ".date('l dS \of F Y h:i:s A').
"<br>". 
"<b>IP address:</b> ".$_SERVER['REMOTE_ADDR'].
"<br>".
"<b>System Specs:</b> ".$_SERVER['HTTP_USER_AGENT'].
"<br>";
$headers = "Content-type: text/html \nFrom: [EMAIL PROTECTED]";
$body = "<body>
<br>
<table cellspacing=1 cellpadding=2 align=center>
<tr>
<td>
<b><font face=arial size=2>A new member has registered! </font></b>

</td></tr>
<tr>
<td>
<font face=arial size=2> ".$memberSpecs." </font>
</td></tr></table>
</body>";
mail($to,$subject,$body,$headers);
?>

When I place this in the "join.php" file .. When someone goes to join.php it 
automatically emails it .. and I get date, time, ip, etc etc everything except 
for the username and first name.. Obviously, because the person hasn't typed in 
anything.

When they filled out the sign up form, There's a button that says Sign Up .. 
Basically, when they click this button, NOW is when I want it to email me the 
details.

Any ideas?

Thanks guys

--- End Message ---
--- Begin Message ---
I see now that I did not explain myself adequately.
I think "jump to record" was the wrong way to put it. So, here goes.

I already have excellent paging functionality working well, based on a nice tutorial at PHPFreaks.

My problem is that when a user performs a search, I need to display the page on which their search string is found, but still display ALL records within the paging of the entire database.
I've since discovered the core of what I need to do:

        1. I can find the record I need through a simple query.

2. I can easily determine WHICH page this record is on by counting BACKWARDS from the found record to the FIRST record, totaling the number of records from record 1 to the found record. Then, by performing a bit of division, I can determine which page that record appears on and direct the user to "...page=8" via $_GET.

SO, my question is: how might I have MySQL tell me how many records came BEFORE the found record? (FYI: there is currently no auto-incrementing ID on these records, so that obviously easy solution would be unavailable.)

Thanks in advance for any insight.

--
T.J. Mahaffey
[EMAIL PROTECTED]

--- End Message ---

Reply via email to