Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





PHP4+Win98 And Sessions


I've tried PHP4build4, RC1, RC2 and 4.0.0 with Win98 but sessions doesn't work: I've got 2 pages: first_page.php3

<?
session_start();
$myvar="test";
session_register("myvar");?>

second_page.php3

<?
session_start();
echo $myvar; ?>

I've launched first_page.php3, then I've launched second_page.php3: the browser doesn't display anything (it should display the world "test").




View Complete Forum Thread with Replies

Related Forum Messages:
PHP4 Installation Win98 + PWS
I can't get to work php4 on my windows machine,l i have tryed all the things that came in the documentation and it doesn't work.The error that I recieve trying to run a php is HTTP 500 Internal Server Error.

View Replies !
Win98, Apache & Php4.3 Installation
I tried to install php as apache module.
Previously it has been cgi. WIn 98 is
not supported but cgi worked fine, anyway.

I tried to everything according to
instructions in php.net, but
still it didn't work.

- I put php4ts.dll to windows/system32 directory.
- I configured http.conf:
- I used the path where I had put
php download (PHP 4.3.3 zip package [6,180Kb]).
- I commented these three lines that were for the CGI-install:
# ScriptAlias /php/ "c:/php/"
# AddType application/x-httpd-php .php
# Action application/x-httpd-php "/php/php.exe"

But Apache didn't start. It died because of this line:
LoadModule php4_module "c:/HERE_WAS_MYPATH/sapi/php4apache2.dll"

http://fi2.php.net/manual/en/install.apache2.php
If you would like to use PHP as a module in Apache 2.0, be sure to move
php4ts.dll for PHP 4, or php5ts.dll for PHP 5, to winnt/system32 (for
Windows NT/2000) or windows/system32 (for Windows XP), overwriting any older
file. You need to insert these two lines to your Apache httpd.conf
configuration file to set up the PHP-Module for Apache 2.0: Example 3-8. PHP
and Apache 2.0 as Module

; For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php

; For PHP 5 do something like this:
LoadModule php5_module "c:/php/sapi/php5apache2.dll"
AddType application/x-httpd-php .php

Note: Remember to substitute the c:/php/ for your actual path to PHP in the
above examples. Take care to use either php4apache2.dll or php5apache2.dll
in your LoadModule directive and notphp4apache.dll or php5apache.dll as the
latter ones are designed to run with Apache 1.3.x.

Warning
Don't mix up your installation with dll files from different PHP versions .
You have the only choice to use the dll's and extensions that ship with your
downloaded PHP version.

View Replies !
Sessions Without Cookes In Php4
I need to use php sessions without cookies, my session registers works perfect, but I really don't know how to use an expiration time as it is used with cookies. Do you know what can I do to use an expiration time of 15 minutes??. I've tried using mysql to save the session ID's and check there if the sessoin is already registered and how long it has been inactive to see if it's an accepted time, but it really uses a lot of resources just to check. And if you have a lot of visitors at your page your machine almost die.
Other thing is that the session Id's keeps saved in my /tmp and are never deleted if you don't do a logout where I use the destroy code.


View Replies !
Sessions Not Returning Anything? - NT - Php4
I use php4 on PWS NT workstation. I use the basic session example in the php docs, the e-commerce tut on devshed and the origional example from devshed(couch sessions) and no luck. I get a page, yet when I view source - nothing after the body tag?

Is there a module I have to uncomment in php.ini or something I have to download? I have tried viewing from another machine and multiple browsers.

View Replies !
PHP4 Sessions And Arrays
I'm currently working on a PHP4/MySQL generic shopping cart project, but I am having problems with the cart section. At present, my 'add one item to cart' function works using sessions and arrays, something like: PHP Code:

View Replies !
Php4+apache1.3+xp With Sessions Not Working...
I seem to have a major problem with sessions on my setup. No simple
example seems to work. Example below:

page1.php:

<?php
// page1.php

session_start();

echo 'Welcome to page #1'

$_SESSION['favcolor'] = 'green'
$_SESSION['animal'] = 'cat'
$_SESSION['time'] = time();

// Works if session cookie was accepted
echo '<br /><a href="page2.php">page 2</a>'

// Or maybe pass along the session id, if needed
echo '<br /><a href="page2.php?' . SID . '">page 2</a>'
?>

Page2.php:

<?php
// page2.php

session_start();

echo 'Welcome to page #2<br />'

echo $_SESSION['favcolor']; // green
echo $_SESSION['animal']; // cat
echo date('Y m d H:i:s', $_SESSION['time']);

// You may want to use SID here, like we did in page1.php
echo '<br /><a href="page1.php">page 1</a>'
?>

Output after pressing page2 link:

Welcome to page #2
1970 01 01 00:00:00
page 1

View Replies !
Possible For Sessions To Work Under PHP5 And Not Under PHP4.
I'm writing an web application with PHP/MySQL. I used PHP5 but believed
to use code that would work also under PHP4. However when I tried my
application under PHP4 I got the warning that the headers are already
sent and my session did not work. I do understand that I have to send
the headers before anything else. But does anyone know what kind of
difference between PHP4 and PHP5 makes it possible for sessions to work
under PHP5 and not under PHP4.

View Replies !
Win98 And PHP
I have windows 98 and I would like to run PHP, I have PWS to run ASP but I would like to work towards javascript. I would work with ASP and VBScript but the problem is that I only have VB2005 EX ED. I got no books for VB at my home, but I have books on C++, Java, C#, Javascript, and much more.

View Replies !
Stand Alone Win98?
how would i get php running with mysql on a windows 98 machine with out a server so that i could test my scripts after i create them.?

View Replies !
Apache 1.3.14, PHP 4.0, MYSQL And Win98
I have installed and working Apache and php 4.0. I would like to get mysql working too.
I ran the phpinfo file using PHP 4.0 and I did not get the MYSQL extensions in the resulting table. I subsequently - after changing my http.conf file - ran the phpinfo file using PHP 3.0.16 and got the MYSQL extension showing up in the table. Why isn't the mysql extensions showing up under PHP 4.0?

View Replies !
File Permissions In Win98
I just wanted to know if there was any way I could change my file permissions so I can use the fopen function in windows 98 using Apache and PHP 4.04???? I know how to do it for Linux but I need it for Win 98.

View Replies !
Win98 + Apache 1.3.up + PHP 4.3.up Something Wrong
I been first times setup. So Who have experience the Win98 + Apache + php
(not run PWS or IIS)

I begin download and installed the Apache. I test the run is working on
browser (http://localhost) show the apache page.

But Apache Console Running under the DOS Window say :-
=====================================
[Thu Nov 20 15:13:49 2003] [warn] (2)No such file or
directory: exec() may not be safe
Apache/1.3.29 (Win32) running...
=====================================

I expect that it.

So, I shall the php installer from download. I try changed the httpd.conf
under the Apache directory. Restart Apaches Console.

I testing the (http://localhost/test.php), show error page say "HTTP -
Error 400 Bad Request" also "HTTP - Error 404 Not found"

I have tried times.... But unknown....

Apaches Directory - c:apacheapaches*.*
PHP Directory - c:apacheapachesphpwin32*.*

httd.conf -: (was add the line)
ScriptAlias /php/ "C:/Apache/Apache/phpwin32/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
Action application/x-httpd-php "/php.exe"

I didn't change php.ini yet

I copy and paste the "php4ts.dll" under to C:windowsystem from PHP

What I have done that above ?

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 !
Start Up / Shutdown Mysqld In Win98
I can start the mysqld fine by running the following command:
C:mysqlbinmysqld --standalone

and I can shut it down fine with the following command:
c:mysqlbinmysqladmin shutdown

But does anybody know how to set this up in win98 so that it will automatically startup mysqld on startup, and automatically shut it down on shutdown/restart?

View Replies !
Win98 Apache And Php Install Not Wokring.
I have installed the latest Apache and PHP binaries (the PHP CGI executable release - not the ISAPI). I then configured the httpd.conf sciprt using the install.txt file from the PHP install and 2 reference books as guides. This got me to the point where I BELIEVE the PHP interpretor is kicking in for .php scripts. But when I try and browse the following page : <? php_info() ?> I get the following error :

Fatal error: Call to undefined function: php_info() in e:/apache/htdocs/phptest.php on line 1 Code:

View Replies !
Cannot Load Imap Extension In Win98
I removed the ; before "extension=php_imap.dll" in php.ini, and when I
start Apache 1.3 I get the following error message:

Unknown():Unable to load dynamic library
'c:phpextensionsphp_imap.dll". Uno de los dispositivos vinculados
al sistema no funciona (Translation: one of the devices attached to
the system doesn't work).

I already checked the extension_dir directive, and copied php_imap.dll
to c:windows just in case.

I am using Windows98 SE with php 4.3.3 as module in Apache 1.3

View Replies !
Installation Of Php/apache/mysql On Win98
I'm using an old computer - Win 98. I'd like to install php/apache/mySql on it but there are many versions and some do not recommend installing on Win98. If somebody could point me in the right directions about which versions of apache, mySql and PHp - or if there is a package suitable for Win98 that would be great.

View Replies !
I Can't Get Info.php Working On PWS Win98 The Page Cannot Be Displayed
Can someone help me?
I have tried php-4.3.4-installer
I have tried php-4.3.4-Win32
If someone has PWS running PHP4 on windows 98
I would appreciate any help. thank-you

View Replies !
Creating User Sessions W/out Using Sessions
I'm working on a user management system where I can use the benefits of PHP sessions w/out messing with them. Basically, my idea is to have an entry created into a "sessions table" when the user logs in. The table contains such info as the user's id number and the date/time they logged in. When the user logs out, the entry is deleted. In each page/script, it checks to see if the user is logged in by checking the sessions table for an entry w/their IP address and the date, to make sure it is fairly current (unless anyone can think of a better way to check).

Now my delema....obviously, I don't want people that don't properly log out to have a session that could last weeks (depending on when they visit again). I am thinking a script that cleans up entries that are old would do the trick, but obviously I want this script to run say, at least once an hour. Obviously, I am not going to be able to sit at my computer and run this script every hour of every day. I was thinking of using the script and doing a cron job, but I think my host only allows one cron job per day...and only at night. Any thoughts??

View Replies !
How Do Different Sessions Work? Multiple Sessions
I use a messageboard which uses sessions.

I have a login script which uses sessions.

I have a charting app which uses sessions.

How does PHP handle this? Does it create three different sessions or is everything handled by the one session file? In other words, is it working like magic and I don't need to worry about it.

What I'm confused with is that at the start of the login script there is a start_session() and other session related stuff. On logout, the session is destroyed.

Now does this affect the start_session() of the other scripts?

View Replies !
Php4
I'm wanting to work with php4 and want to know which version of mysql to
download that works great with php4 api version 3.23.x?

View Replies !
PHP4 Ignored With IIS
I am attempting to get PHP4 working with IIS but the php script is ignored.
I installed Apache and it works with the Apache server so it is obviously a
configuration error on my part but I can't find it. I have a test.php file
that I run with each configuration.

View Replies !
Re Php4.3.4
Re previous problem
Thanks to Alvaro, I solved the original problem on php version 4.3.4
However, I now have another one.

I have an admin panel which requires a password to access it from a previous
page. With the site live on an ISP server, everything is OK.
On my local server running Apache and php 4.3.4, when the correct p/w is
entered on the previous page, instead of going to the correct page (which
consists of 2 frames, it simply reproduces the previous page in both frames.

The script being used is:
#-----REDIRECT AUTH USER----------
if($HTTP_SESSION_VARS['sessadmin']){
Header('Location:admin.index.php');
}
#------AUTHENTICATE PASSWORD-------
if($HTTP_POST_VARS['pass']){
if(crypt($HTTP_POST_VARS['pass'],
$HTTP_POST_VARS['pass'])=='wiOgiun64DE9.'){
session_register('sessadmin');
$sessadmin='set'
$done=1;
}

Because it works OK on an ISP, I assume it must be a setting in my local
apache/php set up.

View Replies !
PHP4 XML DOM
Currently my web server supports only php4.
I want to know how to parse the xml and get the
element value using dom. I thought they have similar
function for getting element by id or tag name, so
far i haven't find anyting like that except fro PHP5 with
Domdocument.

$dom = domxml_open_file ('data.xml');
$e_data = $dom->document_element();

<?xml version="1.0"?>
<book>
<title>hhelo</title>
</book>

View Replies !
GD2 And PHP4.4
It should be possible (as far as I know) to use createimagefromjpg('<urltoimage>');

In PHP4.3.11 it worked just fine, but now I use PHP4.4 and it is not working
anymore!

I only can do:
createimagefromjpeg('blafoo.jpg') (=same dir)
or
createimagefromjpeg('d:/inetpub/vhosts/......../blafoo.jpg);

This function is also used in a plugin (LightBox) for Nuclues and with Nucleus
is isn't working also.

Anybody a solution? (I *need* to load from url!).

View Replies !
PHP4 And XML
How can I pase this xml file using php.  I am currently using  xml_parse($xml_parser,file_get_contents($file)); but this get the php code and not the out putted xml. I can't get my head around how to parse the outputted xml using php Code:

View Replies !
OOP In PHP4
Q. What OOP construct <B>unavailable</B> in PHP 4 does the following script approximate? Code:

View Replies !
XML In Php4
XML for data transfer between 2 servers. It's all working nicely - getting my "interface" object populated works like a charm - however, now that I wanted to test the application on the production server (PHP 4.4.4 - development server is 5.1), I of course, ran into a ton of issues due to php4's lack of XML support (compared to v5). After having tried multiple classes and trying to shimmy something together myself.

View Replies !
PHP4 Vs. PHP 5
I know PHP 5 is the newer (and presumably) better version, but I don't have any experience programming OOP. And I don't want to stumble learning PHP simply because I am struggling with OOP concepts. Yet at the same time, I'd rather learn a newer (more applicable) version, and I do hope to learn OOP programming some day soon.

View Replies !
PHP3 And PHP4 Together
I'm a little new to the PHP thing. I want to try to setup my server to handle PHP3 and PHP4 requests easily. e.g. I have some scripts that are PHP3 and want to start learning PHP4. Instead of doing the simple (like anything I do is simple URL ) thing, I am attempting to set up apache to support MySQL, PHP3, PHP4, SSL, ColdFusion, SteelBlue, and maybe even Frontpage.
Tell me I'm insane.
Now I have read the "Soothingly Seamless" setup from the website, and had it mostly working, until some unforseen circumstances caused me to have to start over.
I can set up Apache to use PHP4, MySQL, and SSL, but for those PHP3 scripts, I am a bit lost.
Finally, my question. Is there a simple way (using the Sootingly Seamless page as a reference) to add PHP3 into the mix. Any help on this would be great!

View Replies !
PHP3 Or PHP4
I am starting to write some scripts. Now should I wait until PHP4 documentation and tutorials arise and write in PHP4, or should I just do everything in PHP3? I have a book on PHP3 and I want to know if the language has changed enough to make this book invalid. Thanks. Any clear input is appreciated.

View Replies !
MSSQL With PHP4
I am using win98 and SQL7.0,, the problem is when i try to connect to the database using the next query :
<?php
$username = "bla";
$password = "bla";
$database = "bla";

$conn = mssql_connect($server, $user, $pass);
$select = mssql_select_db($database, $conn);
$sql = "SELECT * FROM ";
$result = mssql_query($sql, $conn);
?>

it gives me the next error message :

Fatal error: Call to undefined function: mssql_connect() in C:Inetpubwwwrootphptestmain2.php on line 6

View Replies !
Does Anyone Use The PHP4 Dl() Function?
does anyone use the PHP4 dl() function using a UNIX server?
to dynamically load modules at run time?

View Replies !
PHP4 And SSL And Raven
1) - Has anyone had intermittent "Page Not Found" or "Page Cannot Be Displayed" errors when using PHP4 over a secure connection. It's not our programming because we get the error when using phpmyadmin over SSL. Phpmyadmin is an open source utility which was programmed by someone else. We are using a RaQ4 Cobalt box running Linux, hosted with Aspre (aspre.net). Our ISP says some other customers have complained about a similar problem but they have no solutions.

2)- We talked with another dedicated server provider (Adgrafix, adgrafix.com) and they said that we would have to install "Raven" to make PHP work over SSL. Has anyone heard of Raven? Is it necessary?

View Replies !
Session In Php4
I have tested a couple functions, they work fine, but when I try the session_start() function, it just hang the browser for a long time and at the end, return me a message saying that the page is not found. Is there some configuration I have to make before I can use session-related function? or what else I should do?

View Replies !
Setting Up PHP4
I have set up PWS and PHP4 on my Windows98 computer but I am still unable to see php coding in .php files in IE. Yes I have put them in the right dir. I think the problem was that I was unable to put the file msvcrt.dll in my C:WINDOWSSYSTEM folder. When ever I try to copy that file into C:WINDOWSSYSTEM I get an error message that says "Cannot creat or replace msvcrt: The specified file is being used by Windows." Whats going on here?

View Replies !
PHP4 Beta
i installed PHP4b2 for NT4/IIS but the PHPpages just won't show - HTTP error 500. how do i troubleshoot this? I have installed the php isapi filter and also *.php is associated with the above filter as per the installation notes. The normal htm pages are OK.

View Replies !
Install Php4
I have installed php4 on my linux server,and all the process is so smooth,but when I write a php file only content a single sentence of <? phpinfo ?>,the system tells me the version of the php is 3.0.15,why?At the same time the php cann't connect ot mysql.

View Replies !
Reddhat 7.1 & Php4
Problem: the file phpinfo.php always showed the script line <? phpinfo(); ?> in redhat 7.1. But:

1. php works in window 2000
2. it also works in win98
3. it also works in a modified redhat 7.1 where I installed apache+mysql+php myself.

View Replies !
PHP LIB Works With PHP4?
I want to install phplib but found "PHP 4 is still in beta. We do not support deployment of this library with beta software." in phplib installation manual.

Does it mean that I have to go back to php3? Have anyone have positive experience installing phplib on php4? After I notice this problem. I tried to look up the answer in the web, and found only one negitive answer:

- - - -
I did and mailed it to php4-beta. If I install a build of
PHP4 and the php.ini-dist distributed with PHP4, I get the
core as soon as I either define a doc_root or an
auto_prepend_file, no matter what I do.
Kristian
- - - -

But it is in php4 beta though. So, I don't dare to go any further because I'm really new to php.

View Replies !
Connecting To MS-SQL Using PHP4!
I am trying to connect to our NT based MS-SQL server from my remote linux box, i have a RH linux 6.2 plat, with PHP4.0.3, using sybase ase libs, i compiled it like the faq says, configured it, set up the interface files, but i get the following error:

Fatal error: Call to undefined function: mssql_connect()in /usr/local/apache/htdocs/mssql.php on line 4

So i havent got to actually be able to connect to anything being, its saying function isnt supported.

View Replies !
PHP4.0 On Unix
Can anybody see why the following code wouldn't work on a Unix /Apache platform when it works fine in IIS5.0 on windows? Is there a problem with reading the querystring and passing it to the HTTP variable?

<?
session_start();
$strPage = $HTTP_GET_VARS["page"];
if (isset($logged) == true && $logged == 1){
header("Location : ".$strPage.".php");}
else{
header("Location : passwordcheck.php?page=".$strPage);}?>

View Replies !
PHP4 And This Function
function query($query, $return = false)
{
$fetch = mysql_query($query, $this->connection) or
die2(mysql_error($this->connection));
if($return)
return $fetch;
}

mysql_error(): supplied argument is not a valid MySQL-Link resource

the line that begins with $fetch is my problem. This was originally a
PHP5 script that I am retrofitting.
The $query is used all over, and it is really gumming things up.

View Replies !
Php4 And Linux
I'm running Red Hat linux 5.2 on my server. I'm able to run php3 fine on it. I was told that i couldn't run php4 on red hat linux 5.2. I dont think this is true, but would like to know. I don't think the person knew what i was talking about, but i wanted to make sure since i want to upgrade to php4.

View Replies !
Php4.3.1-installer
im not sure what my SMTP server would be, i think i would something like this www.geocities.com/user-name but im still not sure.

View Replies !
Parsing XML In Php4
I did the parsing XML and it works on my computer (PHP5), but as usual
it doesn't on the clients server (PHP4):

<?php
error_reporting(E_ALL);

$doc = DOMDocument::loadHTML("playlist.xml");
var_dump($doc);

$aSongID = array();
$aSongName = array();
$aSongPath = array();

$songs = $doc->getElementsByTagName("Song");

foreach($songs as $song){
array_push($aSongID, $song->getAttribute("ID"));
array_push($aSongName, $song->$song->nodeValue);
array_push($aSongPath, $song->getAttribute("URL"));
}
var_dump($aSongID);
?>

It just displays the blank page with no errors, so i can't figure out
what is it.

View Replies !
PHP4 Installation
I have installed PHP4 many times with no problems, but this time im stuck. The system is Windows XP Pro SP1, it was just installed fresh. Web server software is Visnetic WebSite Pro, Latest build. PHP v4.3.2. Everything installs fine as far as i can tell and I setup all the needed settings in the web server.

When ever I try to use PHP files on my server all I get is internet explorer saying the page cannot be displayed. I dont understand what I have done wrong, its the same setup I always use, same for the settings.

View Replies !
Use PHP4 Dom XML In PHP5?
Is it just me... Or is PHP5 XML very limited?
Or am I missing something very obvious?
Any way to use PHP4 Dom XML in PHP5?
Does anyone know why support for it was dropped?

I have following code I need to have replaced:

PHP4
$eir_dom = domxml_open_mem($eir_padfile_content);
$eir_root_node = $eir_dom->document_element(); // = root element

PHP5
$eir_dom = new DOMDocument;
$eir_dom->loadXml($eir_padfile_content);
// how do I set $eir_root_node ?

PHP4
.... $nodes = $cur_root_node->child_nodes();
.... if ($test_node->node_name() == $next_node_name_to_find) {
PHP5
// child_nodes(); node_name()

PHP4
.... if ($node_child->node_type() == XML_TEXT_NODE) {
$node_child->set_content($new_content);
break;
}
PHP5
// set_content, node_type()

View Replies !
PHP4.3.4,IIS,MySQL ...
Is it possible to run PHP with IIS and MySQL instead of with Apache? If it
does, how do I make IIS recoqnize PHP modules etc...?

View Replies !
Php4 The Future
I am studing perl at the moment for fun and will be done in a month or two but i want to now is PHP4 easy if you now perl???? I want to leard something new, the best in web development where should i go?

View Replies !
.php Or .php3 Or .php4
With the advent of php4, which extension should we use. A lot of php3 pages use the .php3 extension, but by deafault the extension in the apache httpd.conf is .php. Should we just adapt .php4 or use .php to make sure future upgrades don't cause any issues with already existing code. I would welcome any thoughts.

View Replies !
Where Is PHP4 Documentation?
Where can I find a copy of the PHP4 documentation online?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved